ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.24k stars 2.27k forks source link

Add hotkey hints to editor menus #29691

Closed bdach closed 2 weeks ago

bdach commented 1 month ago

https://github.com/user-attachments/assets/8a5b57d8-742a-43dd-88de-666b926229d0

RFC.

This is pretty old code that I had lying around on a branch somewhere and showed off on discord once but I didn't get around to cleaning it up until now. It still has a hack in one place that I'm not super sure how to get rid of, so caveat emptor.

Note that this also slightly alters the design and spacing of the menus globally - all menus will now have a space to the left of the item to make sure a checkbox or something else can be displayed there.

For demonstration purposes this is only shown off in the editor right now, but there are probably other places where these could be directly applied pretty much immediately.

Note that the HotkeyDisplay is designed to be reusable, and supports KeyCombinations, GlobalActions, and PlatformActions out of the box.

peppy commented 2 weeks ago

For 162558e see:

JetBrains Rider-EAP 2024-10-01 at 09 49 35