mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
Interface edits, additions, and fixes:
* Added a new module for exiting the client (client_exit). * Added tab spacing to the UITabBar class. * Added tab popup menus for things like channel tabs. * Impelemented channel tab popup menus (still need to be finished). * Fixed UITabBar tab draging (will now change after dragged half way over the next tab, not 2 pixels). * Fixes to the client_options module. * Edited some UI settings. * Changed game_cooldown and game_spelllist menu button icons. * Fixed some typos.
This commit is contained in:
@@ -68,7 +68,7 @@ function displayWarning(widget, warning)
|
||||
if warningWindow and warningWindow:isVisible() then
|
||||
return
|
||||
end
|
||||
if g_game.isOfficialTibia() and widget:isChecked() then
|
||||
if widget:isChecked() then
|
||||
local yesCallback = function() warningWindow:destroy() warningWindow=nil end
|
||||
local noCallback = function() widget:setChecked(false) warningWindow:destroy() warningWindow=nil end
|
||||
|
||||
@@ -109,10 +109,12 @@ function Options.init()
|
||||
graphicsPanel = g_ui.loadUI('graphics.otui')
|
||||
optionsTabBar:addTab(tr('Graphics'), graphicsPanel)
|
||||
|
||||
local optionWalkBooster = gamePanel:getChildById('walkBooster')
|
||||
optionWalkBooster.onCheckChange = function(widget)
|
||||
displayWarning(widget, "This feature could be detectable by official Tibia servers. Would like to continue?")
|
||||
Options.setOption(widget:getId(), widget:isChecked())
|
||||
if g_game.isOfficialTibia() then
|
||||
local optionWalkBooster = gamePanel:getChildById('walkBooster')
|
||||
optionWalkBooster.onCheckChange = function(widget)
|
||||
displayWarning(widget, "This feature could be detectable by official Tibia servers. Would like to continue?")
|
||||
Options.setOption(widget:getId(), widget:isChecked())
|
||||
end
|
||||
end
|
||||
|
||||
setupGraphicsEngines()
|
||||
@@ -151,7 +153,12 @@ function Options.hide()
|
||||
end
|
||||
|
||||
function Options.toggleOption(key)
|
||||
Options.setOption(key, not Options.getOption(key))
|
||||
local optionWidget = optionsWindow:recursiveGetChildById(key)
|
||||
if optionWidget then
|
||||
optionWidget:setChecked(not Options.getOption(key))
|
||||
else
|
||||
Options.setOption(key, not Options.getOption(key))
|
||||
end
|
||||
end
|
||||
|
||||
function Options.setOption(key, value)
|
||||
|
Reference in New Issue
Block a user