CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
574 stars 85 forks source link

Read elevation keybind from vanilla settings #1454

Closed krzychu124 closed 2 years ago

krzychu124 commented 2 years ago

Closes #1326

Changes in action:

https://user-images.githubusercontent.com/19638970/156675150-f5d06627-15f8-4955-a382-0fcfcca38929.mp4

originalfoo commented 2 years ago

I've done some brief testing in-game and it seems to work as advertised. Will do some more testing tomorrow.

kianzarrin commented 2 years ago

can't we just use the CS's keybind for this?

krzychu124 commented 2 years ago

can't we just use the CS's keybind for this?

It does exactly that... Previously it was hardcoded to PageUp/PageDown

kianzarrin commented 2 years ago

No I mean instead of adding an entry to TMPE options we can just use NetTool.m_buildElevationUp/Down insteaed

krzychu124 commented 2 years ago

Have you read the code? It's just read-only thing, not saved anywhere.

originalfoo commented 2 years ago

No I mean instead of adding an entry to TMPE options

The keybinds tab in TMPE options doubles-up as a quick reference guide for users, hence listing the elevation keybinds.

originalfoo commented 2 years ago

Oops - just noticed an issue with this PR:

image

Only one of those shortcuts will go to underground view, but both are listed as switching to undergound?

Maybe it should be context sensitive (using TrafficManagerTool.IsUndergroundMode to determine current mode) showing relevant shortcut key?

Edit: Alternatively the hint text could be Switch to undeground/overground view ?

krzychu124 commented 2 years ago

It's a translation on the Crowdin, needs the update 😉

originalfoo commented 2 years ago

I'll add to the locale updates list :)