diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-05 14:59:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 14:59:37 +0200 |
commit | 342a0d45cfa0c9cabb76bb6616b0fc2d704766e7 (patch) | |
tree | e3d900d2288161c89574db83ae83cc2708b7b5b1 | |
parent | 9e5ebce1d9f58456f690e7e6ac7b78ed593f203b (diff) | |
parent | 37b943be42ffee90384a22ccb488f7ab6d9b2dcc (diff) |
Merge pull request #51250 from LightningAA/minor_view_rotation_gizmo_improvements-4.0
Minor visual improvements to the view rotation gizmo
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5f12294e22..3b64224b27 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -140,9 +140,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_theme_font(SNAME("rotation_control"), SNAME("EditorFonts")), p_axis.screen_point + Vector2i(-4, 5) * EDSCALE, axis_name, "", get_theme_font_size(SNAME("rotation_control_size"), SNAME("EditorFonts")), Color(0.3, 0.3, 0.3)); + if (positive) { + String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z"); + draw_char(get_theme_font(SNAME("rotation_control"), SNAME("EditorFonts")), p_axis.screen_point + Vector2i(-4, 5) * EDSCALE, axis_name, "", get_theme_font_size(SNAME("rotation_control_size"), SNAME("EditorFonts")), 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); } |