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

Add precise scaling control to osu! editor #28309

Merged
merged 21 commits into from
May 29, 2024
Merged

Conversation

OliBomby
Copy link
Contributor

This PR adds the scale popover tool from osu! stable to lazer. I tried to mimic the original functionality as closely as possible, and in some aspects improve it.

I also added a hotkey for the scaling tool which is S. Unfortunately more logical hotkeys like Ctrl+S and Ctrl+Shift+S are already taken.

The maximum value of the scale slider is determined based on the current choice of origin and axis. The maximum value will always be the maximum scaling value that still keeps the scaling objects on screen.

I also slightly changed how the rotation popover works. Now it will automatically select the text in the textbox input, so the user can instantly type the value they want after opening the tool.

osu Game Rulesets Osu Tests_EcLev87sNt

@Walavouchey
Copy link
Member

Walavouchey commented May 25, 2024

having rotate on Ctrl+R and scale on S will be weird... i think it'd be worth rethinking the hotkeys

@bdach
Copy link
Collaborator

bdach commented May 27, 2024

The hotkey 200% needs to change. This feature is not so central to the editor that it should be allowed to take up a letter without modifiers.

I'd probably do something either close to Ctrl-S (because scale) or Ctrl-R (because next to the rotation binding) location-wise. Maybe something like Ctrl-T.

@bdach bdach self-requested a review May 27, 2024 06:38
@bdach
Copy link
Collaborator

bdach commented May 29, 2024

Seems good enough. I've done a round of cleanups but nothing super worth mentioning in there. Well maybe aside the hotkey changing - Ctrl-T was already taken by the game-global toolbar and thus wasn't working so I did Ctrl-E instead. Head-canon that it's E for scalE, but that's kinda stretching and I just wanted to have it close to Ctrl-R and Ctrl-S I guess.

@bdach bdach enabled auto-merge May 29, 2024 08:19
@bdach bdach disabled auto-merge May 29, 2024 08:51
@bdach bdach merged commit bf7dc71 into ppy:master May 29, 2024
10 of 17 checks passed
@OliBomby OliBomby deleted the scale-tool branch June 1, 2024 17:53
peppy added a commit to peppy/osu that referenced this pull request Jun 24, 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.

4 participants