mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
focus and active states fixes
This commit is contained in:
@@ -2,6 +2,9 @@ Label < UILabel
|
||||
font: verdana-11px-antialised
|
||||
color: #aaaaaa
|
||||
|
||||
$disabled:
|
||||
color: #aaaaaa88
|
||||
|
||||
LargerLabel < Label
|
||||
|
||||
|
||||
|
@@ -7,5 +7,8 @@ LineEdit < UILineEdit
|
||||
source: /core_styles/images/panel_flat.png
|
||||
border: 1
|
||||
|
||||
$disabled:
|
||||
color: #aaaaaa88
|
||||
|
||||
PasswordLineEdit < LineEdit
|
||||
text hidden: true
|
||||
|
@@ -2,6 +2,7 @@ Window < UIWindow
|
||||
font: verdana-11px-antialised
|
||||
size: 200 200
|
||||
opacity: 255
|
||||
color: white
|
||||
background-color: white
|
||||
head height: 20
|
||||
head text align: center
|
||||
@@ -15,6 +16,9 @@ Window < UIWindow
|
||||
$pressed:
|
||||
opacity: 192
|
||||
|
||||
$disabled:
|
||||
color: #aaaaaa88
|
||||
|
||||
MiniWindow < UIWindow
|
||||
font: verdana-11px-antialised
|
||||
size: 192 200
|
||||
|
@@ -7,8 +7,17 @@ local motdNumber
|
||||
local motdMessage
|
||||
|
||||
-- private functions
|
||||
local function clearAccountFields()
|
||||
enterGame:getChildById('accountNameLineEdit'):clearText()
|
||||
enterGame:getChildById('accountPasswordLineEdit'):clearText()
|
||||
enterGame:getChildById('accountNameLineEdit'):focus()
|
||||
Configs.set('account', nil)
|
||||
Configs.set('password', nil)
|
||||
end
|
||||
|
||||
local function onError(protocol, error)
|
||||
loadBox:destroy()
|
||||
clearAccountFields()
|
||||
local errorBox = displayErrorBox('Login Error', error)
|
||||
errorBox.onOk = EnterGame.show
|
||||
end
|
||||
@@ -25,10 +34,7 @@ local function onCharacterList(protocol, characters, premDays)
|
||||
Configs.set('password', EnterGame.password)
|
||||
Configs.set('autologin', tostring(enterGame:getChildById('autoLoginBox'):isChecked()))
|
||||
else
|
||||
Configs.set('account', nil)
|
||||
Configs.set('password', nil)
|
||||
enterGame:getChildById('accountNameLineEdit'):clearText()
|
||||
enterGame:getChildById('accountPasswordLineEdit'):clearText()
|
||||
clearAccountFields()
|
||||
end
|
||||
|
||||
loadBox:destroy()
|
||||
@@ -59,6 +65,7 @@ function EnterGame.create()
|
||||
enterGame:getChildById('serverPortLineEdit'):setText(port)
|
||||
enterGame:getChildById('autoLoginBox'):setChecked(autologin)
|
||||
enterGame:getChildById('rememberPasswordBox'):setChecked(#account > 0)
|
||||
enterGame:getChildById('accountNameLineEdit'):focus()
|
||||
|
||||
if #account > 0 and autologin then
|
||||
addEvent(EnterGame.doLogin)
|
||||
|
@@ -16,7 +16,7 @@ end
|
||||
function Game.createInterface()
|
||||
Background.hide()
|
||||
CharacterList.destroyLoadBox()
|
||||
Game.gameUi = loadUI('/game/game.otui', UI.root)
|
||||
Game.gameUi = UI.loadAndDisplay('/game/game.otui')
|
||||
UI.root:moveChildToIndex(Game.gameUi, 1)
|
||||
Game.gameMapPanel = Game.gameUi:getChildById('mapPanel')
|
||||
Game.gameRightPanel = Game.gameUi:getChildById('rightPanel')
|
||||
|
Reference in New Issue
Block a user