diff --git a/UnleashedRecomp/ui/achievement_menu.cpp b/UnleashedRecomp/ui/achievement_menu.cpp index 389eb85..450e519 100644 --- a/UnleashedRecomp/ui/achievement_menu.cpp +++ b/UnleashedRecomp/ui/achievement_menu.cpp @@ -141,14 +141,14 @@ static void DrawHeaderContainer(const char* text) SetTextSkew((min.y + max.y) / 2.0f, Scale(3.0f)); // TODO: Apply bevel. - DrawTextWithOutline + DrawTextWithOutline ( g_fntNewRodinUB, fontSize, { /* X */ min.x + textMarginX, /* Y */ CENTRE_TEXT_VERT(min, max, textSize) - Scale(5) }, IM_COL32(255, 255, 255, 255 * alpha), text, - 3, + 1.65f, IM_COL32(0, 0, 0, 255 * alpha) ); diff --git a/UnleashedRecomp/ui/imgui_utils.h b/UnleashedRecomp/ui/imgui_utils.h index 64cce93..b23a2c9 100644 --- a/UnleashedRecomp/ui/imgui_utils.h +++ b/UnleashedRecomp/ui/imgui_utils.h @@ -188,10 +188,12 @@ static void DrawTextWithOutline(const ImFont* font, float fontSize, const ImVec2 if constexpr (std::is_same_v || std::is_same_v) { + auto step = outlineSize / 2.0f; + // TODO: This is still very inefficient! - for (float i = -outlineSize; i <= outlineSize; i += 0.5f) + for (float i = -outlineSize; i <= outlineSize; i += step) { - for (float j = -outlineSize; j <= outlineSize; j += 0.5f) + for (float j = -outlineSize; j <= outlineSize; j += step) { if (i == 0.0f && j == 0.0f) continue;