You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Editor: Focus value editor on type change in Dictionary and Array editors
This commit is contained in:
@@ -652,6 +652,19 @@ void EditorProperty::add_focusable(Control *p_control) {
|
||||
focusables.push_back(p_control);
|
||||
}
|
||||
|
||||
void EditorProperty::grab_focus(int p_focusable) {
|
||||
if (focusables.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_focusable >= 0) {
|
||||
ERR_FAIL_INDEX(p_focusable, focusables.size());
|
||||
focusables[p_focusable]->grab_focus();
|
||||
} else {
|
||||
focusables[0]->grab_focus();
|
||||
}
|
||||
}
|
||||
|
||||
void EditorProperty::select(int p_focusable) {
|
||||
bool already_selected = selected;
|
||||
if (!selectable) {
|
||||
|
||||
Reference in New Issue
Block a user