finally reloadable vip, skills, inventory, chat and minimap

This commit is contained in:
Eduardo Bart
2012-04-27 03:30:54 -03:00
parent d0b839a4eb
commit ceb051cb75
12 changed files with 98 additions and 28 deletions

View File

@@ -15,6 +15,8 @@ function VipList.init()
vipWindow = displayUI('viplist.otui', GameInterface.getLeftPanel())
vipButton = TopMenu.addGameToggleButton('vipListButton', tr('VIP list'), 'viplist.png', VipList.toggle)
vipButton:setOn(true)
VipList.refresh()
end
function VipList.terminate()
@@ -30,6 +32,13 @@ function VipList.terminate()
VipList = nil
end
function VipList.refresh()
VipList.clear()
for id,vip in pairs(g_game.getVips()) do
VipList.onAddVip(id, unpack(vip))
end
end
function VipList.clear()
local vipList = vipWindow:getChildById('contentsPanel')
vipList:destroyChildren()