Overlapping buttons

Anything related to Hollywood Designer goes in here
Post Reply
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Overlapping buttons

Post 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?
Tipsi
Posts: 21
Joined: Sun Feb 14, 2010 6:06 pm
Location: Switzerland

Re: Overlapping buttons

Post by Tipsi »

Unfortunately, I do not have a solution to the problem, only an explanation:

Hollywood - MakeButton() - Option ZOrder

Griessli
Tipsi
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Overlapping buttons

Post 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.
User avatar
emeck
Posts: 169
Joined: Fri Apr 03, 2015 3:17 pm

Re: Overlapping buttons

Post 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.
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Overlapping buttons

Post by amyren »

Unfortunately, hiding a button will only make it invisible, it will still generate events when clicked at.
User avatar
emeck
Posts: 169
Joined: Fri Apr 03, 2015 3:17 pm

Re: Overlapping buttons

Post 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
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Overlapping buttons

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Overlapping buttons

Post 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
Post Reply