mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
More modules fixes
This commit is contained in:
@@ -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()
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user