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

Allow decimal degrees angle in rotation popover #29927

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

OliBomby
Copy link
Contributor

Allows you to make patterns with precise angles and geometry, like a spiral that rotates 22.5 degrees for every circle.

I followed the suggestion by @bdach ppy/osu-framework#6376 (comment) to use a double bindable setup which bidirectionally linked with value change callbacks.

I let the Current bindable also change the SliderCurrent bindable so when you create a slider with textbox input with the old api it still functions the same way.

}
}

public Bindable<T> SliderCurrent
Copy link
Collaborator

Choose a reason for hiding this comment

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

The API design on this is unacceptable. Current and SliderCurrent cannot coexist as public.

If I were to suggest an alternative, this should be a

public T? SliderPrecision { get; set; }

or similar. And it should throw errors when attempting to set a value that isn't a multiple of Current.Precision too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Implementation is a bit weird though since you can't access the precision of the slider because it only exposes a Bindable instead of a BindableNumber.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants