From f3adb0b9d01783822a48d50111a9b99673b6b718 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 25 May 2024 12:52:07 +1000 Subject: Add an interface scale slider --- source/client/StarClientApplication.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/client/StarClientApplication.cpp') diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index ed3651c..9b53a29 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -63,6 +63,7 @@ Json const AdditionalDefaultConfiguration = Json::parseJson(R"JSON( "antiAliasing" : false, "zoomLevel" : 3.0, "cameraSpeedFactor" : 1.0, + "interfaceScale" : 0, "speechBubbles" : true, "title" : { @@ -371,7 +372,9 @@ void ClientApplication::render() { renderer->setMultiSampling(config->get("antiAliasing").optBool().value(false) ? 4 : 0); renderer->switchEffectConfig("interface"); - if (m_guiContext->windowWidth() >= m_crossoverRes[0] && m_guiContext->windowHeight() >= m_crossoverRes[1]) + if (auto interfaceScale = config->get("interfaceScale").optUInt().value()) + m_guiContext->setInterfaceScale(interfaceScale); + else if (m_guiContext->windowWidth() >= m_crossoverRes[0] && m_guiContext->windowHeight() >= m_crossoverRes[1]) m_guiContext->setInterfaceScale(m_maxInterfaceScale); else m_guiContext->setInterfaceScale(m_minInterfaceScale); -- cgit v1.2.3