mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
restore some game functionallity
* i'm gradually restoring game functionality with the new modules design, though still a lot to do * you can reload all scripts and modules using Ctrl+R shortcut while playing (finally! this is the reason of all this rework) * a bunch of fixes, but new regression too :P * fix performance issue that could lead freezes in the client in older machines * completely new game module with new design * fix crashs in map render * remove uigame.cpp (now every game input is via lua) * enable DEBUG macro by default, with it you are able to view any possible lua leak while running
This commit is contained in:
@@ -30,25 +30,27 @@ end
|
||||
|
||||
-- public functions
|
||||
function TopMenu.init()
|
||||
connect(g_game, { onGameStart = TopMenu.showGameButtons,
|
||||
onGameEnd = TopMenu.hideGameButtons })
|
||||
|
||||
topMenu = displayUI('topmenu.otui')
|
||||
|
||||
leftButtonsPanel = topMenu:getChildById('leftButtonsPanel')
|
||||
rightButtonsPanel = topMenu:getChildById('rightButtonsPanel')
|
||||
gameButtonsPanel = topMenu:getChildById('gameButtonsPanel')
|
||||
|
||||
connect(g_game, { onGameStart = TopMenu.showGameButtons,
|
||||
onGameEnd = TopMenu.hideGameButtons })
|
||||
end
|
||||
|
||||
function TopMenu.terminate()
|
||||
disconnect(g_game, { onGameStart = TopMenu.showGameButtons,
|
||||
onGameEnd = TopMenu.hideGameButtons })
|
||||
|
||||
leftButtonsPanel = nil
|
||||
rightButtonsPanel = nil
|
||||
gameButtonsPanel = nil
|
||||
|
||||
topMenu:destroy()
|
||||
topMenu = nil
|
||||
|
||||
disconnect(g_game, { onGameStart = TopMenu.showGameButtons,
|
||||
onGameEnd = TopMenu.hideGameButtons })
|
||||
|
||||
TopMenu = nil
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user