mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
Rework auto focus behavior, closes #222
This commit is contained in:
@@ -13,21 +13,21 @@ CharacterWidget < UIWidget
|
||||
|
||||
Label
|
||||
id: name
|
||||
color: #ffffff
|
||||
color: #aaaaaa
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
font: verdana-11px-monochrome
|
||||
text-auto-resize: true
|
||||
background-color: alpha
|
||||
text-offset: 2 0
|
||||
on: true
|
||||
|
||||
$!on:
|
||||
color: #aaaaaa
|
||||
$on:
|
||||
color: #ffffff
|
||||
|
||||
Label
|
||||
id: worldName
|
||||
color: #ffffff
|
||||
color: #aaaaaa
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
margin-right: 5
|
||||
@@ -35,10 +35,9 @@ CharacterWidget < UIWidget
|
||||
text-auto-resize: true
|
||||
background-color: alpha
|
||||
&baseText: '(%s)'
|
||||
on: true
|
||||
|
||||
$!on:
|
||||
color: #aaaaaa
|
||||
$on:
|
||||
color: #ffffff
|
||||
|
||||
MainWindow
|
||||
id: charactersWindow
|
||||
|
@@ -97,7 +97,6 @@ function EnterGame.init()
|
||||
enterGame:getChildById('serverPortTextEdit'):setText(port)
|
||||
enterGame:getChildById('autoLoginBox'):setChecked(autologin)
|
||||
enterGame:getChildById('rememberPasswordBox'):setChecked(#account > 0)
|
||||
enterGame:getChildById('accountNameTextEdit'):focus()
|
||||
|
||||
protocolBox = enterGame:getChildById('protocolComboBox')
|
||||
protocolBox.onOptionChange = onChangeProtocol
|
||||
|
@@ -19,6 +19,10 @@ KeyboardFocusReason = 1
|
||||
ActiveFocusReason = 2
|
||||
OtherFocusReason = 3
|
||||
|
||||
AutoFocusNone = 0
|
||||
AutoFocusFirst = 1
|
||||
AutoFocusLast = 2
|
||||
|
||||
KeyboardNoModifier = 0
|
||||
KeyboardCtrlModifier = 1
|
||||
KeyboardAltModifier = 2
|
||||
|
@@ -5,6 +5,7 @@ function UIWindow.create()
|
||||
local window = UIWindow.internalCreate()
|
||||
window:setTextAlign(AlignTopCenter)
|
||||
window:setDraggable(true)
|
||||
window:setAutoFocusPolicy(AutoFocusFirst)
|
||||
return window
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user