FreeKill/qml/GlobalPopups/CreateRoom.qml

65 lines
1.2 KiB
QML
Raw Normal View History

2022-03-27 12:00:29 +00:00
import QtQuick 2.15
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.15
Item {
id: root
2022-03-27 12:00:29 +00:00
width: childrenRect.width
height: childrenRect.height
2022-03-27 12:00:29 +00:00
signal finished()
2022-03-27 12:00:29 +00:00
ColumnLayout {
spacing: 20
2022-03-27 12:00:29 +00:00
RowLayout {
anchors.rightMargin: 8
spacing: 16
Text {
text: Backend.translate("Room Name")
}
TextField {
id: roomName
font.pixelSize: 18
text: Backend.translate("$RoomName").arg(Self.screenName)
}
}
2022-03-27 12:00:29 +00:00
RowLayout {
anchors.rightMargin: 8
spacing: 16
Text {
text: Backend.translate("Player num")
}
SpinBox {
id: playerNum
from: 2
to: 8
}
}
2022-03-27 12:00:29 +00:00
RowLayout {
anchors.rightMargin: 8
spacing: 16
Button {
text: Backend.translate("OK")
onClicked: {
root.finished();
mainWindow.busy = true;
ClientInstance.notifyServer(
"CreateRoom",
JSON.stringify([roomName.text, playerNum.value])
);
}
}
Button {
text: Backend.translate("Cancel")
onClicked: {
root.finished();
2022-03-27 12:00:29 +00:00
}
}
2022-03-27 12:00:29 +00:00
}
}
2022-03-27 12:00:29 +00:00
}