what determines order of layer buttons?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 685
Joined: Sun Feb 14, 2010 8:11 pm

what determines order of layer buttons?

Post by Bugala » Sat Sep 02, 2017 6:36 pm

I have so far thought that when using buttons the z-order of buttons is same as layers z-orders are.

But now i just noticed this is not so, at least not in my program.

What I have expected is that if Layer Button A is completely (or even partially) covered by Layer Button B, then i cant push Layer Button A, at least from parts that Layer Button B is covering Layer Button A.

However, I have now an example where layer Button B is partially covering Layer Button A, and when I click on top of Layer Button B, it is actually activating Layer Button A.

Hence, how is the z-order of layer buttons decided, and can i change the order on fly?

User avatar
airsoftsoftwair
Posts: 2531
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: what determines order of layer buttons?

Post by airsoftsoftwair » Sun Sep 03, 2017 12:12 pm

I think it is decided in the order those buttons are created. When calling MakeButton(), Hollywood will chain this button at the end of a linked list inside the current BGPic. So buttons created first, will be checked first.

Bugala
Posts: 685
Joined: Sun Feb 14, 2010 8:11 pm

Re: what determines order of layer buttons?

Post by Bugala » Sun Sep 03, 2017 8:10 pm

Okay, good to know. I thought i can hide buttons by putting them under others, but this is not the case then. Have to take this into consideration.

Post Reply