Topmenu fix
* Will no longer duplicate topmenu buttons (no need to destroy in the module now) * Menu items will no longer change position when reloaded.
This commit is contained in:
parent
b34cc18f98
commit
35e5dd8af8
|
@ -136,17 +136,11 @@ function EnterGame.terminate()
|
|||
removeEvent(autoLoginEvent)
|
||||
enterGame:destroy()
|
||||
enterGame = nil
|
||||
enterGameButton:destroy()
|
||||
enterGameButton = nil
|
||||
protocolBox = nil
|
||||
if motdWindow then
|
||||
motdWindow:destroy()
|
||||
motdWindow = nil
|
||||
end
|
||||
if motdButton then
|
||||
motdButton:destroy()
|
||||
motdButton = nil
|
||||
end
|
||||
if loadBox then
|
||||
loadBox:destroy()
|
||||
loadBox = nil
|
||||
|
|
|
@ -23,8 +23,6 @@ end
|
|||
function terminate()
|
||||
moduleManagerWindow:destroy()
|
||||
moduleManagerWindow = nil
|
||||
moduleManagerButton:destroy()
|
||||
moduleManagerButton = nil
|
||||
moduleList = nil
|
||||
end
|
||||
|
||||
|
|
|
@ -119,15 +119,11 @@ function terminate()
|
|||
g_keyboard.unbindKeyDown('Ctrl+Shift+F')
|
||||
optionsWindow:destroy()
|
||||
optionsWindow = nil
|
||||
optionsButton:destroy()
|
||||
optionsButton = nil
|
||||
optionsTabBar = nil
|
||||
generalPanel = nil
|
||||
consolePanel = nil
|
||||
graphicsPanel = nil
|
||||
audioPanel = nil
|
||||
audioButton:destroy()
|
||||
audioButton = nil
|
||||
end
|
||||
|
||||
function toggle()
|
||||
|
|
|
@ -150,8 +150,6 @@ function terminate()
|
|||
g_settings.setList('terminal-history', commandHistory)
|
||||
g_keyboard.unbindKeyDown('Ctrl+T')
|
||||
g_logger.setOnLog(nil)
|
||||
terminalButton:destroy()
|
||||
terminalButton = nil
|
||||
commandTextEdit = nil
|
||||
terminalBuffer = nil
|
||||
terminalWindow:destroy()
|
||||
|
|
|
@ -14,11 +14,14 @@ local function addButton(id, description, icon, callback, panel, toggle, front)
|
|||
class = 'TopButton'
|
||||
end
|
||||
|
||||
local button = g_ui.createWidget(class)
|
||||
if front then
|
||||
panel:insertChild(1, button)
|
||||
else
|
||||
panel:addChild(button)
|
||||
local button = panel:getChildById(id)
|
||||
if not button then
|
||||
button = g_ui.createWidget(class)
|
||||
if front then
|
||||
panel:insertChild(1, button)
|
||||
else
|
||||
panel:addChild(button)
|
||||
end
|
||||
end
|
||||
button:setId(id)
|
||||
button:setTooltip(description)
|
||||
|
|
|
@ -50,7 +50,6 @@ function terminate()
|
|||
end
|
||||
|
||||
fightModeRadioGroup:destroy()
|
||||
combatControlsButton:destroy()
|
||||
combatControlsWindow:destroy()
|
||||
|
||||
disconnect(g_game, {
|
||||
|
|
|
@ -35,7 +35,6 @@ function terminate()
|
|||
onSpellGroupCooldown = onSpellGroupCooldown,
|
||||
onSpellCooldown = onSpellCooldown })
|
||||
|
||||
cooldownButton:destroy()
|
||||
cooldownWindow:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ function terminate()
|
|||
disconnect(g_game, { onGameEnd = offline })
|
||||
|
||||
healthInfoWindow:destroy()
|
||||
healthInfoButton:destroy()
|
||||
healthInfoWindow = nil
|
||||
healthInfoButton = nil
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ function terminate()
|
|||
unload()
|
||||
|
||||
hotkeysWindow:destroy()
|
||||
hotkeysButton:destroy()
|
||||
mouseGrabberWidget:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -123,7 +123,6 @@ function terminate()
|
|||
|
||||
disconnect(gameLeftPanel, { onVisibilityChange = onLeftPanelVisibilityChange })
|
||||
|
||||
logoutButton:destroy()
|
||||
gameRootPanel:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ function terminate()
|
|||
g_keyboard.unbindKeyDown('Ctrl+I')
|
||||
|
||||
inventoryWindow:destroy()
|
||||
inventoryButton:destroy()
|
||||
end
|
||||
|
||||
function refresh()
|
||||
|
|
|
@ -48,7 +48,6 @@ function terminate()
|
|||
g_keyboard.unbindKeyPress('Alt+Down', gameRootPanel)
|
||||
g_keyboard.unbindKeyDown('Ctrl+M')
|
||||
|
||||
minimapButton:destroy()
|
||||
minimapWindow:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -17,9 +17,6 @@ function terminate()
|
|||
onQuestLine = onGameQuestLine,
|
||||
onGameEnd = destroyWindows})
|
||||
|
||||
if questLogButton then
|
||||
questLogButton:destroy()
|
||||
end
|
||||
destroyWindows()
|
||||
end
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ function terminate()
|
|||
})
|
||||
|
||||
g_keyboard.unbindKeyDown('Ctrl+S')
|
||||
skillsButton:destroy()
|
||||
skillsWindow:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -172,8 +172,6 @@ function terminate()
|
|||
updateSpellInformation(focusedChild)
|
||||
end })
|
||||
|
||||
spelllistButton:destroy()
|
||||
spelllistButton = nil
|
||||
spelllistWindow:destroy()
|
||||
spelllistWindow = nil
|
||||
|
||||
|
|
Loading…
Reference in New Issue