summaryrefslogtreecommitdiffhomepage
path: root/editor/imgui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-15 17:36:18 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-15 17:39:32 +0200
commit7e21f1168aa30defa51f88b4f921aa0b0b7bd708 (patch)
tree71629ab66d2e2583d25dc0224e4b96a1748dcb1a /editor/imgui.cpp
parent6ad1f0a5e45b762a4cae4cd9f1f1e3196ebdca2e (diff)
editor: try fix light label color display
Diffstat (limited to 'editor/imgui.cpp')
-rw-r--r--editor/imgui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index 3c483265..ab6d837a 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -182,7 +182,7 @@ void app::draw_light_info()
char buf[128];
- if (e.falloff == light_falloff::constant)
+ if (e.falloff == light_falloff::constant || e.max_distance < 1e-6f)
snformat(buf, "{}"_cf, falloff);
else
snformat(buf, "{} range={}"_cf, falloff, e.max_distance);
@@ -200,7 +200,7 @@ void app::draw_light_info()
ImGui::ColorConvertFloat4ToU32({0, 0, 0, 1}));
draw.AddText({offx, offy}, ImGui::ColorConvertFloat4ToU32({1, 1, 0, 1}), buf);
draw.AddRectFilled({offx-pad.x - 5 * dpi.x(), offy-pad.y + color_pad_y},
- {offx-pad.x + 0 * dpi.x(), offy-pad.y + text_size.y - color_pad_y},
+ {offx-pad.x + 0 * dpi.x(), offy-pad.y + text_size.y - color_pad_y + 1},
ImGui::ColorConvertFloat4ToU32({color.x(), color.y(), color.z(), 1}));
}
}