summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2021-08-01 02:53:36 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2021-09-02 11:12:54 -0300
commitee4b0108e063c3124777a600065bf699cfd40765 (patch)
tree4beef4848320a6f7085a94c396a1479ef291803f /scene
parent29a3300c6aaa2c7915c39ad633dc3b0ce0a8505b (diff)
Make some enhancements to the POT generation
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/option_button.h4
-rw-r--r--scene/gui/popup_menu.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index d846e395ad..953337ecce 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -56,6 +56,10 @@ protected:
static void _bind_methods();
public:
+ // ATTENTION: This is used by the POT generator's scene parser. If the number of properties returned by `_get_items()` ever changes,
+ // this value should be updated to reflect the new size.
+ static const int ITEM_PROPERTY_SIZE = 5;
+
void add_icon_item(const Ref<Texture2D> &p_icon, const String &p_label, int p_id = -1);
void add_item(const String &p_label, int p_id = -1);
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index 5c427e43bc..428076c6da 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -144,6 +144,10 @@ protected:
static void _bind_methods();
public:
+ // ATTENTION: This is used by the POT generator's scene parser. If the number of properties returned by `_get_items()` ever changes,
+ // this value should be updated to reflect the new size.
+ static const int ITEM_PROPERTY_SIZE = 10;
+
void add_item(const String &p_label, int p_id = -1, uint32_t p_accel = 0);
void add_icon_item(const Ref<Texture2D> &p_icon, const String &p_label, int p_id = -1, uint32_t p_accel = 0);
void add_check_item(const String &p_label, int p_id = -1, uint32_t p_accel = 0);