From c57689cc90c619456d1184ea1cedcea1cf297ad4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 14 Mar 2025 21:21:56 +1000 Subject: [PATCH] FullscreenUI: Inherit colour alpha for shadowed text --- src/util/imgui_fullscreen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index acda52f01..d4943d19a 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -1328,17 +1328,18 @@ void ImGuiFullscreen::RenderShadowedTextClipped(ImDrawList* draw_list, ImFont* f pos.y = ImMax(pos.y, pos.y + (pos_max.y - pos.y - text_size.y) * align.y); // Render + const u32 shadow_color = (UIStyle.ShadowColor & ~IM_COL32_A_MASK) | (color & IM_COL32_A_MASK); if (need_clipping) { ImVec4 fine_clip_rect(clip_min->x, clip_min->y, clip_max->x, clip_max->y); draw_list->AddText(font, font->FontSize, pos + LayoutScale(LAYOUT_SHADOW_OFFSET, LAYOUT_SHADOW_OFFSET), - UIStyle.ShadowColor, text, text_display_end, wrap_width, &fine_clip_rect); + shadow_color, text, text_display_end, wrap_width, &fine_clip_rect); draw_list->AddText(font, font->FontSize, pos, color, text, text_display_end, wrap_width, &fine_clip_rect); } else { draw_list->AddText(font, font->FontSize, pos + LayoutScale(LAYOUT_SHADOW_OFFSET, LAYOUT_SHADOW_OFFSET), - UIStyle.ShadowColor, text, text_display_end, wrap_width, nullptr); + shadow_color, text, text_display_end, wrap_width, nullptr); draw_list->AddText(font, font->FontSize, pos, color, text, text_display_end, wrap_width, nullptr); } }