From c2beca07fdc5052192855dbfc97c21450a67f4b0 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:23:48 +0800 Subject: [PATCH] [saco] Implement/match `GetFontSize()` --- saco/main.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/saco/main.cpp b/saco/main.cpp index 73a1629..6bec272 100644 --- a/saco/main.cpp +++ b/saco/main.cpp @@ -510,3 +510,19 @@ void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString) } //---------------------------------------------------- +int GetFontSize() +{ + int size; + + if (pGame->GetScreenWidth() < 1024) + size = 14; + else if (pGame->GetScreenWidth() < 1400) + size = 16; + else if (pGame->GetScreenWidth() < 1600) + size = 18; + else + size = 20; + + return size + 2 * pConfig->GetIntVariable("fontsize"); +} +