summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-20 17:45:01 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-20 22:07:43 +0200
commit32dd9a9f668db31e348c5ef5bc181cdb91c07299 (patch)
tree66d9628611d85ca80f314ee9a65777880ee5ef11 /editor
parentf6c39830cb7cf0d664bdfa25642b333a1249b96f (diff)
ClassDB: Provide the enum name of integer constants
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp32
-rw-r--r--editor/editor_file_dialog.cpp18
-rw-r--r--editor/editor_plugin.cpp34
3 files changed, 42 insertions, 42 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index fe1dfa281c..597555b847 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -3323,22 +3323,22 @@ void EditorImportExport::_bind_methods() {
- BIND_CONSTANT( ACTION_NONE );
- BIND_CONSTANT( ACTION_COPY );
- BIND_CONSTANT( ACTION_BUNDLE );
-
- BIND_CONSTANT( EXPORT_SELECTED );
- BIND_CONSTANT( EXPORT_RESOURCES );
- BIND_CONSTANT( EXPORT_ALL );
-
- BIND_CONSTANT( IMAGE_ACTION_NONE );
- BIND_CONSTANT( IMAGE_ACTION_COMPRESS_DISK );
- BIND_CONSTANT( IMAGE_ACTION_COMPRESS_RAM );
- BIND_CONSTANT( IMAGE_ACTION_KEEP );
-
- BIND_CONSTANT( SCRIPT_ACTION_NONE );
- BIND_CONSTANT( SCRIPT_ACTION_COMPILE );
- BIND_CONSTANT( SCRIPT_ACTION_ENCRYPT );
+ BIND_ENUM_CONSTANT( ACTION_NONE );
+ BIND_ENUM_CONSTANT( ACTION_COPY );
+ BIND_ENUM_CONSTANT( ACTION_BUNDLE );
+
+ BIND_ENUM_CONSTANT( EXPORT_SELECTED );
+ BIND_ENUM_CONSTANT( EXPORT_RESOURCES );
+ BIND_ENUM_CONSTANT( EXPORT_ALL );
+
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_NONE );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_DISK );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_RAM );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_KEEP );
+
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_NONE );
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_COMPILE );
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_ENCRYPT );
};
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index d572ee8724..26dbc27136 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1187,15 +1187,15 @@ void EditorFileDialog::_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);
}
void EditorFileDialog::set_show_hidden_files(bool p_show) {
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index d8c8d419b9..f8ed18bba4 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -468,23 +468,23 @@ void EditorPlugin::_bind_methods() {
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath:String")));
ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name:String")));
- BIND_CONSTANT(CONTAINER_TOOLBAR);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM);
- BIND_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU);
- BIND_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE);
- BIND_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM);
-
- BIND_CONSTANT(DOCK_SLOT_LEFT_UL);
- BIND_CONSTANT(DOCK_SLOT_LEFT_BL);
- BIND_CONSTANT(DOCK_SLOT_LEFT_UR);
- BIND_CONSTANT(DOCK_SLOT_LEFT_BR);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_UL);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_BL);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_UR);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_BR);
- BIND_CONSTANT(DOCK_SLOT_MAX);
+ BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM);
+
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_BL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_BR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_UL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_BL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_UR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_BR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_MAX);
}
EditorPlugin::EditorPlugin() {