From 67bd00556da2c8e05ab312a0c431430c2c0bafea Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 9 Oct 2013 18:17:50 +0200 Subject: [PATCH] Re-added "Don't stretch/shrink" option Closes #345 --- modules/client_options/graphics.otui | 6 +++++- modules/client_options/options.lua | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/client_options/graphics.otui b/modules/client_options/graphics.otui index f1cddfb6..56a919b3 100644 --- a/modules/client_options/graphics.otui +++ b/modules/client_options/graphics.otui @@ -39,6 +39,10 @@ Panel id: fullscreen !text: tr('Fullscreen') tooltip: Ctrl+Shift+F + + OptionCheckBox + id: dontStretchShrink + !text: tr('Don\'t stretch/shrink Game Window') Label id: backgroundFrameRateLabel @@ -46,7 +50,7 @@ Panel anchors.left: parent.left anchors.right: parent.right anchors.top: prev.bottom - margin-top: 6 + margin-top: 12 @onSetup: | local value = modules.client_options.getOption('backgroundFrameRate') local text = value diff --git a/modules/client_options/options.lua b/modules/client_options/options.lua index 2088b2f5..9ca73fa2 100644 --- a/modules/client_options/options.lua +++ b/modules/client_options/options.lua @@ -25,7 +25,8 @@ local defaultOptions = { ambientLight = 25, displayNames = true, displayHealth = true, - displayText = true + displayText = true, + dontStretchShrink = false } local optionsWindow @@ -223,6 +224,10 @@ function setOption(key, value, force) gameMapPanel:setDrawHealthBars(value) elseif key == 'displayText' then gameMapPanel:setDrawTexts(value) + elseif key == 'dontStretchShrink' then + addEvent(function() + modules.game_interface.updateStretchShrink() + end) end -- change value for keybind updates