EnterGame with unique server option, ComboboxRounded

master
Henrique Santiago 12 years ago
parent 0f980ec18b
commit 217291b486

@ -172,3 +172,34 @@ end
function EnterGame.displayMotd()
displayInfoBox(tr('Message of the day'), G.motdMessage)
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
id: protocolComboBox
anchors.left: protocolLabel.left
anchors.left: parent.left
anchors.right: parent.horizontalCenter
anchors.top: protocolLabel.bottom
margin-top: 2

@ -54,7 +54,7 @@ function Locales.init()
end
addEvent( function()
localeComboBox = g_ui.createWidget('ComboBox', rootWidget:recursiveGetChildById('rightButtonsPanel'))
localeComboBox = g_ui.createWidget('ComboBoxRounded', rootWidget:recursiveGetChildById('rightButtonsPanel'))
localeComboBox:setFixedSize(true)
for key,value in pairs(installedLocales) do
localeComboBox:addOption(value.languageName, value.name)

@ -40,7 +40,7 @@ function Skins.init()
end
addEvent( function()
skinComboBox = g_ui.createWidget('ComboBox', rootWidget:recursiveGetChildById('rightButtonsPanel'))
skinComboBox = g_ui.createWidget('ComboBoxRounded', rootWidget:recursiveGetChildById('rightButtonsPanel'))
skinComboBox:setFixedSize(true)
for key,value in pairs(installedSkins) do
skinComboBox:addOption(value.name)

@ -42,3 +42,7 @@ ComboBox < UIComboBox
$on:
image-clip: 0 40 89 20
ComboBoxRounded < ComboBox
image-source: /images/combobox_rounded.png
image-border: 2

Loading…
Cancel
Save