Merge pull request #51251 from LightningAA/show_view_rotation_dir-3.x

[3.x] Minor visual improvements to the view rotation gizmo
This commit is contained in:
Rémi Verschelde 2021-08-05 15:00:02 +02:00 committed by GitHub
commit 9bbb8cd40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -136,9 +136,11 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
} }
if (front) { if (front) {
String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z");
draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS, c); 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 { } else {
draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS * (0.55 + (0.2 * (1.0 + p_axis.z_axis))), c); draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS * (0.55 + (0.2 * (1.0 + p_axis.z_axis))), c);
} }