Sign in to follow this  

Button widget returning to old position after SetPosition

  • Version: PC/MAC/Linux Pending

When fiddling with a UI mod that repositions some buttons I noticed that a Button type widget goes back to a previous position when moused over.  I believe this is because (in widgets/button.lua:OnControl) clicking on the button saves its old position so that OnLoseFocus can restore it later.  But that old position isn't cleared and is set again after a mouseover.  Of course the game and almost no mods move buttons around so this doesn't show up much... :)

(A modder can workaround this by clearing o_pos before moving a button in code.)

I haven't done any DST modding yet but a brief glance looks like it probably does the same thing.

Steps to Reproduce
Click a button, use SetPosition to move it a bit, then move the mouse across it.

Status: Pending

This issue has not been confirmed by a developer yet.

  Report Bug
Sign in to follow this  

User Feedback

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now