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

config: movement speed sliders #190

Merged
merged 4 commits into from
Apr 1, 2024

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Mar 12, 2024

Adds slider widgets for horizontal and vertical movement speed.

Introduces a custom @BoundedScalable annotation and DoubleSliderEntry GUI, based on cloth-config's @BoundedDiscrete and IntegerSliderEntry respectively.

Unlike my earlier implementation in #121, which ported the speed options to int so it could use cloth-config's @BoundedDiscrete, this implementation will not affect how speed values are stored or saved.

The PR is split into two parts; the first commit is a general refactor to allow adding more cloth-config extensions than just VariantTooltip. The second commit contains the meat of this PR.

image

`@BoundedContinuous` is based on autoconfig's `@BoundedDiscrete`, but ported to floating-point values.
@MattSturgeon MattSturgeon added the enhancement New feature or request label Mar 12, 2024
@MattSturgeon MattSturgeon changed the title Implement movement speed sliders config: movement speed sliders Mar 12, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
@MattSturgeon
Copy link
Member Author

Would it be worth the extra complexity to have both a text-box and a slider? If so I might tackle that in a follow up PR once this is merged...

hashalite and others added 2 commits April 1, 2024 00:36
…ntry.java

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Copy link
Collaborator

@hashalite hashalite left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@hashalite hashalite merged commit c205a67 into MinecraftFreecam:main Apr 1, 2024
@MattSturgeon MattSturgeon deleted the config/sliders branch April 1, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants