diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-05-25 12:52:07 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-05-25 12:52:07 +1000 |
commit | f3adb0b9d01783822a48d50111a9b99673b6b718 (patch) | |
tree | fc3bafee4d86d6c7ab3447e6c05a0d974253aa60 /source/client/StarClientApplication.cpp | |
parent | e31a37421214db40a631c2721381f240f03c770e (diff) |
Add an interface scale slider
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r-- | source/client/StarClientApplication.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); |