EnterGame with unique server option, ComboboxRounded
This commit is contained in:
parent
0f980ec18b
commit
217291b486
|
@ -172,3 +172,34 @@ end
|
||||||
function EnterGame.displayMotd()
|
function EnterGame.displayMotd()
|
||||||
displayInfoBox(tr('Message of the day'), G.motdMessage)
|
displayInfoBox(tr('Message of the day'), G.motdMessage)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EnterGame.setUniqueServer(host, port, protocol, windowHeight)
|
||||||
|
local hostTextEdit = enterGame:getChildById('serverHostTextEdit')
|
||||||
|
hostTextEdit:setText(host)
|
||||||
|
hostTextEdit:setVisible(false)
|
||||||
|
hostTextEdit:setHeight(0)
|
||||||
|
local portTextEdit = enterGame:getChildById('serverPortTextEdit')
|
||||||
|
portTextEdit:setText(port)
|
||||||
|
portTextEdit:setVisible(false)
|
||||||
|
portTextEdit:setHeight(0)
|
||||||
|
|
||||||
|
protocolBox:setCurrentOption(protocol)
|
||||||
|
protocolBox:setVisible(false)
|
||||||
|
protocolBox:setHeight(0)
|
||||||
|
|
||||||
|
local serverLabel = enterGame:getChildById('serverLabel')
|
||||||
|
serverLabel:setVisible(false)
|
||||||
|
serverLabel:setHeight(0)
|
||||||
|
local portLabel = enterGame:getChildById('portLabel')
|
||||||
|
portLabel:setVisible(false)
|
||||||
|
portLabel:setHeight(0)
|
||||||
|
local protocolLabel = enterGame:getChildById('protocolLabel')
|
||||||
|
protocolLabel:setVisible(false)
|
||||||
|
protocolLabel:setHeight(0)
|
||||||
|
|
||||||
|
local rememberPasswordBox = enterGame:getChildById('rememberPasswordBox')
|
||||||
|
rememberPasswordBox:setMarginTop(-5)
|
||||||
|
|
||||||
|
if not windowHeight then windowHeight = 200 end
|
||||||
|
enterGame:setHeight(windowHeight)
|
||||||
|
end
|
||||||
|
|
|
@ -59,7 +59,7 @@ MainWindow
|
||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
id: protocolComboBox
|
id: protocolComboBox
|
||||||
anchors.left: protocolLabel.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.horizontalCenter
|
anchors.right: parent.horizontalCenter
|
||||||
anchors.top: protocolLabel.bottom
|
anchors.top: protocolLabel.bottom
|
||||||
margin-top: 2
|
margin-top: 2
|
||||||
|
|
|
@ -54,7 +54,7 @@ function Locales.init()
|
||||||
end
|
end
|
||||||
|
|
||||||
addEvent( function()
|
addEvent( function()
|
||||||
localeComboBox = g_ui.createWidget('ComboBox', rootWidget:recursiveGetChildById('rightButtonsPanel'))
|
localeComboBox = g_ui.createWidget('ComboBoxRounded', rootWidget:recursiveGetChildById('rightButtonsPanel'))
|
||||||
localeComboBox:setFixedSize(true)
|
localeComboBox:setFixedSize(true)
|
||||||
for key,value in pairs(installedLocales) do
|
for key,value in pairs(installedLocales) do
|
||||||
localeComboBox:addOption(value.languageName, value.name)
|
localeComboBox:addOption(value.languageName, value.name)
|
||||||
|
|
|
@ -40,7 +40,7 @@ function Skins.init()
|
||||||
end
|
end
|
||||||
|
|
||||||
addEvent( function()
|
addEvent( function()
|
||||||
skinComboBox = g_ui.createWidget('ComboBox', rootWidget:recursiveGetChildById('rightButtonsPanel'))
|
skinComboBox = g_ui.createWidget('ComboBoxRounded', rootWidget:recursiveGetChildById('rightButtonsPanel'))
|
||||||
skinComboBox:setFixedSize(true)
|
skinComboBox:setFixedSize(true)
|
||||||
for key,value in pairs(installedSkins) do
|
for key,value in pairs(installedSkins) do
|
||||||
skinComboBox:addOption(value.name)
|
skinComboBox:addOption(value.name)
|
||||||
|
|
|
@ -42,3 +42,7 @@ ComboBox < UIComboBox
|
||||||
|
|
||||||
$on:
|
$on:
|
||||||
image-clip: 0 40 89 20
|
image-clip: 0 40 89 20
|
||||||
|
|
||||||
|
ComboBoxRounded < ComboBox
|
||||||
|
image-source: /images/combobox_rounded.png
|
||||||
|
image-border: 2
|
||||||
|
|
Loading…
Reference in New Issue