Lazy create menu and slider nodes in Tree

This commit is contained in:
Haoyu Qiu 2025-05-19 15:59:48 +08:00
parent 34f005d810
commit 7aa9174bc4
2 changed files with 49 additions and 44 deletions

View file

@ -33,6 +33,7 @@
#include "scene/gui/control.h"
#include "scene/resources/text_paragraph.h"
class VBoxContainer;
class HScrollBar;
class HSlider;
class LineEdit;
@ -529,6 +530,7 @@ private:
bool popup_edit_committed = true;
RID accessibility_scroll_element;
VBoxContainer *popup_editor_vb = nullptr;
Popup *popup_editor = nullptr;
LineEdit *line_editor = nullptr;
TextEdit *text_editor = nullptr;
@ -559,6 +561,8 @@ private:
void _text_editor_popup_modal_close();
void _text_editor_gui_input(const Ref<InputEvent> &p_event);
void value_editor_changed(double p_value);
void _update_popup_menu(const TreeItem::Cell &p_cell);
void _update_value_editor(const TreeItem::Cell &p_cell);
void popup_select(int p_option);