Merge pull request #44429 from mbrlabs/rot-gizmo-handle
Changed the rotation gizmo handle to use the active axis color
This commit is contained in:
commit
c514cc5822
1 changed files with 20 additions and 1 deletions
|
@ -2657,11 +2657,30 @@ void Node3DEditorViewport::_draw() {
|
||||||
|
|
||||||
if (_edit.mode == TRANSFORM_ROTATE) {
|
if (_edit.mode == TRANSFORM_ROTATE) {
|
||||||
Point2 center = _point_to_screen(_edit.center);
|
Point2 center = _point_to_screen(_edit.center);
|
||||||
|
|
||||||
|
Color handle_color;
|
||||||
|
switch (_edit.plane) {
|
||||||
|
case TRANSFORM_X_AXIS:
|
||||||
|
handle_color = get_theme_color("axis_x_color", "Editor");
|
||||||
|
break;
|
||||||
|
case TRANSFORM_Y_AXIS:
|
||||||
|
handle_color = get_theme_color("axis_y_color", "Editor");
|
||||||
|
break;
|
||||||
|
case TRANSFORM_Z_AXIS:
|
||||||
|
handle_color = get_theme_color("axis_z_color", "Editor");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
handle_color = get_theme_color("accent_color", "Editor");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
handle_color.a = 1.0;
|
||||||
|
handle_color *= Color(1.3, 1.3, 1.3, 1.0);
|
||||||
|
|
||||||
RenderingServer::get_singleton()->canvas_item_add_line(
|
RenderingServer::get_singleton()->canvas_item_add_line(
|
||||||
ci,
|
ci,
|
||||||
_edit.mouse_pos,
|
_edit.mouse_pos,
|
||||||
center,
|
center,
|
||||||
get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.6),
|
handle_color,
|
||||||
Math::round(2 * EDSCALE));
|
Math::round(2 * EDSCALE));
|
||||||
}
|
}
|
||||||
if (previewing) {
|
if (previewing) {
|
||||||
|
|
Loading…
Reference in a new issue