You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Tweak property name style selector in the editor inspector
A preview is now displayed in the options' text: - Raw (e.g. "z_index") - Capitalized (e.g. "Z Index") - Localized (e.g. "Z Index") - "Z Index" is localized in the user's language.
This commit is contained in:
@@ -541,9 +541,10 @@ void InspectorDock::update(Object *p_object) {
|
||||
p->add_shortcut(ED_SHORTCUT("property_editor/expand_revertable", TTR("Expand Non-Default")), EXPAND_REVERTABLE);
|
||||
|
||||
p->add_separator(TTR("Property Name Style"));
|
||||
p->add_radio_check_item(TTR("Raw"), PROPERTY_NAME_STYLE_RAW);
|
||||
p->add_radio_check_item(TTR("Capitalized"), PROPERTY_NAME_STYLE_CAPITALIZED);
|
||||
p->add_radio_check_item(TTR("Localized"), PROPERTY_NAME_STYLE_LOCALIZED);
|
||||
p->add_radio_check_item(vformat(TTR("Raw (e.g. \"%s\")"), "z_index"), PROPERTY_NAME_STYLE_RAW);
|
||||
p->add_radio_check_item(vformat(TTR("Capitalized (e.g. \"%s\")"), "Z Index"), PROPERTY_NAME_STYLE_CAPITALIZED);
|
||||
// TRANSLATORS: "Z Index" should match the existing translated CanvasItem property name in the current language you're working on.
|
||||
p->add_radio_check_item(TTR("Localized (e.g. \"Z Index\")"), PROPERTY_NAME_STYLE_LOCALIZED);
|
||||
|
||||
if (!EditorPropertyNameProcessor::is_localization_available()) {
|
||||
const int index = p->get_item_index(PROPERTY_NAME_STYLE_LOCALIZED);
|
||||
|
||||
Reference in New Issue
Block a user