what determines order of layer buttons?

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

what determines order of layer buttons?

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

Re: what determines order of layer buttons?

Post 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.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: what determines order of layer buttons?

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