From 09cb6f56dda4583411ea64eaa395c958175c3805 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 5 Jan 2019 22:05:49 +0200 Subject: [PATCH] Changed: Move ui scale limits to client cfg --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 6 ++++++ .../data/gamedev/interfaces_v3/game_config.xml | 16 +++++++++++++++- code/ryzom/client/src/client_cfg.cpp | 8 +++++++- code/ryzom/client/src/client_cfg.h | 7 +++---- .../src/interface_v3/action_handler_game.cpp | 4 ++-- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 4ffddc935..950da08b6 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -320,6 +320,12 @@ CameraSpeedMin = 2.0; CameraSpeedMax = 100.0; CameraResetSpeed = 10.0; // Speed in radian/s +// Values for UI Scale +InterfaceScale = 1.0; +InterfaceScale_min = 0.8; +InterfaceScale_max = 2.0; +InterfaceScale_step = 0.05; + // Default values for map MaxMapScale = 2.0; R2EDMaxMapScale = 8.0; diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml index 2728e7854..c3b904f01 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml @@ -876,10 +876,17 @@ posparent="lum" x="0" y="-2" /> + @@ -3091,6 +3098,13 @@ realtime="true" widget="sbfloat" link="Gamma" /> + = MIN_INTERFACE_SCALE && scale <= MAX_INTERFACE_SCALE) + if (scale >= ClientCfg.InterfaceScale_min && scale <= ClientCfg.InterfaceScale_max) { ClientCfg.InterfaceScale = scale; ClientCfg.writeDouble("InterfaceScale", ClientCfg.InterfaceScale); @@ -3754,7 +3754,7 @@ class CHandlerSetInterfaceScale : public IActionHandler } } - ucstring help("/setuiscale "+toString("%.1f .. %.1f", MIN_INTERFACE_SCALE, MAX_INTERFACE_SCALE)); + ucstring help("/setuiscale "+toString("%.1f .. %.1f", ClientCfg.InterfaceScale_min, ClientCfg.InterfaceScale_max)); CInterfaceManager::getInstance()->displaySystemInfo(help); } };