Skip to content

Fix overzealous pressed widget check#3605

Merged
AaronVanGeffen merged 2 commits intoOpenLoco:masterfrom
AaronVanGeffen:pressed-state
Jan 14, 2026
Merged

Fix overzealous pressed widget check#3605
AaronVanGeffen merged 2 commits intoOpenLoco:masterfrom
AaronVanGeffen:pressed-state

Conversation

@AaronVanGeffen
Copy link
Copy Markdown
Member

Dropdown widgets are not presented in their expected 'pressed' state when clicked. This has to do with MouseInput::isPressed querying the current input state, while the stateWidgetPressed function immediately resets this when handling the event.

I believe MouseInput::isPressed is overzealous in its checks, and so I've opted to remove the input state check.

Before:
North America (Mid) 1970

After:
Boulder Breakers (2)

@AaronVanGeffen AaronVanGeffen enabled auto-merge (squash) January 14, 2026 18:23
@AaronVanGeffen AaronVanGeffen merged commit 8ef221e into OpenLoco:master Jan 14, 2026
18 checks passed
@AaronVanGeffen AaronVanGeffen deleted the pressed-state branch January 14, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Requires a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants