Changed the rotation gizmo handle to use the active axis color
(cherry picked from commit ec97962261
)
This commit is contained in:
parent
bafbb238af
commit
9248ee39ca
|
@ -2644,11 +2644,30 @@ void SpatialEditorViewport::_draw() {
|
|||
if (_edit.mode == TRANSFORM_ROTATE) {
|
||||
|
||||
Point2 center = _point_to_screen(_edit.center);
|
||||
|
||||
Color handle_color;
|
||||
switch (_edit.plane) {
|
||||
case TRANSFORM_X_AXIS:
|
||||
handle_color = get_color("axis_x_color", "Editor");
|
||||
break;
|
||||
case TRANSFORM_Y_AXIS:
|
||||
handle_color = get_color("axis_y_color", "Editor");
|
||||
break;
|
||||
case TRANSFORM_Z_AXIS:
|
||||
handle_color = get_color("axis_z_color", "Editor");
|
||||
break;
|
||||
default:
|
||||
handle_color = get_color("accent_color", "Editor");
|
||||
break;
|
||||
}
|
||||
handle_color.a = 1.0;
|
||||
handle_color *= Color(1.3, 1.3, 1.3, 1.0);
|
||||
|
||||
VisualServer::get_singleton()->canvas_item_add_line(
|
||||
ci,
|
||||
_edit.mouse_pos,
|
||||
center,
|
||||
get_color("accent_color", "Editor") * Color(1, 1, 1, 0.6),
|
||||
handle_color,
|
||||
Math::round(2 * EDSCALE),
|
||||
true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue