瀏覽代碼

Use a yellow color for editable children properties instead of red

This matches the usual "Changes may be lost!" warning color.
Hugo Locurcio 3 年之前
父節點
當前提交
26671e7407
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      doc/classes/EditorProperty.xml
  2. 1 1
      editor/editor_inspector.cpp
  3. 1 1
      editor/editor_themes.cpp

+ 1 - 1
doc/classes/EditorProperty.xml

@@ -66,7 +66,7 @@
 			Used by the inspector, set to [code]true[/code] when the property is checked.
 		</member>
 		<member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
-			Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.
+			Used by the inspector, set to [code]true[/code] when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
 		</member>
 		<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
 			Used by the inspector, set to [code]true[/code] when the property can add keys for animation.

+ 1 - 1
editor/editor_inspector.cpp

@@ -209,7 +209,7 @@ void EditorProperty::_notification(int p_what) {
 
 		Color color;
 		if (draw_red) {
-			color = get_color("error_color");
+			color = get_color("warning_color");
 		} else {
 			color = get_color("property_color");
 		}

+ 1 - 1
editor/editor_themes.cpp

@@ -769,7 +769,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
 	theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg);
 	theme->set_stylebox("bg", "EditorProperty", Ref<StyleBoxEmpty>(memnew(StyleBoxEmpty)));
 	theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE);
-	theme->set_color("error_color", "EditorProperty", error_color);
+	theme->set_color("warning_color", "EditorProperty", warning_color);
 	theme->set_color("property_color", "EditorProperty", property_color);
 
 	theme->set_constant("inspector_margin", "Editor", 8 * EDSCALE);