diff options
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r-- | editor/editor_properties.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 42ef650adc..fdb0360d6b 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -33,6 +33,7 @@ #include "editor/create_dialog.h" #include "editor/editor_inspector.h" +#include "editor/editor_locale_dialog.h" #include "editor/editor_resource_picker.h" #include "editor/editor_spin_slider.h" #include "editor/property_selector.h" @@ -153,6 +154,26 @@ public: EditorPropertyPath(); }; +class EditorPropertyLocale : public EditorProperty { + GDCLASS(EditorPropertyLocale, EditorProperty); + EditorLocaleDialog *dialog; + LineEdit *locale; + Button *locale_edit; + + void _locale_selected(const String &p_locale); + void _locale_pressed(); + void _locale_focus_exited(); + +protected: + static void _bind_methods(); + void _notification(int p_what); + +public: + void setup(const String &p_hit_string); + virtual void update_property() override; + EditorPropertyLocale(); +}; + class EditorPropertyClassName : public EditorProperty { GDCLASS(EditorPropertyClassName, EditorProperty); @@ -625,6 +646,10 @@ class EditorPropertyNodePath : public EditorProperty { void _node_assign(); void _node_clear(); + bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; + void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); + bool is_drop_valid(const Dictionary &p_drag_data) const; + protected: virtual void _set_read_only(bool p_read_only) override; static void _bind_methods(); @@ -662,7 +687,7 @@ class EditorPropertyResource : public EditorProperty { void _viewport_selected(const NodePath &p_path); - void _sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool); + void _sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool p_advance); void _sub_inspector_resource_selected(const RES &p_resource, const String &p_property); void _sub_inspector_object_id_selected(int p_id); |