2012-08-31 06:56:10 +02:00
|
|
|
CharacterWidget < UIWidget
|
|
|
|
height: 14
|
|
|
|
background-color: alpha
|
2013-01-26 21:40:03 +01:00
|
|
|
&updateOnStates: |
|
|
|
|
function(self)
|
|
|
|
local children = self:getChildren()
|
|
|
|
for i=1,#children do
|
|
|
|
children[i]:setOn(self:isFocused())
|
|
|
|
end
|
2012-09-01 01:33:51 +02:00
|
|
|
end
|
2013-01-26 21:40:03 +01:00
|
|
|
@onFocusChange: self:updateOnStates()
|
|
|
|
@onSetup: self:updateOnStates()
|
2011-08-26 20:00:22 +02:00
|
|
|
|
2011-11-16 00:47:32 +01:00
|
|
|
$focus:
|
2011-08-26 20:00:22 +02:00
|
|
|
background-color: #ffffff22
|
2012-08-31 06:56:10 +02:00
|
|
|
|
|
|
|
Label
|
|
|
|
id: name
|
2013-01-26 20:06:25 +01:00
|
|
|
color: #aaaaaa
|
2012-08-31 06:56:10 +02:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
font: verdana-11px-monochrome
|
|
|
|
text-auto-resize: true
|
|
|
|
background-color: alpha
|
|
|
|
text-offset: 2 0
|
2012-09-01 01:33:51 +02:00
|
|
|
|
2013-01-26 20:06:25 +01:00
|
|
|
$on:
|
|
|
|
color: #ffffff
|
2012-08-31 06:56:10 +02:00
|
|
|
|
|
|
|
Label
|
|
|
|
id: worldName
|
|
|
|
color: #ffffff
|
2013-01-26 20:06:25 +01:00
|
|
|
color: #aaaaaa
|
2012-08-31 06:56:10 +02:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.right: parent.right
|
|
|
|
margin-right: 5
|
|
|
|
font: verdana-11px-monochrome
|
|
|
|
text-auto-resize: true
|
|
|
|
background-color: alpha
|
|
|
|
&baseText: '(%s)'
|
2012-09-01 01:33:51 +02:00
|
|
|
|
2013-01-26 20:06:25 +01:00
|
|
|
$on:
|
|
|
|
color: #ffffff
|
2011-08-26 20:00:22 +02:00
|
|
|
|
2011-08-26 17:06:52 +02:00
|
|
|
MainWindow
|
|
|
|
id: charactersWindow
|
2012-04-26 18:45:25 +02:00
|
|
|
!text: tr('Character List')
|
2012-08-31 06:56:10 +02:00
|
|
|
visible: false
|
2011-11-17 22:41:02 +01:00
|
|
|
@onEnter: CharacterList.doLogin()
|
2012-12-30 07:14:49 +01:00
|
|
|
@onEscape: CharacterList.hide(true)
|
2012-08-31 06:56:10 +02:00
|
|
|
@onSetup: |
|
|
|
|
g_keyboard.bindKeyPress('Up', function() self:getChildById('characters'):focusPreviousChild(KeyboardFocusReason) end, self)
|
|
|
|
g_keyboard.bindKeyPress('Down', function() self:getChildById('characters'):focusNextChild(KeyboardFocusReason) end, self)
|
2014-12-29 18:08:13 +01:00
|
|
|
if g_game.getFeature(GamePreviewState) then
|
|
|
|
self:setSize({width = 350, height = 400})
|
|
|
|
else
|
|
|
|
self:setSize({width = 250, height = 248})
|
|
|
|
end
|
2011-08-26 17:06:52 +02:00
|
|
|
|
|
|
|
TextList
|
2012-08-31 06:56:10 +02:00
|
|
|
id: characters
|
2012-08-13 01:27:41 +02:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: characterListScrollBar.left
|
2013-01-18 16:48:48 +01:00
|
|
|
anchors.bottom: accountStatusCaption.top
|
2011-11-17 22:41:02 +01:00
|
|
|
margin-bottom: 5
|
2012-01-11 00:13:38 +01:00
|
|
|
padding: 1
|
|
|
|
focusable: false
|
2012-03-26 15:34:43 +02:00
|
|
|
vertical-scrollbar: characterListScrollBar
|
2013-01-26 21:40:03 +01:00
|
|
|
auto-focus: first
|
2011-08-26 17:06:52 +02:00
|
|
|
|
2012-03-24 16:22:40 +01:00
|
|
|
VerticalScrollBar
|
2012-03-26 15:34:43 +02:00
|
|
|
id: characterListScrollBar
|
2012-08-13 01:27:41 +02:00
|
|
|
anchors.top: parent.top
|
2013-01-18 16:48:48 +01:00
|
|
|
anchors.bottom: accountStatusCaption.top
|
2012-08-13 01:27:41 +02:00
|
|
|
anchors.right: parent.right
|
|
|
|
margin-bottom: 5
|
2012-03-26 15:34:43 +02:00
|
|
|
step: 14
|
2012-03-28 02:33:35 +02:00
|
|
|
pixels-scroll: true
|
2012-03-24 16:22:40 +01:00
|
|
|
|
2013-01-18 16:48:48 +01:00
|
|
|
Label
|
|
|
|
id: accountStatusCaption
|
2013-01-24 12:33:44 +01:00
|
|
|
!text: tr('Account Status') .. ':'
|
2013-01-18 16:48:48 +01:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: next.top
|
|
|
|
margin-bottom: 1
|
2014-01-18 15:09:26 +01:00
|
|
|
|
2011-08-26 20:44:18 +02:00
|
|
|
Label
|
2011-08-29 16:14:21 +02:00
|
|
|
id: accountStatusLabel
|
2013-01-18 16:48:48 +01:00
|
|
|
!text: tr('Free Account')
|
2011-08-26 20:44:18 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
2011-11-16 19:59:55 +01:00
|
|
|
anchors.bottom: separator.top
|
2011-11-17 22:41:02 +01:00
|
|
|
margin-bottom: 5
|
2012-04-09 00:10:07 +02:00
|
|
|
text-auto-resize: true
|
2011-08-26 20:44:18 +02:00
|
|
|
|
2013-01-18 16:48:48 +01:00
|
|
|
$on:
|
|
|
|
color: #FF0000
|
|
|
|
|
2011-08-26 20:44:18 +02:00
|
|
|
HorizontalSeparator
|
2011-11-16 19:59:55 +01:00
|
|
|
id: separator
|
2011-08-26 20:44:18 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: next.top
|
2011-11-17 22:41:02 +01:00
|
|
|
margin-bottom: 10
|
2011-08-26 20:44:18 +02:00
|
|
|
|
2011-11-16 21:07:52 +01:00
|
|
|
//CheckBox
|
|
|
|
// id: charAutoLoginBox
|
2012-04-26 18:45:25 +02:00
|
|
|
// !text: tr('Auto login')
|
2012-04-26 21:54:16 +02:00
|
|
|
// !tooltip: tr('Auto login selected character on next charlist load')
|
2011-11-16 21:07:52 +01:00
|
|
|
// anchors.left: parent.left
|
|
|
|
// anchors.right: parent.right
|
|
|
|
// anchors.bottom: next.top
|
2011-11-17 22:41:02 +01:00
|
|
|
// margin-bottom: 6
|
|
|
|
// margin-left: 18
|
|
|
|
// margin-right: 18
|
2011-11-16 19:59:55 +01:00
|
|
|
|
2011-08-26 17:06:52 +02:00
|
|
|
Button
|
|
|
|
id: buttonOk
|
2012-04-26 18:45:25 +02:00
|
|
|
!text: tr('Ok')
|
2011-08-26 17:06:52 +02:00
|
|
|
width: 64
|
|
|
|
anchors.right: next.left
|
|
|
|
anchors.bottom: parent.bottom
|
2012-01-11 13:06:50 +01:00
|
|
|
margin-right: 10
|
2011-11-16 00:47:32 +01:00
|
|
|
@onClick: CharacterList.doLogin()
|
2011-08-26 17:06:52 +02:00
|
|
|
|
|
|
|
Button
|
|
|
|
id: buttonCancel
|
2012-04-26 18:45:25 +02:00
|
|
|
!text: tr('Cancel')
|
2011-08-26 17:06:52 +02:00
|
|
|
width: 64
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
2012-12-30 07:14:49 +01:00
|
|
|
@onClick: CharacterList.hide(true)
|