diff --git a/code/components/font-renderer/src/GtaGameInterface.cpp b/code/components/font-renderer/src/GtaGameInterface.cpp index 7295ebc61b..8aba6298af 100644 --- a/code/components/font-renderer/src/GtaGameInterface.cpp +++ b/code/components/font-renderer/src/GtaGameInterface.cpp @@ -351,7 +351,8 @@ static InitFunction initFunction([] () static bool isCanary = IsCanary(); std::wstring brandingString = L""; - std::wstring brandingEmoji; + std::wstring brandingEmoji = L""; + std::wstring brandName = L"FiveM"; if (shouldDraw) { SYSTEMTIME systemTime; @@ -393,8 +394,6 @@ static InitFunction initFunction([] () break; } - std::wstring brandName = L"FiveM"; - if (!CfxIsSinglePlayer() && !getenv("CitizenFX_ToolMode")) { #if !defined(IS_RDR3) @@ -443,10 +442,23 @@ static InitFunction initFunction([] () brandName += L" (Canary)"; } } + } + + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution<> dis(0, 2); + + static int anchorPos = dis(gen); + // If anchor position is on left-side, make the emoji go on the left side. + if (anchorPos < 2) { brandingString = fmt::sprintf(L"%s %s", brandName, brandingEmoji); + } else + { + brandingString = fmt::sprintf(L"%s %s", brandingEmoji, brandName); } + static CRect metrics; static fwWString lastString; static float lastHeight; @@ -462,12 +474,6 @@ static InitFunction initFunction([] () lastHeight = gameHeightF; } - std::random_device rd; - std::mt19937 gen(rd()); - std::uniform_int_distribution<> dis(0, 2); - - static int anchorPos = dis(gen); - CRect drawRect; switch (anchorPos) @@ -483,7 +489,7 @@ static InitFunction initFunction([] () break; } - CRGBA color(180, 180, 180); + CRGBA color(180, 180, 180, 120); g_fontRenderer.DrawText(brandingString, drawRect, color, 22.0f * (gameHeightF / 1440.0f), 1.0f, "Segoe UI"); #endif