When the object is invisible...

New releases and general discussions.

Post » Tue Jan 20, 2009 8:29 pm

... that doesn't mean it is not clickable. I discovered that when I was getting activity when I clicked around randomly, then I realized that the 'invisible' menu was there and its buttons were registering clicks.

I did a workaround by adding a condition check for 'is visible?", but well, shouldn't invisible stuff stop interacting with visible objects? Or is there a way to disable them altogether?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Jan 20, 2009 8:32 pm

there's a lot of utility in being able to interact with invisible objects.

one option you could try is to destroy/create them as needed. i'm curious though -- is this the main menu? because it'd be better to do a main menu as a separate layout. and if it's a pause menu (or something similar that needs to not reset the game layout), i'd suggest using a modal layout (layout within a layout).

edit: also i think this should be in help section
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Tue Jan 20, 2009 8:39 pm

Main Menu is on a layer, that is then inherited across all layers (above base layers on other layouts). I've had issues with modal layouts.

No worries, I fixed it all, one has to remember that invisible objects remain interactable! I thought I'd share this. If this does belong to help section, then I apologize. I wasn't sure at the time at posting.

Think I'll go with destroying and creating; at least it'll keep the amount of objects minimal.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Jan 20, 2009 9:09 pm

This is by design - changing an objects visibility does nothing more than stop drawing it. If you wanted an interactable invisible object, you'd be stuck if it automatically made them noninteractable.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests