restore old modules

* partially restore vip, battle, healthbar, skills and inventory modules
* more fixes on UIWidgets
* implement UIMiniWindow close/minimize functionality
* allow drag and drop miniwindows beteween game panels
This commit is contained in:
Eduardo Bart
2012-03-28 11:10:21 -03:00
parent e2ea267703
commit 8d14d9bc99
34 changed files with 301 additions and 196 deletions

View File

@@ -6,13 +6,13 @@ local vipButton
local addVipWindow
-- public functions
function VipList.create()
vipWindow = displayUI('viplist.otui', GameInterface.getRightPanel())
vipWindow:hide()
vipButton = TopMenu.addGameButton('vipListButton', 'VIP list', 'viplist.png', VipList.toggle)
function VipList.init()
vipWindow = displayUI('viplist.otui', GameInterface.getLeftPanel())
vipButton = TopMenu.addGameToggleButton('vipListButton', 'VIP list', 'viplist.png', VipList.toggle)
vipButton:setOn(true)
end
function VipList.destroy()
function VipList.terminate()
vipWindow:destroy()
vipWindow = nil
vipButton:destroy()
@@ -41,7 +41,7 @@ end
-- hooked events
function VipList.onAddVip(id, name, online)
local vipList = vipWindow:getChildById('vipList')
local vipList = vipWindow:getChildById('contentsPanel')
local label = createWidget('VipListLabel', nil)
label:setId('vip' .. id)

View File

@@ -6,3 +6,7 @@ Module
@onLoad: |
dofile 'viplist'
VipList.init()
@onUnload:
VipList.terminate()

View File

@@ -7,9 +7,10 @@ MiniWindow
id: vipWindow
text: VIP List
height: 100
icon: viplist.png
@onClose: VipList.toggle()
UIWidget
id: vipList
MiniWindowContents
layout: verticalBox
anchors.fill: parent
&onMousePress: VipList.onVipListMousePress