-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
WIP: Readd support for comma decimal separator in editor #24532
Conversation
Fixes godotengine#24531, re-implements godotengine#6028 in new property editor.
So, how would you do |
Hm, didn't think about that. Should we make it optional, or just drop support for using comma as decimal separator in |
Would be really disappointing not to be able to use comma in decimal values in GUI widgets anymore to be honest. There's parts of the world where that's just how it's done, you know? ;) |
@akien-mga You need to change 2 things around here instead, I think, though I don't know if that doesn't have a side effect somewhere. |
Well, it won't work with |
I prefer this optional, even if my local system uses comma, using dot is less confusing, is consistent with programming languages and allows to use things like the expressions mentioned before. |
It's probably a bad idea anyway, the |
Given that it would break using commas for builtin methods like IINM, the only reason why some users may really want this is because some keyboard layouts have a "comma" key in place of the "dot" key in the numpad ( So maybe instead of replacing commas by dots in the input text, we could catch |
Sounds like a good compromise. And yes, the numpad really is the issue here (for me at least). |
Actually I was wrong, it currently reports "0" as scancode on X11. It's actually a So supporting detection of a keypress of this numpad comma will require some more work. I had a quick go at it, but it's too late for 3.1 so I'll look at it again later. |
France have comma too: https://brilliantmaps.com/decimals/ What about something simple like or even better try to replace and check if its float? (i dont do c++, but pseudo code is |
Not on numpad. http://www.ibt.ca/v2/items/btc5121w/images/azerty_1.jpg
That would start becoming quite involved if we need to parse the input strings all the time to check that, and that's also pretty random from an end user perspective.
That would break on |
Umm... Never heard about azerty, but It should not really matter what is printed on keyboard (i have dot on mine, too), what matter is your setting in system (i write comma every time i hit that numpad button, look: ",,," 🤣 ) I can go to Windows Setting (https://resrequest.helpspot.com/index.php?pg=kb.page&id=279) and change what is printed after i hit "dot on numpad". I really dont want to do that only for godot, becouse it break every other app i am using.
Actually thats the point 😄 I dont know c++, but in c# i would write it as
|
Let me say it this way: Doesnt matter what keyboard layout you have (qwertz, qwerty, azerty, chinese) - what matter is you We can swap your fancy keyboard for my cheap and dirty one and your keyboard will write comma on my desktop and my keyboard will write dot on your desktop. |
Fixes #24531, re-implements #6028 in new property editor.