summaryrefslogtreecommitdiff
path: root/tools/editor/property_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/property_editor.cpp')
-rw-r--r--tools/editor/property_editor.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 380eb247bb..de10e68f33 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -91,6 +91,15 @@ void CustomPropertyEditor::_menu_option(int p_which) {
}
} break;
+ case Variant::STRING: {
+
+ if (hint==PROPERTY_HINT_ENUM) {
+
+ v=hint_text.get_slice(",",p_which);
+ emit_signal("variant_changed");
+
+ }
+ } break;
case Variant::OBJECT: {
switch(p_which) {
@@ -446,7 +455,16 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
config_action_buttons(names);
} else if (hint==PROPERTY_HINT_ENUM) {
-
+ menu->clear();
+ Vector<String> options = hint_text.split(",");
+ for(int i=0;i<options.size();i++) {
+ menu->add_item(options[i],i);
+ }
+ menu->set_pos(get_pos());
+ menu->popup();
+ hide();
+ updating=false;
+ return false;
} else if (hint==PROPERTY_HINT_MULTILINE_TEXT) {
@@ -4539,7 +4557,7 @@ void SectionedPropertyEditor::update_category_list() {
else if ( !(pi.usage&PROPERTY_USAGE_EDITOR) )
continue;
- if (pi.name.find(":")!=-1 || pi.name=="script/script")
+ if (pi.name.find(":")!=-1 || pi.name=="script/script" || pi.name.begins_with("resource/"))
continue;
int sp = pi.name.find("/");
if (sp!=-1) {