[SOLVED] GUI button pivot problems

Started by Chrille, Wed 18/11/2009 21:54:54

Previous topic - Next topic

Chrille

This problem concerns two GUI's. One contains an inventory window and a label, the other is used as a transparent background for all GUIs, changing its shape depending on what GUI pops up. When the inventory GUI is up there is a button on transparency GUI that also appears.

Here's my problem. When the inventory GUI loads, the transparency GUI sets its width & height and x & y positions relative to the size & position of the inventory window. This works fine. However, the button, meant to be right behind the inventory window, appears both too far to the right and below the window's coordinates. The button's x & y values are set to the inv. windows x & values so it should be exact.

While I could just adjust this manually it is a bit annoying and I can't figure out why this is. Is the pivot of buttons not in the top-left corner like other gui objects or is this a bug?



I've been playing around with AGS for a while now. It's been a few several years since I tried it and I must say it's fantastic how much it has improved. Well done, Chris!
GASPOP software
http://www.gaspop.com

Lufia

My understanding is that GUI coordinates are relative to the screen while GUI controls coordinates are relative to the top-left corner of their parent GUI.

Could that be the explanation of your problem?

Chrille

That was indeed the problem. Thanks!
GASPOP software
http://www.gaspop.com

SMF spam blocked by CleanTalk