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

Cleanup panel code (Part 1) #7417

Merged
merged 13 commits into from
Sep 16, 2024
Merged

Conversation

kphoenix137
Copy link
Collaborator

@kphoenix137 kphoenix137 commented Sep 15, 2024

Notes:

  • HPPer changed from 80 to 81. The globes have 81 rows of pixels that can be filled.
  • Buttons had their positions/sizes scattered around as magic numbers, and resulted in some inconsistencies, so this was resolved, which broke the time demo.
  • Fixed flasks always showing an empty row of pixels even with full globes.
  • Empty flasks above the panel are slightly larger than the filled flasks, resulting in strange visuals when the globe is changing fill level. I modified them to always draw the empty part entirely, and then draw the filled part, if applicable.

All of this should make it entirely easier to mod the control panel without having to play around with magic numbers in many functions.

Source/panels/mainpanel.cpp Outdated Show resolved Hide resolved
Source/control.cpp Outdated Show resolved Hide resolved
@AJenbo
Copy link
Member

AJenbo commented Sep 15, 2024

need a rebase

@kphoenix137 kphoenix137 requested a review from AJenbo September 15, 2024 19:55
@kphoenix137 kphoenix137 marked this pull request as draft September 15, 2024 21:04
@kphoenix137 kphoenix137 marked this pull request as ready for review September 16, 2024 02:08
Source/control.cpp Outdated Show resolved Hide resolved
Source/control.cpp Outdated Show resolved Hide resolved
AJenbo
AJenbo previously approved these changes Sep 16, 2024
Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

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

good progress, eventually i hope we can have most of the sizes driven by the sprite sizes rather then hard coded values.

@AJenbo AJenbo enabled auto-merge (squash) September 16, 2024 17:28
@AJenbo AJenbo disabled auto-merge September 16, 2024 17:39
@AJenbo AJenbo merged commit 8970eaa into diasurgical:master Sep 16, 2024
22 of 23 checks passed
@kphoenix137 kphoenix137 deleted the cleanup-panel branch September 16, 2024 18:33
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