2022-01-24 10:23:08 +08:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.0
|
|
|
|
|
|
|
|
Item {
|
2022-04-30 15:27:56 +08:00
|
|
|
id: root
|
2022-01-24 10:23:08 +08:00
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
Frame {
|
|
|
|
id: join_server
|
|
|
|
anchors.centerIn: parent
|
2022-05-01 18:37:13 +08:00
|
|
|
background: Rectangle {
|
|
|
|
color: "#88888888"
|
|
|
|
radius: 2
|
|
|
|
}
|
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
Column {
|
|
|
|
spacing: 8
|
|
|
|
TextField {
|
|
|
|
id: server_addr
|
|
|
|
text: "127.0.0.1"
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: screenNameEdit
|
|
|
|
text: "player"
|
|
|
|
}
|
|
|
|
/*TextField {
|
|
|
|
id: avatarEdit
|
|
|
|
text: "liubei"
|
|
|
|
}*/
|
|
|
|
TextField {
|
|
|
|
id: passwordEdit
|
|
|
|
text: ""
|
|
|
|
echoMode: TextInput.Password
|
|
|
|
passwordCharacter: "*"
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Join Server"
|
|
|
|
onClicked: {
|
|
|
|
config.screenName = screenNameEdit.text;
|
|
|
|
config.password = passwordEdit.text;
|
|
|
|
mainWindow.busy = true;
|
|
|
|
Backend.joinServer(server_addr.text);
|
2022-01-24 10:23:08 +08:00
|
|
|
}
|
2022-04-30 15:27:56 +08:00
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Console start"
|
|
|
|
onClicked: {
|
|
|
|
config.screenName = screenNameEdit.text;
|
|
|
|
config.password = passwordEdit.text;
|
|
|
|
mainWindow.busy = true;
|
|
|
|
Backend.startServer(9527);
|
|
|
|
Backend.joinServer("127.0.0.1");
|
|
|
|
}
|
|
|
|
}
|
2022-01-24 10:23:08 +08:00
|
|
|
}
|
2022-04-30 15:27:56 +08:00
|
|
|
}
|
2022-01-24 10:23:08 +08:00
|
|
|
}
|