Skip to content

RadioButton use on_change callback#5850

Merged
ab9rf merged 3 commits into
DFHack:developfrom
Bumber64:radio-button
Jul 13, 2026
Merged

RadioButton use on_change callback#5850
ab9rf merged 3 commits into
DFHack:developfrom
Bumber64:radio-button

Conversation

@Bumber64

Copy link
Copy Markdown
Member

Have RadioButton use a callback when it changes state instead of needing to check manually.

@Bumber64

Copy link
Copy Markdown
Member Author

Not sure if toggle_state should have a getter function. Maybe there's a reason to check the state outside the callback, but you can just read the value if you want it enough.

@SilasD SilasD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this covers all of my quibbles. I'm good with this, asuming it's had a bit of testing.

Edit: in response to the above, I think a getState() to match the setState() would be good -- if I were just trying to use this, I would expect the matching function to exist.

@ab9rf
ab9rf merged commit 6c2ff3d into DFHack:develop Jul 13, 2026
14 checks passed
@Bumber64
Bumber64 deleted the radio-button branch July 13, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants