Hey there!
I've just stumbled across another problem... I'm at the point of creating teleporting function for one of the NPCs and I came up with something which I called "back shade" which is supposed to make everything apart from the NPC's window blurred and dark so that the player focuses on only that one thing.
I did this:
Code:
Gui += back_shade;
Gui += tp1; //teleporting window 1
Gui += tp2; //teleporting window 2
so that all the elements are added to the Gui in desired order.
Then I disable all of them:
Code:
back_shade.hide();
tp1.hide();
tp2.hide();
And now when you talk to an NPC this happens:
Code:
back_shade.show();
tp1.show();
So now "back shade" and "tp window 1" are drawn like this:
(bottom) BackShade -> TP1 (top)
Then when you keep talking and clicking buttons, "tp window 1" disappears and "tp window 2" appears:
Code:
tp2.show();
tp1.hide();
I don't know why, the drawing order at this point looks like this:
(bottom) TP2 -> BackShade (top)
I thought the "tp window 2" should be on top of "back shade" while it's below... Any ideas what I did wrong?
Thanks,
Kiekos
EDIT: I've figured out where the problem is - when you click on a Gui window it's instantly being moved to the top of the pile, so when "back shade" and "tp window 1" are drawn and you keep clicking buttons in the window, you also click "back shade", so these two things are moved to the top of the pile and that's why "tp window 2" is drawn below "back shade" later on.
Is it possible to disable that feature just for one gui object or do I have to find another way to achieve that efect?