diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e4aa56c8a..ce2b5ca44 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -37,6 +37,23 @@ #include "scene/gui/shortcut.h" #include "scene/main/timer.h" +PopupMenu::Item::Item() { + checked = false; + checkable_type = CHECKABLE_TYPE_NONE; + separator = false; + max_states = 0; + state = 0; + accel = 0; + disabled = false; + _ofs_cache = 0; + h_ofs = 0; + shortcut_is_global = false; + shortcut_is_disabled = false; +} + +PopupMenu::Item::~Item() { +} + String PopupMenu::_get_accel_text(int p_item) const { ERR_FAIL_INDEX_V(p_item, items.size(), String()); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index e2e367b93..949fbcb1f 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -33,6 +33,8 @@ #include "scene/gui/popup.h" +class ShortCut; + class PopupMenu : public Popup { GDCLASS(PopupMenu, Popup); @@ -61,19 +63,8 @@ class PopupMenu : public Popup { bool shortcut_is_global; bool shortcut_is_disabled; - Item() { - checked = false; - checkable_type = CHECKABLE_TYPE_NONE; - separator = false; - max_states = 0; - state = 0; - accel = 0; - disabled = false; - _ofs_cache = 0; - h_ofs = 0; - shortcut_is_global = false; - shortcut_is_disabled = false; - } + Item(); + ~Item(); }; Timer *submenu_timer;