mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
Color adjustments and fixes
This commit is contained in:
@@ -81,7 +81,9 @@ function online()
|
||||
else
|
||||
spelllistButton:hide()
|
||||
end
|
||||
if g_game.getProtocolVersion() >= 950 then -- Vocation is only send in newer clients
|
||||
|
||||
-- Vocation is only send in newer clients
|
||||
if g_game.getProtocolVersion() >= 950 then
|
||||
spelllistWindow:getChildById('buttonFilterVocation'):setVisible(true)
|
||||
else
|
||||
spelllistWindow:getChildById('buttonFilterVocation'):setVisible(false)
|
||||
@@ -159,7 +161,7 @@ function init()
|
||||
g_keyboard.bindKeyPress('Down', function() spellList:focusNextChild(KeyboardFocusReason) end, spelllistWindow)
|
||||
g_keyboard.bindKeyPress('Up', function() spellList:focusPreviousChild(KeyboardFocusReason) end, spelllistWindow)
|
||||
|
||||
initialiseSpelllist()
|
||||
initializeSpelllist()
|
||||
resizeWindow()
|
||||
|
||||
if g_game.isOnline() then
|
||||
@@ -184,7 +186,7 @@ function terminate()
|
||||
premiumRadioGroup:destroy()
|
||||
end
|
||||
|
||||
function initialiseSpelllist()
|
||||
function initializeSpelllist()
|
||||
for i = 1, #SpelllistSettings[SpelllistProfile].spellOrder do
|
||||
local spell = SpelllistSettings[SpelllistProfile].spellOrder[i]
|
||||
local info = SpellInfo[SpelllistProfile][spell]
|
||||
@@ -227,8 +229,7 @@ function changeSpelllistProfile(oldProfile)
|
||||
end
|
||||
|
||||
-- Create new spelllist and ajust window
|
||||
initialiseSpelllist()
|
||||
setOptions()
|
||||
initializeSpelllist()
|
||||
resizeWindow()
|
||||
resetWindow()
|
||||
end
|
||||
@@ -304,11 +305,13 @@ end
|
||||
|
||||
function toggle()
|
||||
if spelllistButton:isOn() then
|
||||
spelllistWindow:hide()
|
||||
spelllistButton:setOn(false)
|
||||
spelllistWindow:hide()
|
||||
else
|
||||
spelllistWindow:show()
|
||||
spelllistButton:setOn(true)
|
||||
spelllistWindow:show()
|
||||
spelllistWindow:raise()
|
||||
spelllistWindow:focus()
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user