Strdate / AutomaticRoundaboutBuilder

Cities Skylines mod
19 stars 12 forks source link

+ Button not recognized #4

Closed DerGatt closed 4 years ago

DerGatt commented 5 years ago

Hello, thanks for this mod. I stumbled onto a bug the keyboard + Button is not working. I'm running Steam on Linux. I did some troubleshooting, that's what I found. Main keyboard is enabled ( - is working fine). I tried and checked if I can assign + to another shortcut. If I do it's recognized as "Plus" button not as "+". The - button show as "-". I had a look at the code and saw that ModThreading.cs line 78 is set to Input.GetKey("="). City Skline refuses to compile this mod on boot so I can't try and change this.

Strdate commented 5 years ago

Nice find! I was interested how many people will ever notice that :D The layout was chosen so it works well on the English keyboard. At the time I programmed that I wanted to hardcode the buttons to be the two right from zero on English keyboard, but as I'am quite inexperienced with Unity I didn't know how to do that. Thus the location of the buttons might move when you use different keyboard language. Besides I wanted that you don't need to press the shift button of course. I feel a bit bad to ask, but do you know how to get out of this situation?

DerGatt commented 5 years ago

Hi, i just created a pull request #5 . Maybe this way the keybinding can be set in the options menu.

Strdate commented 5 years ago

The mod is now updated (you can bind the keys to whatever you want)

DerGatt commented 5 years ago

Thanks for this update. I had a look at it, I thought it would be way simpler :). This is my first time modding anything. I just recently pick up C:S and used your mod, I got curious why the key wasn't working and hat a look at it.

Strdate commented 5 years ago

I've already been doing this in another mod, so it was just about copying some code. Hope this will inspire you to maybe create a mod yourself one day :)