瀏覽代碼

Minor improvements to the view rotation gizmo

Lightning_A 4 年之前
父節點
當前提交
6280c66f04
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      editor/plugins/spatial_editor_plugin.cpp

+ 4 - 2
editor/plugins/spatial_editor_plugin.cpp

@@ -136,9 +136,11 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
 	}
 
 	if (front) {
-		String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z");
 		draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS, c);
-		draw_char(get_font("rotation_control", "EditorFonts"), p_axis.screen_point + Vector2(-4.0, 5.0) * EDSCALE, axis_name, "", Color(0.3, 0.3, 0.3));
+		if (positive) {
+			String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z");
+			draw_char(get_font("rotation_control", "EditorFonts"), p_axis.screen_point + Vector2(-4.0, 5.0) * EDSCALE, axis_name, "", Color(0.0, 0.0, 0.0));
+		}
 	} else {
 		draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS * (0.55 + (0.2 * (1.0 + p_axis.z_axis))), c);
 	}