ScalarVector1 / DragonLens

Modern, customizable, and community-driven debugging and cheat mod for TModLoader
26 stars 14 forks source link

Fix toolbar collapsing #31

Closed Jadams505 closed 1 year ago

Jadams505 commented 1 year ago

Fixes a few issues with collapsing toolbars.

Issue: Floating toolbars could be "silently" collapsed. (Toolbar.collapsed would toggle, but nothing visually would happen) Solution: Forced collapsed to only be changed if the toolbar is not floating.

Issue: Refreshing the toolbar visually uncollapses all toolbars, even though collapsed is still true Solution: Updated offset and offsetTarget in ToolbarElement.Refresh.

Issue: Dragging a collapsed toolbar would not change offsetTarget Solution: Set collapsed to false when dragging so offsetTarget gets set properly. offsetTarget is also set to zero if the toolbar is floating.