mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
enable skills and vip window on right panel
This commit is contained in:
@@ -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')
|
||||
|
||||
|
@@ -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()
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user