summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-03 16:21:13 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-03 16:21:13 +0100
commit8b5ad57aefe1d4bdee5334b194f63168fbe8581e (patch)
tree30915d6642256c1dc4d8261f5c4cc7ffb351d205 /editor/draw.cpp
parente2df578979a8796a41db92aba12dbe47b32bb8f5 (diff)
wip
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index 329603e0..f1a0616c 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -17,7 +17,6 @@ void app::draw_cursor()
{
constexpr float LINE_WIDTH = 2;
auto& shader = M->shader();
- shader.set_tint({1, 0, 0, 1});
const auto inactive_color = 0xff00ffff_rgbaf;
if (cursor.tile && !cursor.in_imgui)
@@ -27,7 +26,9 @@ void app::draw_cursor()
mesh.draw(shader, {center, size, LINE_WIDTH});
};
- if (const auto* ed = _editor.current_tile_editor(); ed)
+ shader.set_tint({1, 0, 0, 1});
+
+ if (const auto* ed = _editor.current_tile_editor())
{
if (!ed->is_anything_selected())
shader.set_tint(inactive_color);
@@ -40,7 +41,7 @@ void app::draw_cursor()
else if (ed->mode() == editor_mode::floor)
draw(_wireframe_quad, TILE_SIZE2);
}
- else if (const auto* ed = _editor.current_scenery_editor(); ed)
+ else if (const auto* ed = _editor.current_scenery_editor())
{
if (!ed->is_anything_selected())
shader.set_tint(inactive_color);
@@ -54,8 +55,9 @@ void app::draw_cursor()
anim_mesh.draw(shader, *sel.atlas, sel.frame.r, sel.frame.frame, Vector3(pos), 1);
}
}
+
+ shader.set_tint({1, 1, 1, 1});
}
- shader.set_tint({1, 1, 1, 1});
}
void app::draw_collision_boxes()