Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor UI control drawing to add styles and reduce the number of parameters #227

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

DaleStan
Copy link
Collaborator

@DaleStan DaleStan commented Aug 8, 2024

This is my proposal for improving the too-many-parameters problem brought up in #220 (comment). It combines parameters that routinely appear together, provides easy access to common combinations, and eliminates most situations where a caller can't pass all the appropriate options.

The intentional user-visible changes are:

  • Refuse to accept negative numbers for things like fixed and built building count.
  • Reduce the leading padding from 0.8 to 0.5 in all text input boxes that didn't already use 0.5. (Except the 'create directory' text box in the filesystem window, which still uses 0.2 x 0.2.)
  • Change the MilestoneDisplay.Normal icons in the NEIE to Contained instead. (see ImmediateWidget.cs:12-24)

@DaleStan DaleStan requested a review from shpaass August 8, 2024 02:10
Copy link
Owner

@shpaass shpaass left a comment

Choose a reason for hiding this comment

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

This is awesome!

@shpaass shpaass merged commit 269c5a0 into shpaass:master Aug 8, 2024
1 check passed
@DaleStan DaleStan deleted the display-styles branch August 8, 2024 08:14
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.

2 participants