Added new features to the options.

* Added 'enable smart walk' and 'show connection ping' options.
* Minor tidy ups.
This commit is contained in:
BeniS
2012-08-26 16:27:30 +12:00
parent 4bac36d3bc
commit b58f4aa465
7 changed files with 43 additions and 23 deletions

View File

@@ -6,15 +6,25 @@ Panel
OptionCheckBox
id: autoChaseOverride
!text: tr('Allow auto chase override')
OptionCheckBox
id: smartWalk
!text: tr('Enable smart walking')
!tooltip: tr('Will detect when to use diagonal step based on the\nkeys you are pressing')
OptionCheckBox
id: walkBooster
!text: tr('Enable walk booster')
!tooltip: tr('Also know as dash in tibia community, recommended\nfor playing characters with high speed')
!tooltip: tr('Also known as dash in tibia community, recommended\nfor playing characters with high speed')
OptionCheckBox
id: enableMusic
!text: tr('Enable music')
OptionCheckBox
id: showPing
!text: tr('Show connection ping')
!tooltip: tr('Display connection speed to the server (milliseconds)')
OptionCheckBox
id: showLeftPanel

View File

@@ -35,7 +35,7 @@ Panel
!tooltip: tr('Limits FPS to 60')
OptionCheckBox
id: showfps
id: showFps
!text: tr('Show frame rate')
OptionCheckBox

View File

@@ -2,7 +2,8 @@ Options = {}
local defaultOptions = {
vsync = false,
showfps = true,
showFps = true,
showPing = true,
fullscreen = false,
classicControl = false,
walkBooster = false,
@@ -131,11 +132,16 @@ function Options.setOption(key, value)
if options[key] == value then return end
if key == 'vsync' then
g_window.setVerticalSync(value)
elseif key == 'showfps' then
elseif key == 'showFps' then
addEvent(function()
local frameCounter = rootWidget:recursiveGetChildById('frameCounter')
if frameCounter then frameCounter:setVisible(value) end
end)
elseif key == 'showPing' then
addEvent(function()
local ping = rootWidget:recursiveGetChildById('pingLabel')
if ping then ping:setVisible(value) end
end)
elseif key == 'fullscreen' then
g_window.setFullscreen(value)
elseif key == 'enableMusic' then