summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/base_button.cpp12
-rw-r--r--scene/gui/box_container.cpp6
-rw-r--r--scene/gui/button.cpp6
-rw-r--r--scene/gui/control.cpp106
-rw-r--r--scene/gui/file_dialog.cpp19
-rw-r--r--scene/gui/graph_node.cpp6
-rw-r--r--scene/gui/item_list.cpp9
-rw-r--r--scene/gui/label.cpp18
-rw-r--r--scene/gui/line_edit.cpp24
-rw-r--r--scene/gui/line_edit.h1
-rw-r--r--scene/gui/link_button.cpp6
-rw-r--r--scene/gui/patch_9_rect.cpp6
-rw-r--r--scene/gui/popup.cpp1
-rw-r--r--scene/gui/rich_text_label.cpp40
-rw-r--r--scene/gui/split_container.cpp6
-rw-r--r--scene/gui/tabs.cpp18
-rw-r--r--scene/gui/text_edit.cpp20
-rw-r--r--scene/gui/text_edit.h3
-rw-r--r--scene/gui/texture_button.cpp14
-rw-r--r--scene/gui/texture_progress.cpp12
-rw-r--r--scene/gui/texture_progress.h2
-rw-r--r--scene/gui/texture_rect.cpp16
-rw-r--r--scene/gui/tree.cpp24
-rw-r--r--scene/gui/tree.h1
24 files changed, 192 insertions, 184 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 9c20decef0..9054063a4b 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -514,13 +514,13 @@ void BaseButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "ShortCut"), "set_shortcut", "get_shortcut");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "group", PROPERTY_HINT_RESOURCE_TYPE, "ButtonGroup"), "set_button_group", "get_button_group");
- BIND_CONSTANT(DRAW_NORMAL);
- BIND_CONSTANT(DRAW_PRESSED);
- BIND_CONSTANT(DRAW_HOVER);
- BIND_CONSTANT(DRAW_DISABLED);
+ BIND_ENUM_CONSTANT(DRAW_NORMAL);
+ BIND_ENUM_CONSTANT(DRAW_PRESSED);
+ BIND_ENUM_CONSTANT(DRAW_HOVER);
+ BIND_ENUM_CONSTANT(DRAW_DISABLED);
- BIND_CONSTANT(ACTION_MODE_BUTTON_PRESS);
- BIND_CONSTANT(ACTION_MODE_BUTTON_RELEASE);
+ BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_PRESS);
+ BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_RELEASE);
}
BaseButton::BaseButton() {
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index 16b2cfa083..2cc4be96a7 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -295,9 +295,9 @@ void BoxContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_alignment"), &BoxContainer::get_alignment);
ClassDB::bind_method(D_METHOD("set_alignment", "alignment"), &BoxContainer::set_alignment);
- BIND_CONSTANT(ALIGN_BEGIN);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_END);
+ BIND_ENUM_CONSTANT(ALIGN_BEGIN);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_END);
ADD_PROPERTY(PropertyInfo(Variant::INT, "alignment", PROPERTY_HINT_ENUM, "Begin,Center,End"), "set_alignment", "get_alignment");
}
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 5036e4f7f6..c8838f3eca 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -245,9 +245,9 @@ void Button::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_text_align"), &Button::get_text_align);
ClassDB::bind_method(D_METHOD("is_flat"), &Button::is_flat);
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_button_icon", "get_button_icon");
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c97426ad42..08ff12f878 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2634,9 +2634,9 @@ void Control::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
- BIND_CONSTANT(FOCUS_NONE);
- BIND_CONSTANT(FOCUS_CLICK);
- BIND_CONSTANT(FOCUS_ALL);
+ BIND_ENUM_CONSTANT(FOCUS_NONE);
+ BIND_ENUM_CONSTANT(FOCUS_CLICK);
+ BIND_ENUM_CONSTANT(FOCUS_ALL);
BIND_CONSTANT(NOTIFICATION_RESIZED);
BIND_CONSTANT(NOTIFICATION_MOUSE_ENTER);
@@ -2646,56 +2646,56 @@ void Control::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_THEME_CHANGED);
BIND_CONSTANT(NOTIFICATION_MODAL_CLOSE);
- BIND_CONSTANT(CURSOR_ARROW);
- BIND_CONSTANT(CURSOR_IBEAM);
- BIND_CONSTANT(CURSOR_POINTING_HAND);
- BIND_CONSTANT(CURSOR_CROSS);
- BIND_CONSTANT(CURSOR_WAIT);
- BIND_CONSTANT(CURSOR_BUSY);
- BIND_CONSTANT(CURSOR_DRAG);
- BIND_CONSTANT(CURSOR_CAN_DROP);
- BIND_CONSTANT(CURSOR_FORBIDDEN);
- BIND_CONSTANT(CURSOR_VSIZE);
- BIND_CONSTANT(CURSOR_HSIZE);
- BIND_CONSTANT(CURSOR_BDIAGSIZE);
- BIND_CONSTANT(CURSOR_FDIAGSIZE);
- BIND_CONSTANT(CURSOR_MOVE);
- BIND_CONSTANT(CURSOR_VSPLIT);
- BIND_CONSTANT(CURSOR_HSPLIT);
- BIND_CONSTANT(CURSOR_HELP);
-
- BIND_CONSTANT(PRESET_TOP_LEFT);
- BIND_CONSTANT(PRESET_TOP_RIGHT);
- BIND_CONSTANT(PRESET_BOTTOM_LEFT);
- BIND_CONSTANT(PRESET_BOTTOM_RIGHT);
- BIND_CONSTANT(PRESET_CENTER_LEFT);
- BIND_CONSTANT(PRESET_CENTER_TOP);
- BIND_CONSTANT(PRESET_CENTER_RIGHT);
- BIND_CONSTANT(PRESET_CENTER_BOTTOM);
- BIND_CONSTANT(PRESET_CENTER);
- BIND_CONSTANT(PRESET_LEFT_WIDE);
- BIND_CONSTANT(PRESET_TOP_WIDE);
- BIND_CONSTANT(PRESET_RIGHT_WIDE);
- BIND_CONSTANT(PRESET_BOTTOM_WIDE);
- BIND_CONSTANT(PRESET_VCENTER_WIDE);
- BIND_CONSTANT(PRESET_HCENTER_WIDE);
- BIND_CONSTANT(PRESET_WIDE);
-
- BIND_CONSTANT(SIZE_EXPAND);
- BIND_CONSTANT(SIZE_FILL);
- BIND_CONSTANT(SIZE_EXPAND_FILL);
- BIND_CONSTANT(SIZE_SHRINK_CENTER);
- BIND_CONSTANT(SIZE_SHRINK_END);
-
- BIND_CONSTANT(MOUSE_FILTER_STOP);
- BIND_CONSTANT(MOUSE_FILTER_PASS);
- BIND_CONSTANT(MOUSE_FILTER_IGNORE);
-
- BIND_CONSTANT(GROW_DIRECTION_BEGIN);
- BIND_CONSTANT(GROW_DIRECTION_END);
-
- BIND_CONSTANT(ANCHOR_BEGIN);
- BIND_CONSTANT(ANCHOR_END);
+ BIND_ENUM_CONSTANT(CURSOR_ARROW);
+ BIND_ENUM_CONSTANT(CURSOR_IBEAM);
+ BIND_ENUM_CONSTANT(CURSOR_POINTING_HAND);
+ BIND_ENUM_CONSTANT(CURSOR_CROSS);
+ BIND_ENUM_CONSTANT(CURSOR_WAIT);
+ BIND_ENUM_CONSTANT(CURSOR_BUSY);
+ BIND_ENUM_CONSTANT(CURSOR_DRAG);
+ BIND_ENUM_CONSTANT(CURSOR_CAN_DROP);
+ BIND_ENUM_CONSTANT(CURSOR_FORBIDDEN);
+ BIND_ENUM_CONSTANT(CURSOR_VSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_HSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_BDIAGSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_FDIAGSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_MOVE);
+ BIND_ENUM_CONSTANT(CURSOR_VSPLIT);
+ BIND_ENUM_CONSTANT(CURSOR_HSPLIT);
+ BIND_ENUM_CONSTANT(CURSOR_HELP);
+
+ BIND_ENUM_CONSTANT(PRESET_TOP_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_TOP_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_TOP);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_BOTTOM);
+ BIND_ENUM_CONSTANT(PRESET_CENTER);
+ BIND_ENUM_CONSTANT(PRESET_LEFT_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_TOP_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_RIGHT_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_VCENTER_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_HCENTER_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_WIDE);
+
+ BIND_ENUM_CONSTANT(SIZE_EXPAND);
+ BIND_ENUM_CONSTANT(SIZE_FILL);
+ BIND_ENUM_CONSTANT(SIZE_EXPAND_FILL);
+ BIND_ENUM_CONSTANT(SIZE_SHRINK_CENTER);
+ BIND_ENUM_CONSTANT(SIZE_SHRINK_END);
+
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_STOP);
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_PASS);
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_IGNORE);
+
+ BIND_ENUM_CONSTANT(GROW_DIRECTION_BEGIN);
+ BIND_ENUM_CONSTANT(GROW_DIRECTION_END);
+
+ BIND_ENUM_CONSTANT(ANCHOR_BEGIN);
+ BIND_ENUM_CONSTANT(ANCHOR_END);
ADD_SIGNAL(MethodInfo("resized"));
ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index b3530c2971..0b898c4d2e 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -718,16 +718,15 @@ void FileDialog::_bind_methods() {
ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths")));
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
- BIND_CONSTANT(MODE_OPEN_FILE);
- BIND_CONSTANT(MODE_OPEN_FILES);
- BIND_CONSTANT(MODE_OPEN_DIR);
- BIND_CONSTANT(MODE_OPEN_ANY);
-
- BIND_CONSTANT(MODE_SAVE_FILE);
-
- BIND_CONSTANT(ACCESS_RESOURCES);
- BIND_CONSTANT(ACCESS_USERDATA);
- BIND_CONSTANT(ACCESS_FILESYSTEM);
+ BIND_ENUM_CONSTANT(MODE_OPEN_FILE);
+ BIND_ENUM_CONSTANT(MODE_OPEN_FILES);
+ BIND_ENUM_CONSTANT(MODE_OPEN_DIR);
+ BIND_ENUM_CONSTANT(MODE_OPEN_ANY);
+ BIND_ENUM_CONSTANT(MODE_SAVE_FILE);
+
+ BIND_ENUM_CONSTANT(ACCESS_RESOURCES);
+ BIND_ENUM_CONSTANT(ACCESS_USERDATA);
+ BIND_ENUM_CONSTANT(ACCESS_FILESYSTEM);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access");
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index b9062295b5..4b4ecc5e98 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -710,9 +710,9 @@ void GraphNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("close_request"));
ADD_SIGNAL(MethodInfo("resize_request", PropertyInfo(Variant::VECTOR2, "new_minsize")));
- BIND_CONSTANT(OVERLAY_DISABLED);
- BIND_CONSTANT(OVERLAY_BREAKPOINT);
- BIND_CONSTANT(OVERLAY_POSITION);
+ BIND_ENUM_CONSTANT(OVERLAY_DISABLED);
+ BIND_ENUM_CONSTANT(OVERLAY_BREAKPOINT);
+ BIND_ENUM_CONSTANT(OVERLAY_POSITION);
}
GraphNode::GraphNode() {
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index b30a6000ff..c7889a6cf2 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1374,10 +1374,11 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
- BIND_CONSTANT(ICON_MODE_TOP);
- BIND_CONSTANT(ICON_MODE_LEFT);
- BIND_CONSTANT(SELECT_SINGLE);
- BIND_CONSTANT(SELECT_MULTI);
+ BIND_ENUM_CONSTANT(ICON_MODE_TOP);
+ BIND_ENUM_CONSTANT(ICON_MODE_LEFT);
+
+ BIND_ENUM_CONSTANT(SELECT_SINGLE);
+ BIND_ENUM_CONSTANT(SELECT_MULTI);
ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::VECTOR2, "atpos")));
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 84074f96a8..cf7303cbe7 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -644,15 +644,15 @@ void Label::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_max_lines_visible", "lines_visible"), &Label::set_max_lines_visible);
ClassDB::bind_method(D_METHOD("get_max_lines_visible"), &Label::get_max_lines_visible);
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(VALIGN_TOP);
- BIND_CONSTANT(VALIGN_CENTER);
- BIND_CONSTANT(VALIGN_BOTTOM);
- BIND_CONSTANT(VALIGN_FILL);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(VALIGN_TOP);
+ BIND_ENUM_CONSTANT(VALIGN_CENTER);
+ BIND_ENUM_CONSTANT(VALIGN_BOTTOM);
+ BIND_ENUM_CONSTANT(VALIGN_FILL);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index e91f8add31..24c1f73667 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1352,18 +1352,18 @@ void LineEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "text")));
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(MENU_CUT);
- BIND_CONSTANT(MENU_COPY);
- BIND_CONSTANT(MENU_PASTE);
- BIND_CONSTANT(MENU_CLEAR);
- BIND_CONSTANT(MENU_SELECT_ALL);
- BIND_CONSTANT(MENU_UNDO);
- BIND_CONSTANT(MENU_MAX);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(MENU_CUT);
+ BIND_ENUM_CONSTANT(MENU_COPY);
+ BIND_ENUM_CONSTANT(MENU_PASTE);
+ BIND_ENUM_CONSTANT(MENU_CLEAR);
+ BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
+ BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_MAX);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index fb0eaa9446..7d04e4618b 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -186,5 +186,6 @@ public:
};
VARIANT_ENUM_CAST(LineEdit::Align);
+VARIANT_ENUM_CAST(LineEdit::MenuItems);
#endif
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 9cb67b75e2..632e9ec4fc 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -130,9 +130,9 @@ void LinkButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_underline_mode", "underline_mode"), &LinkButton::set_underline_mode);
ClassDB::bind_method(D_METHOD("get_underline_mode"), &LinkButton::get_underline_mode);
- BIND_CONSTANT(UNDERLINE_MODE_ALWAYS);
- BIND_CONSTANT(UNDERLINE_MODE_ON_HOVER);
- BIND_CONSTANT(UNDERLINE_MODE_NEVER);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_ALWAYS);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_ON_HOVER);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_NEVER);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "underline", PROPERTY_HINT_ENUM, "Always,On Hover,Never"), "set_underline_mode", "get_underline_mode");
diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp
index 249090830d..71cbef495c 100644
--- a/scene/gui/patch_9_rect.cpp
+++ b/scene/gui/patch_9_rect.cpp
@@ -82,9 +82,9 @@ void NinePatchRect::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");
- BIND_CONSTANT(AXIS_STRETCH_MODE_STRETCH);
- BIND_CONSTANT(AXIS_STRETCH_MODE_TILE);
- BIND_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_STRETCH);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
}
void NinePatchRect::set_texture(const Ref<Texture> &p_tex) {
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index b21139f969..ebf18bad41 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -247,6 +247,7 @@ void Popup::_bind_methods() {
ADD_SIGNAL(MethodInfo("popup_hide"));
ADD_GROUP("Popup", "popup_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "popup_exclusive"), "set_exclusive", "is_exclusive");
+
BIND_CONSTANT(NOTIFICATION_POST_POPUP);
BIND_CONSTANT(NOTIFICATION_POPUP_HIDE);
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 42084ade25..f0efbdc517 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1915,26 +1915,26 @@ void RichTextLabel::_bind_methods() {
ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta")));
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(LIST_NUMBERS);
- BIND_CONSTANT(LIST_LETTERS);
- BIND_CONSTANT(LIST_DOTS);
-
- BIND_CONSTANT(ITEM_FRAME);
- BIND_CONSTANT(ITEM_TEXT);
- BIND_CONSTANT(ITEM_IMAGE);
- BIND_CONSTANT(ITEM_NEWLINE);
- BIND_CONSTANT(ITEM_FONT);
- BIND_CONSTANT(ITEM_COLOR);
- BIND_CONSTANT(ITEM_UNDERLINE);
- BIND_CONSTANT(ITEM_ALIGN);
- BIND_CONSTANT(ITEM_INDENT);
- BIND_CONSTANT(ITEM_LIST);
- BIND_CONSTANT(ITEM_META);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(LIST_NUMBERS);
+ BIND_ENUM_CONSTANT(LIST_LETTERS);
+ BIND_ENUM_CONSTANT(LIST_DOTS);
+
+ BIND_ENUM_CONSTANT(ITEM_FRAME);
+ BIND_ENUM_CONSTANT(ITEM_TEXT);
+ BIND_ENUM_CONSTANT(ITEM_IMAGE);
+ BIND_ENUM_CONSTANT(ITEM_NEWLINE);
+ BIND_ENUM_CONSTANT(ITEM_FONT);
+ BIND_ENUM_CONSTANT(ITEM_COLOR);
+ BIND_ENUM_CONSTANT(ITEM_UNDERLINE);
+ BIND_ENUM_CONSTANT(ITEM_ALIGN);
+ BIND_ENUM_CONSTANT(ITEM_INDENT);
+ BIND_ENUM_CONSTANT(ITEM_LIST);
+ BIND_ENUM_CONSTANT(ITEM_META);
}
void RichTextLabel::set_visible_characters(int p_visible) {
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index e3dad08809..5fc3db4672 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -410,9 +410,9 @@ void SplitContainer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collapsed"), "set_collapsed", "is_collapsed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "dragger_visibility", PROPERTY_HINT_ENUM, "Visible,Hidden,Hidden & Collapsed"), "set_dragger_visibility", "get_dragger_visibility");
- BIND_CONSTANT(DRAGGER_VISIBLE);
- BIND_CONSTANT(DRAGGER_HIDDEN);
- BIND_CONSTANT(DRAGGER_HIDDEN_COLLAPSED);
+ BIND_ENUM_CONSTANT(DRAGGER_VISIBLE);
+ BIND_ENUM_CONSTANT(DRAGGER_HIDDEN);
+ BIND_ENUM_CONSTANT(DRAGGER_HIDDEN_COLLAPSED);
}
SplitContainer::SplitContainer(bool p_vertical) {
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index acffbbc499..b0dc88bbb4 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -815,15 +815,15 @@ void Tabs::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "tab_close_display_policy", PROPERTY_HINT_ENUM, "Show Never,Show Active Only,Show Always"), "set_tab_close_display_policy", "get_tab_close_display_policy");
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_MAX);
-
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS);
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_NEVER);
- BIND_CONSTANT(CLOSE_BUTTON_MAX);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_MAX);
+
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_NEVER);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_MAX);
}
Tabs::Tabs() {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f99cbbad89..1ae347c79b 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4704,9 +4704,9 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_click_selection_held"), &TextEdit::_click_selection_held);
ClassDB::bind_method(D_METHOD("_toggle_draw_caret"), &TextEdit::_toggle_draw_caret);
- BIND_CONSTANT(SEARCH_MATCH_CASE);
- BIND_CONSTANT(SEARCH_WHOLE_WORDS);
- BIND_CONSTANT(SEARCH_BACKWARDS);
+ BIND_ENUM_CONSTANT(SEARCH_MATCH_CASE);
+ BIND_ENUM_CONSTANT(SEARCH_WHOLE_WORDS);
+ BIND_ENUM_CONSTANT(SEARCH_BACKWARDS);
/*
ClassDB::bind_method(D_METHOD("delete_char"),&TextEdit::delete_char);
@@ -4789,13 +4789,13 @@ void TextEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("breakpoint_toggled", PropertyInfo(Variant::INT, "row")));
ADD_SIGNAL(MethodInfo("symbol_lookup", PropertyInfo(Variant::STRING, "symbol"), PropertyInfo(Variant::INT, "row"), PropertyInfo(Variant::INT, "column")));
- BIND_CONSTANT(MENU_CUT);
- BIND_CONSTANT(MENU_COPY);
- BIND_CONSTANT(MENU_PASTE);
- BIND_CONSTANT(MENU_CLEAR);
- BIND_CONSTANT(MENU_SELECT_ALL);
- BIND_CONSTANT(MENU_UNDO);
- BIND_CONSTANT(MENU_MAX);
+ BIND_ENUM_CONSTANT(MENU_CUT);
+ BIND_ENUM_CONSTANT(MENU_COPY);
+ BIND_ENUM_CONSTANT(MENU_PASTE);
+ BIND_ENUM_CONSTANT(MENU_CLEAR);
+ BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
+ BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_MAX);
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
}
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index c4e0700531..96d6625bc4 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -535,4 +535,7 @@ public:
~TextEdit();
};
+VARIANT_ENUM_CAST(TextEdit::MenuItems);
+VARIANT_ENUM_CAST(TextEdit::SearchFlags);
+
#endif // TEXT_EDIT_H
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 7abf8380ce..d307b463d9 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -208,13 +208,13 @@ void TextureButton::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand", PROPERTY_HINT_RESOURCE_TYPE, "bool"), "set_expand", "get_expand");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "stretch_mode", PROPERTY_HINT_ENUM, "Scale,Tile,Keep,Keep Centered,Keep Aspect,Keep Aspect Centered,Keep Aspect Covered"), "set_stretch_mode", "get_stretch_mode");
- BIND_CONSTANT(STRETCH_SCALE);
- BIND_CONSTANT(STRETCH_TILE);
- BIND_CONSTANT(STRETCH_KEEP);
- BIND_CONSTANT(STRETCH_KEEP_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE);
+ BIND_ENUM_CONSTANT(STRETCH_TILE);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
}
void TextureButton::set_normal_texture(const Ref<Texture> &p_normal) {
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 081c7ddb73..b45c783919 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -273,12 +273,12 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");
- BIND_CONSTANT(FILL_LEFT_TO_RIGHT);
- BIND_CONSTANT(FILL_RIGHT_TO_LEFT);
- BIND_CONSTANT(FILL_TOP_TO_BOTTOM);
- BIND_CONSTANT(FILL_BOTTOM_TO_TOP);
- BIND_CONSTANT(FILL_CLOCKWISE);
- BIND_CONSTANT(FILL_COUNTER_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_LEFT_TO_RIGHT);
+ BIND_ENUM_CONSTANT(FILL_RIGHT_TO_LEFT);
+ BIND_ENUM_CONSTANT(FILL_TOP_TO_BOTTOM);
+ BIND_ENUM_CONSTANT(FILL_BOTTOM_TO_TOP);
+ BIND_ENUM_CONSTANT(FILL_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_COUNTER_CLOCKWISE);
}
TextureProgress::TextureProgress() {
diff --git a/scene/gui/texture_progress.h b/scene/gui/texture_progress.h
index c0c2779cf9..3c018febf3 100644
--- a/scene/gui/texture_progress.h
+++ b/scene/gui/texture_progress.h
@@ -89,4 +89,6 @@ private:
Point2 get_relative_center();
};
+VARIANT_ENUM_CAST(TextureProgress::FillMode);
+
#endif // TEXTURE_PROGRESS_H
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index 92a3db6a74..db340fd4d7 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -112,14 +112,14 @@ void TextureRect::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand");
ADD_PROPERTYNO(PropertyInfo(Variant::INT, "stretch_mode", PROPERTY_HINT_ENUM, "Scale On Expand (Compat),Scale,Tile,Keep,Keep Centered,Keep Aspect,Keep Aspect Centered,Keep Aspect Covered"), "set_stretch_mode", "get_stretch_mode");
- BIND_CONSTANT(STRETCH_SCALE_ON_EXPAND);
- BIND_CONSTANT(STRETCH_SCALE);
- BIND_CONSTANT(STRETCH_TILE);
- BIND_CONSTANT(STRETCH_KEEP);
- BIND_CONSTANT(STRETCH_KEEP_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE_ON_EXPAND);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE);
+ BIND_ENUM_CONSTANT(STRETCH_TILE);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
}
void TextureRect::set_texture(const Ref<Texture> &p_tex) {
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 3e8d8aed8a..f819574e93 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -752,12 +752,12 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_disable_folding", "disable"), &TreeItem::set_disable_folding);
ClassDB::bind_method(D_METHOD("is_folding_disabled"), &TreeItem::is_folding_disabled);
- BIND_CONSTANT(CELL_MODE_STRING);
- BIND_CONSTANT(CELL_MODE_CHECK);
- BIND_CONSTANT(CELL_MODE_RANGE);
- BIND_CONSTANT(CELL_MODE_RANGE_EXPRESSION);
- BIND_CONSTANT(CELL_MODE_ICON);
- BIND_CONSTANT(CELL_MODE_CUSTOM);
+ BIND_ENUM_CONSTANT(CELL_MODE_STRING);
+ BIND_ENUM_CONSTANT(CELL_MODE_CHECK);
+ BIND_ENUM_CONSTANT(CELL_MODE_RANGE);
+ BIND_ENUM_CONSTANT(CELL_MODE_RANGE_EXPRESSION);
+ BIND_ENUM_CONSTANT(CELL_MODE_ICON);
+ BIND_ENUM_CONSTANT(CELL_MODE_CUSTOM);
}
void TreeItem::clear_children() {
@@ -3658,13 +3658,13 @@ void Tree::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_activated"));
ADD_SIGNAL(MethodInfo("column_title_pressed", PropertyInfo(Variant::INT, "column")));
- BIND_CONSTANT(SELECT_SINGLE);
- BIND_CONSTANT(SELECT_ROW);
- BIND_CONSTANT(SELECT_MULTI);
+ BIND_ENUM_CONSTANT(SELECT_SINGLE);
+ BIND_ENUM_CONSTANT(SELECT_ROW);
+ BIND_ENUM_CONSTANT(SELECT_MULTI);
- BIND_CONSTANT(DROP_MODE_DISABLED);
- BIND_CONSTANT(DROP_MODE_ON_ITEM);
- BIND_CONSTANT(DROP_MODE_INBETWEEN);
+ BIND_ENUM_CONSTANT(DROP_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(DROP_MODE_ON_ITEM);
+ BIND_ENUM_CONSTANT(DROP_MODE_INBETWEEN);
}
Tree::Tree() {
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 1e46956cd9..49a410f115 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -583,4 +583,5 @@ public:
};
VARIANT_ENUM_CAST(Tree::SelectMode);
+VARIANT_ENUM_CAST(Tree::DropModeFlags);
#endif