Hi everyone,
Almost all of the patches I made were applied. I had took a break for a while to see what would develop from them. The last 2 unapplied patches are related to saving the gump positions. I would like to get some feedback or suggestions for how gump positions should be saved, what they should be saved for, and what to do if the gumps are moved "off screen".
Thanks
Brian
Saving Gump Positions,
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Re: Saving Gump Positions,
I played around a bit with the original U7 to see what they were doing. It looks like you can pretty much drag a gump offscreen, although I think there's always one pixel visible. They do save/restore gump positions (but I only experimented with the NPC paperdoll gumps). It did look a couple times like I was able to drag a gump completely offscreen, but then it seemed to bounce back.
So I'd say you're correct to just save/restore NPC gumps (didn't check whether you're doing stats too, but that would be good). My preference would be not to bother checking for 'offscreen' when the user's dragging a gump, but only when you restore a gump's position. That way, the user couldn't lose a gump permanently when the screen is resized. Also I wouldn't bother saving/restoring these positions in the savegames.
Finally, sorry to take so long to get to the patches you submitted.
So I'd say you're correct to just save/restore NPC gumps (didn't check whether you're doing stats too, but that would be good). My preference would be not to bother checking for 'offscreen' when the user's dragging a gump, but only when you restore a gump's position. That way, the user couldn't lose a gump permanently when the screen is resized. Also I wouldn't bother saving/restoring these positions in the savegames.
Finally, sorry to take so long to get to the patches you submitted.
Re: Saving Gump Positions,
DrCode,
I loaded the original Ultima 7 to do some tests too. I noticed something interesting.
1) open player gump
2) open stat gump
3) move stat gump
4) close stat gump
5) close player gump
When the player's gump is opened again, it appears were the stat gump was moved to.
Otherwise if between 4 and 5 the player's gump is moved, the next time it is opened to where it was last moved...
Also the player's backpack is always opened offset to the player's gump. The backpack always adjusts to be "fully on screen".
Brian
I loaded the original Ultima 7 to do some tests too. I noticed something interesting.
1) open player gump
2) open stat gump
3) move stat gump
4) close stat gump
5) close player gump
When the player's gump is opened again, it appears were the stat gump was moved to.
Otherwise if between 4 and 5 the player's gump is moved, the next time it is opened to where it was last moved...
Also the player's backpack is always opened offset to the player's gump. The backpack always adjusts to be "fully on screen".
Brian