enable skills and vip window on right panel

This commit is contained in:
Eduardo Bart
2011-11-03 10:17:10 -02:00
parent 101f608d40
commit 14ce1c8183
19 changed files with 115 additions and 30 deletions

View File

@@ -1,9 +1,19 @@
vipWindow = nil
VipList = {}
function createVipWindow()
vipWindow = loadUI("/game/ui/vipwindow.otui", Game.gameUi)
-- private variables
local vipWindow = nil
-- public functions
function VipList.create()
vipWindow = loadUI("/viplist/viplist.otui", Game.gameRightPanel)
end
function VipList.destroy()
vipWindow:destroy()
vipWindow = nil
end
-- hooked events
function Game.onAddVip(id, name, online)
local vipList = vipWindow:getChildById('vipList')

View File

@@ -0,0 +1,18 @@
Module
name: viplist
description: Manage vip list window
author: OTClient team
website: https://github.com/edubart/otclient
autoLoad: true
dependencies:
- game
onLoad: |
require 'viplist'
VipList.create()
return true
onUnload:
VipList.destroy()

View File

@@ -1,16 +1,15 @@
VipListLabel < Label
font: verdana-11px-monochrome
margin.left: 30
margin.left: 5
Window
MiniWindow
id: vipWindow
title: VIP
size: 200 200
title: VIP List
TextList
id: vipList
anchors.fill: parent
margin.top: 19
margin.bottom: 3
margin.left: 3
margin.right: 3
margin.top: 26
margin.bottom: 6
margin.left: 6
margin.right: 6