2013-02-23 12:41:21 +01:00
|
|
|
MainWindow
|
|
|
|
id: addServerWindow
|
|
|
|
!text: tr('New Server')
|
|
|
|
size: 180 180
|
|
|
|
visible: false
|
|
|
|
@onEscape: AddServer.hide()
|
2013-02-27 13:01:51 +01:00
|
|
|
@onEnter: AddServer.add()
|
2013-02-23 12:41:21 +01:00
|
|
|
|
|
|
|
Label
|
|
|
|
id: hostLabel
|
2013-02-24 00:15:12 +01:00
|
|
|
!text: tr('Host') .. ':'
|
2013-02-23 12:41:21 +01:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
margin-bottom: 2
|
|
|
|
|
|
|
|
TextEdit
|
|
|
|
id: host
|
|
|
|
anchors.top: hostLabel.bottom
|
|
|
|
anchors.left: hostLabel.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
auto-focus: first
|
|
|
|
|
|
|
|
Label
|
|
|
|
id: portLabel
|
2013-02-24 00:15:12 +01:00
|
|
|
!text: tr('Port') .. ':'
|
2013-02-23 12:41:21 +01:00
|
|
|
anchors.top: host.bottom
|
|
|
|
anchors.left: host.left
|
|
|
|
margin-top: 3
|
|
|
|
margin-bottom: 2
|
|
|
|
|
|
|
|
TextEdit
|
|
|
|
id: port
|
|
|
|
text: 7171
|
|
|
|
anchors.top: portLabel.bottom
|
|
|
|
anchors.left: portLabel.left
|
|
|
|
anchors.right: host.right
|
|
|
|
|
|
|
|
Label
|
|
|
|
id: protocolLabel
|
2013-02-24 00:15:12 +01:00
|
|
|
!text: tr('Protocol') .. ':'
|
2013-02-23 12:41:21 +01:00
|
|
|
anchors.top: port.bottom
|
|
|
|
anchors.left: port.left
|
|
|
|
margin-top: 3
|
|
|
|
margin-bottom: 2
|
|
|
|
|
|
|
|
ComboBox
|
|
|
|
id: protocol
|
|
|
|
anchors.top: protocolLabel.bottom
|
|
|
|
anchors.left: protocolLabel.left
|
|
|
|
anchors.right: port.right
|
|
|
|
@onSetup: |
|
2013-08-04 00:21:08 +02:00
|
|
|
for _, proto in pairs(g_game.getSupportedClients()) do
|
2013-02-23 12:41:21 +01:00
|
|
|
self:addOption(proto)
|
|
|
|
end
|
|
|
|
|
|
|
|
Button
|
|
|
|
id: buttonAdd
|
|
|
|
!text: tr('Add')
|
|
|
|
width: 64
|
|
|
|
anchors.right: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
2013-02-27 13:01:51 +01:00
|
|
|
margin-right: 2
|
|
|
|
@onClick: AddServer.add()
|
2013-02-23 12:41:21 +01:00
|
|
|
|
|
|
|
Button
|
|
|
|
id: buttonCancel
|
|
|
|
!text: tr('Cancel')
|
|
|
|
width: 64
|
|
|
|
anchors.left: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
2013-02-27 13:01:51 +01:00
|
|
|
margin-left: 2
|
2013-02-23 12:41:21 +01:00
|
|
|
@onClick: AddServer.hide()
|