Eduardo Bart 239f58296e restore inventory and healthbar
* make inventory/healthbar work again allowing reload
* changes in top menu toggle buttons
* all modules are now reloadable by default
* fix warning when using fade in
* remove some unused files
2012-03-23 10:48:05 -03:00

42 lines
1.0 KiB
Lua

Background = { }
-- private variables
local background
-- public functions
function Background.init()
background = displayUI('background.otui')
background:lower()
local clientVersionLabel = background:getChildById('clientVersionLabel')
clientVersionLabel:setText('OTClient ' .. g_app.getVersion() .. '\n' ..
'Rev ' .. g_app.getBuildRevision() .. '\n' ..
'Built on ' .. g_app.getBuildDate())
if not g_game.isOnline() then
Effects.fadeIn(clientVersionLabel, 1500)
end
connect(g_game, { onGameStart = Background.hide })
connect(g_game, { onGameEnd = Background.show })
end
function Background.terminate()
disconnect(g_game, { onGameStart = Background.hide })
disconnect(g_game, { onGameEnd = Background.show })
Effects.cancelFade(background:getChildById('clientVersionLabel'))
background:destroy()
background = nil
Background = nil
end
function Background.hide()
background:hide()
end
function Background.show()
background:show()
end