Page 1 of 1

Overlapping buttons

Posted: Thu Jan 20, 2022 6:53 pm
by amyren
When two buttons overlap, I was thinking you could change which one to be selectable by moving the desired object to the front of the other. But it seems like the z position is ignored in this matter. Like layer position only affects the visibility of objects.
Is this the correct behaviour?

Re: Overlapping buttons

Posted: Fri Jan 21, 2022 9:30 pm
by Tipsi
Unfortunately, I do not have a solution to the problem, only an explanation:

Hollywood - MakeButton() - Option ZOrder

Griessli
Tipsi

Re: Overlapping buttons

Posted: Sat Jan 22, 2022 12:40 am
by amyren
Thanks.
This means that if there was an option to set zorder to true in Designer then it would work in this case.

Anyway, the solution I used was to move the objects out of the way when not in use.

Re: Overlapping buttons

Posted: Sat Jan 22, 2022 8:50 am
by emeck
Hi, maybe it is what you mean by
amyren wrote: Sat Jan 22, 2022 12:40 am Anyway, the solution I used was to move the objects out of the way when not in use.
but if not, you can hide the button when you hide the object. After setting the events you want, in the Object Manager/Script tab, double click on the 6th column of the object's row (you should see a hand there). In the Edit Button dialog, you can select "Hide button with object" option.

That way you don't have to move around your objects when you need to disable overlapping buttons.

Re: Overlapping buttons

Posted: Sat Jan 22, 2022 11:24 am
by amyren
Unfortunately, hiding a button will only make it invisible, it will still generate events when clicked at.

Re: Overlapping buttons

Posted: Sat Jan 22, 2022 12:21 pm
by emeck
amyren wrote: Sat Jan 22, 2022 11:24 am Unfortunately, hiding a button will only make it invisible, it will still generate events when clicked at.
Works for me when hiding images with a click if the option "Hide button with object" is active.

I have done a simple test with a red square and a blue one. Clicked on the red square and it hides and the blue one appears in its place. Click on the blue one and it hides and the red one appears. "Hide button with object" option is active in both objects.


You can download it here: https://filepost.io/d/ob5TgFb7QN

Re: Overlapping buttons

Posted: Sat Jan 22, 2022 1:44 pm
by amyren
emeck wrote: Sat Jan 22, 2022 12:21 pm Works for me when hiding images with a click if the option "Hide button with object" is active
Ops, I dont know how could I overlook that option😄
Thank you for pointing it out.

Re: Overlapping buttons

Posted: Sun Jan 23, 2022 2:09 pm
by airsoftsoftwair
The next Designer version will also have this new feature:

Code: Select all

- Change: Buttons created in Designer now respect the layer z-order so that you can also have overlapping
  buttons and the events are handled with respect to the current layer z-order; to maintain compatibility
  with old Designer projects, there is a new "Compatibility mode" option which allows you to enforce the
  old behaviour; this option will be automatically activated for Designer projects from version 5.0 and
  earlier