diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-03-23 09:46:59 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-03-28 18:52:09 +0800 |
commit | ccde2bf66fabe319095a9dc3b91cf071313142ba (patch) | |
tree | 74b6919ac49b9be22362878b67acbd46dab78bc9 /editor/editor_property_name_processor.h | |
parent | 6b2481fcfee06c1c946c59cf3f9b21347573d339 (diff) | |
download | redot-engine-ccde2bf66fabe319095a9dc3b91cf071313142ba.tar.gz |
Add property name style toggle to Inspector
Diffstat (limited to 'editor/editor_property_name_processor.h')
-rw-r--r-- | editor/editor_property_name_processor.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/editor/editor_property_name_processor.h b/editor/editor_property_name_processor.h index 616c4cac46..351736550f 100644 --- a/editor/editor_property_name_processor.h +++ b/editor/editor_property_name_processor.h @@ -41,16 +41,27 @@ class EditorPropertyNameProcessor : public Node { mutable Map<String, String> capitalize_string_cache; Map<String, String> capitalize_string_remaps; + // Capitalizes property path segments. String _capitalize_name(const String &p_name) const; public: + // Matches `interface/inspector/capitalize_properties` editor setting. + enum Style { + STYLE_RAW, + STYLE_CAPITALIZED, + STYLE_LOCALIZED, + }; + static EditorPropertyNameProcessor *get_singleton() { return singleton; } - // Capitalize & localize property path segments. - String process_name(const String &p_name) const; + static Style get_default_inspector_style(); + static Style get_settings_style(); + static Style get_tooltip_style(Style p_style); + + static bool is_localization_available(); - // Make tooltip string for names processed by process_name(). - String make_tooltip_for_name(const String &p_name) const; + // Turns property path segment into the given style. + String process_name(const String &p_name, Style p_style) const; EditorPropertyNameProcessor(); ~EditorPropertyNameProcessor(); |