More modules fixes

This commit is contained in:
Eduardo Bart
2012-07-26 19:13:47 -03:00
parent 5f1e58c138
commit d2b85bdba8
7 changed files with 43 additions and 38 deletions

View File

@@ -1,8 +1,8 @@
MainWindow
size: 256 128
!text: tr('Add to VIP list')
@onEnter: addVip()
@onEscape: destroyAddWindow()
@onEnter: modules.game_viplist.addVip()
@onEscape: modules.game_viplist.destroyAddWindow()
Label
!text: tr('Please enter a character name:')
@@ -29,11 +29,11 @@ MainWindow
anchors.right: next.left
anchors.bottom: parent.bottom
margin-right: 10
@onClick: addVip()
@onClick: modules.game_viplist.addVip()
Button
!text: tr('Cancel')
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: destroyAddWindow()
@onClick: modules.game_viplist.destroyAddWindow()

View File

@@ -11,6 +11,7 @@ function init()
g_keyboard.bindKeyDown('Ctrl+P', toggle)
vipWindow = g_ui.loadUI('viplist.otui', modules.game_interface.getRightPanel())
vipWindow.onClose = onMiniWindowClose
vipButton = TopMenu.addRightGameToggleButton('vipListButton', tr('VIP list') .. ' (Ctrl+P)', 'viplist.png', toggle)
vipButton:setOn(true)
@@ -71,6 +72,7 @@ function onAddVip(id, name, online)
local vipList = vipWindow:getChildById('contentsPanel')
local label = g_ui.createWidget('VipListLabel')
label.onMousePress = onVipListLabelMousePress
label:setId('vip' .. id)
label:setText(name)

View File

@@ -1,17 +1,15 @@
VipListLabel < GameLabel
font: verdana-11px-monochrome
phantom: false
&onMousePress: onVipListLabelMousePress
MiniWindow
id: vipWindow
!text: tr('VIP List')
height: 100
icon: viplist.png
@onClose: onMiniWindowClose()
&save: true
MiniWindowContents
layout: verticalBox
anchors.fill: parent
&onMousePress: onVipListMousePress
@onMousePress: onVipListMousePress()