-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Exposed Control::focus_mode to the scene editor #4300
Conversation
Actually, hold on one sec. I realised that if you replace a non-interactive control with something like a button, this property gets carried over. |
Any update @leezh? :) |
@leezh I don't understand your last comment. What's wrong with the property being carried? AFAIK, all Control derived classes can change its focus mode. |
Basically, when you create a control, like a frame, the initial property is FOCUS_NONE. Later on, if you use the replace node tool to change it to say, a button, that property is still going to be FOCUS_NONE. It's not too bad if you remember to change it, but there's no way a beginer would've noticed it. In fact, it's annoying that you have to change it every time you replace a node. And that's my issue. I've been trying to get it to be like one of those custom theme properties (where you can check and uncheck whether the property is actually saved) but I can't get it to work right. |
IMO it's fine that way. |
Resetting properties to their default value when changing the node type is a more global issue IMO, it also happens for signals for example. As long as it's not a regression, it should not be blocking for this PR. |
The last commit seems not to build:
(see travis logs) |
The PR needs rebasing, and still fails to build. |
Ah, sorry. Was busy with my thesis until last week. Haven't had a time to sit down and fix this. It was a |
Exposed `get_focus_mode()` to the script Added `focus_mode` to the property panels for line-edit and sliders Added `enabled_focus_mode` to the property panels for buttons enabled_focus_mode is used when button is enabled/disabled
Fixed the problems I made in the last commit and squashed them all together. So what's changed now is that the property is exposed only to a few control types that makes sense. Also, because of how the BaseButton can switch back and forth when enabling/disabling, I found it far more useful to have an enabled_focus_mode property instead. |
Allows fine-tuning of tab focusing without using scripts.
Exposed
get_focus_mode()
to the scriptAdded
focus_mode
to the property panels for line-edit and slidersAdded
enabled_focus_mode
to the property panels for buttonsenabled_focus_mode is used when button is enabled/disabled