Implement new cool features

* Implement walk booster (dash) as an option in settings menu
* Dash is smarter (can pre-animate)
* Implement smart walking (walk in diagonal when holding two arrow keys)
* Implement ping meter for all protocols
* Ping meter uses uses real ping packet for 9.6 and walk for others
This commit is contained in:
Eduardo Bart
2012-08-25 16:11:54 -03:00
parent 0763b266d5
commit 4bac36d3bc
15 changed files with 193 additions and 63 deletions

View File

@@ -1,12 +1,4 @@
Panel
OptionCheckBox
id: classicControl
!text: tr('Classic control')
OptionCheckBox
id: autoChaseOverride
!text: tr('Allow auto chase override')
OptionCheckBox
id: showInfoMessagesInConsole
!text: tr('Show info messages in console')
@@ -33,12 +25,4 @@ Panel
OptionCheckBox
id: showPrivateMessagesOnScreen
!text: tr('Show private messages on screen')
OptionCheckBox
id: enableMusic
!text: tr('Enable music')
OptionCheckBox
id: showLeftPanel
!text: tr('Show left panel')
!text: tr('Show private messages on screen')

View File

@@ -0,0 +1,21 @@
Panel
OptionCheckBox
id: classicControl
!text: tr('Classic control')
OptionCheckBox
id: autoChaseOverride
!text: tr('Allow auto chase override')
OptionCheckBox
id: walkBooster
!text: tr('Enable walk booster')
!tooltip: tr('Also know as dash in tibia community, recommended\nfor playing characters with high speed')
OptionCheckBox
id: enableMusic
!text: tr('Enable music')
OptionCheckBox
id: showLeftPanel
!text: tr('Show left panel')

View File

@@ -5,6 +5,8 @@ local defaultOptions = {
showfps = true,
fullscreen = false,
classicControl = false,
walkBooster = false,
smartWalk = false,
autoChaseOverride = true,
showStatusMessagesInConsole = true,
showEventMessagesInConsole = true,
@@ -68,8 +70,8 @@ function Options.init()
end
end
g_keyboard.bindKeyDown('Ctrl+D', Options.toggle)
g_keyboard.bindKeyDown('Ctrl+F', function() Options.toggleOption('fullscreen') end)
g_keyboard.bindKeyDown('Ctrl+D', function() Options.toggleOption('walkBooster') end)
optionsWindow = g_ui.displayUI('options.otui')
optionsWindow:hide()
@@ -78,8 +80,11 @@ function Options.init()
optionsTabBar = optionsWindow:getChildById('optionsTabBar')
optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))
generalPanel = g_ui.loadUI('general.otui')
optionsTabBar:addTab(tr('General'), generalPanel)
generalPanel = g_ui.loadUI('game.otui')
optionsTabBar:addTab(tr('Game'), generalPanel)
generalPanel = g_ui.loadUI('console.otui')
optionsTabBar:addTab(tr('Console'), generalPanel)
graphicsPanel = g_ui.loadUI('graphics.otui')
optionsTabBar:addTab(tr('Graphics'), graphicsPanel)
@@ -147,8 +152,8 @@ function Options.setOption(key, value)
end
if graphicsPanel then
graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
end
graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
end
g_app.setBackgroundPaneMaxFps(value)
elseif key == 'foregroundFrameRate' then
local text = value
@@ -158,7 +163,7 @@ function Options.setOption(key, value)
end
if graphicsPanel then
graphicsPanel:getChildById('foregroundFrameRateLabel'):setText(tr('Interface framerate limit: %s', text))
graphicsPanel:getChildById('foregroundFrameRateLabel'):setText(tr('Interface framerate limit: %s', text))
end
g_app.setForegroundPaneMaxFps(value)
elseif key == 'painterEngine' then