Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AGSPwnage on Sat 16/10/2010 19:31:19

Title: Making moveable GUIs (Based on microsoft's 'Windows')
Post by: AGSPwnage on Sat 16/10/2010 19:31:19
How Can I make a GUI draggable (and be able to click/it contens without moving GUI) like the 'Windows' in Microsoft's OS?
Title: Re: Making moveable GUIs (Based on microsoft's 'Windows')
Post by: Calin Leafshade on Sat 16/10/2010 19:36:52
Manually.

Check if mouse is down over the gui,
check if the mouse is within the dragable section (the tile bar)
while the mouse is down set the gui coords to the mouse coords minus the offset from the original click relative to the gui.

I'm not reeling off code because this has been asked so many times and i cant be fucked.
Title: Re: Making moveable GUIs (Based on microsoft's 'Windows')
Post by: Ryan Timothy B on Sun 17/10/2010 02:48:21
Check this answer out:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=40840.msg539886#msg539886

And yes, this has been asked numerous times, but each time the title was poorly named.
Or you could look at Khris' code below that post, but I honestly haven't looked through it yet.
Title: Re: Making moveable GUIs (Based on microsoft's 'Windows')
Post by: Knox on Mon 18/10/2010 02:00:47
Khris's solution works perfectly, I tested it out (not actually using it in my own game, but sounded awesome I wanted to test it out!) heheh...
Title: Re: Making moveable GUIs (Based on microsoft's 'Windows')
Post by: AGSPwnage on Mon 18/10/2010 09:16:17
thx guys, :D :=