-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add precise rotation control to osu! editor #24567
Conversation
i haven't tried this branch but instead of clamping, wouldn't it be better to conveniently convert the angle to the equivalent one within -180 and 180? then if you have say 240 in your head you can type that instead of doing mental arithmetic (to get -120) |
The best compromise if we want this would be to change the allowed range to diff --git a/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs b/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs
index 86112d9751..f09d6b78e6 100644
--- a/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs
+++ b/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs
@@ -45,8 +45,8 @@ private void load()
{
Current = new BindableNumber<float>
{
- MinValue = -180,
- MaxValue = 180,
+ MinValue = -360,
+ MaxValue = 360,
Precision = 1
},
Instantaneous = true
@bdach thoughts on this? I think it's probably okay, and may lead to a better UX (more flexibility at the cost of less precision when dragging the slider, but let's be real: this control is mainly for typing a value in). |
No objections to changing to [-360, 360]. While @Walavouchey's proposal is technically feasible, it'd be rather finicky to implement given the structure of things. Will apply when able (unless I get preempted). |
I can make that change, but curious if you had anything lined up to fix the popover tests already? |
Hmm, wasn't expecting them to fail. Pretty sure they were green locally as is tradition. You can leave be, I'll look closer on Saturday. |
I'm not a mapper, but have a couple of suggestions upon trying the branch:
Sorry if these were already known / out of scope of this PR / there are reasons i don't know it was done this way. |
Test failures should be resolved. Allowed rotation range expanded to [-360, 360].
There is not. I intentionally did not make one because reproducing winforms tab behaviour would have been a massive pain (because presumably people would want to be able to tab between the textbox and the toggle or whatever).
Need more opinions on this because I prefer it the way it is. Compare: photoshop free transform tool.
This requires the PR you mention yes. |
SliderWithTextBoxInput
#244312023-08-16.11-42-13.mp4
A few notes: