-
Notifications
You must be signed in to change notification settings - Fork 85
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
Keyboard Shortcuts for TM:PE #382
Keyboard Shortcuts for TM:PE #382
Conversation
… used tools can be used with keyboard
Working to add another commit to this, which will also allow customizing Shift+S stay in lane key shortcut. At the time of writing, it works if it is not Shift+S for me, so something else is blocking it. |
I think you forgot to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only my review for language files, aubergine needs to review the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than this one, it's pretty good. Don't forget to add translations for all the other languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translations LGTM. Awaiting code review and it should be good to merge.
Adding PL translations
I need some help with Shift+S shortcut, it seemed to not work for me. |
I'm not sure how the game's own keymapping system works. Maybe it treats every shortcut as globally unique, rather than tool specific? |
I believe it is |
I will try to check what is going there when I'll be back home 😉 |
Ok, I think I found possible cause... https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/1f671ed2d0025b7f3a0be551d4e8c5d5c0dcf4bc/TLM/TLM/UI/SubTools/LaneConnectorTool.cs#L191 Main part of source code of // keyCode is our KeyCode to test against
// e.keyCode comes from Event
return keyCode != KeyCode.None && e.keyCode == keyCode && ... //and more checks there Another issue, when I switched to Polish lang, tabs are wider and Keybinds tab is not accessible/not visible at all. (I will try to change translation of Maintenance tab in Polish) Additionally sometimes some key combination Ctrl+Alt+C is locking in-game movement with WASD and mouse middle button - I can't rotate camera. Maybe not related with this PR |
Fixed Shift+S shortcut now works, also done Delete/Bkspace in the same way, but did not add a new saved inputkey for it. |
Just reviewing changed files and noticed the Russian translations were updated - was that you Kvakvs? (for changelog mention) And German too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lang update, other features working great, no issues with modal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks really good! Lots of good code cleanup too :)
Spotted a couple of methods with Str()
method name that isn't very descriptive. Some variance of using
clause location (suggest outside namespace considering we only have one namespace per file).
Doing in-game testing now...
Keybind options tab UI feels very solid. Tried everything I can think of and so far not been able to break it. It feels nice and responsive too, and looks really great. I noticed in code some stuff about row striping, but didn't see any on the UI? (not important, just mentioning it in case the rows were supposed to be striped) |
@aubergine10
The row striping code is still there. But in the old dialog the default background was grey-ish, and row striping code just cleared texture on some lines. In the new dialog i've no idea what the background sprite name is, so they are all black (i.e. not striped). Have to go into ModTool or UIHelper source and find the background sprite name which is used in other dialogs. |
Resolved merge conflict that was caused by #400 |
@aubergine10 You've already moved that +click task into #402 so that kind of removes it from here |
update Chinese translation of CitiesSkylinesMods/TMPE#382
Note to reviewers
Please review with "Ignore whitespace" (⚙️ button above the diff view)
Changes
GUI settings page for keyboard shortcuts.
TMPE main window and 6 most used tools can be used with keyboard.
Settings are automatically saved by ColossalFramework.
Tooltips are shown on the menu buttons for the current keyboard shortcut.
FIXME: Tooltip on main crown button is not shown.
Stay in lane Shift+S shortcut does work
Checklist
+click mouse combinations allowing to select only modifier keysMoved to Future stuff for keybinds tab #402