mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
Improve TreeItem API and allow to move nodes
This commit is contained in:
parent
92c04fa727
commit
bca0d36fe6
28 changed files with 527 additions and 289 deletions
|
|
@ -59,7 +59,7 @@ void VisualScriptPropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
|
|||
search_box->accept_event();
|
||||
|
||||
TreeItem *root = search_options->get_root();
|
||||
if (!root->get_children()) {
|
||||
if (!root->get_first_child()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
item->set_metadata(2, connecting);
|
||||
}
|
||||
|
||||
if (category && category->get_children() == nullptr) {
|
||||
if (category && category->get_first_child() == nullptr) {
|
||||
memdelete(category); //old category was unused
|
||||
}
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
found = true;
|
||||
}
|
||||
|
||||
get_ok_button()->set_disabled(root->get_children() == nullptr);
|
||||
get_ok_button()->set_disabled(root->get_first_child() == nullptr);
|
||||
}
|
||||
|
||||
void VisualScriptPropertySelector::create_visualscript_item(const String &name, TreeItem *const root, const String &search_input, const String &text) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue