Page 1 of 1

what determines order of layer buttons?

Posted: Sat Sep 02, 2017 6:36 pm
by Bugala
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?

Re: what determines order of layer buttons?

Posted: Sun Sep 03, 2017 12:12 pm
by airsoftsoftwair
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.

Re: what determines order of layer buttons?

Posted: Sun Sep 03, 2017 8:10 pm
by Bugala
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.