fix game losing focus, handle enter/escape on add vip window

master
Eduardo Bart 12 年前
父節點 fb20ad1ba1
當前提交 4620f71444

@ -6,7 +6,7 @@ Module
// console can be loaded after core
autoLoad: true
autoLoadPriority: 20
autoLoadPriority: 1000
onLoad: |
require 'console'

@ -1,11 +1,2 @@
-- place any code for testing purposes here
function init()
local box = createWidget('ComboBox')
box:moveTo({x=100, y=8})
box:addOption('Option 1')
box:addOption('Option 2')
displayUI(box)
end
addEvent(init)
--scheduleEvent(function() dumpWidgets() end, 100)

@ -1,6 +1,7 @@
Module
name: playground
autoLoad: true
autoLoadPriority: 1000
onLoad: |
require 'playground'

@ -10,3 +10,4 @@ Panel
anchors.bottom: parent.bottom
margin-top: 1
focusable: false

@ -1,6 +1,8 @@
ComboBoxPopupMenuButton < UIButton
font: verdana-11px-antialised
background-color: alpha
text-align: left
text-offset: 2 0
color: #aaaaaa
height: 18
margin-left: 1

@ -4,3 +4,4 @@ HorizontalSeparator < UIWidget
border.top: 2
height: 2
phantom: true
focusable: false

@ -1,7 +1,9 @@
MainWindow
size: 256 128
title: Add to VIP list
@onEnter: VipList.addVip()
@onEscape: VipList.destroyAddWindow()
Label
text: Please enter a character name:
anchors.top: parent.top
@ -10,7 +12,7 @@ MainWindow
margin-left: 16
margin-right: 16
margin-top: 32
LineEdit
id: name
anchors.top: prev.bottom
@ -19,7 +21,7 @@ MainWindow
margin-left: 16
margin-right: 16
margin-top: 4
HorizontalSeparator
anchors.left: parent.left
anchors.right: parent.right

載入中…
取消
儲存