Making moveable GUIs (Based on microsoft's 'Windows')

Started by AGSPwnage, Sat 16/10/2010 19:31:19

Previous topic - Next topic

AGSPwnage

How Can I make a GUI draggable (and be able to click/it contens without moving GUI) like the 'Windows' in Microsoft's OS?

Calin Leafshade

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.

Ryan Timothy B

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.

Knox

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...
--All that is necessary for evil to triumph is for good men to do nothing.

AGSPwnage


SMF spam blocked by CleanTalk