mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
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:
@@ -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')
|
21
modules/client_options/game.otui
Normal file
21
modules/client_options/game.otui
Normal 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')
|
@@ -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
|
||||
|
Reference in New Issue
Block a user