2022-01-24 02:23:08 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Frame {
|
|
|
|
id: join_server
|
|
|
|
anchors.centerIn: parent
|
|
|
|
Column {
|
|
|
|
spacing: 8
|
|
|
|
TextField {
|
|
|
|
id: server_addr
|
|
|
|
text: "127.0.0.1"
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
text: "player"
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Join Server"
|
|
|
|
onClicked: {
|
2022-03-01 05:18:00 +00:00
|
|
|
mainWindow.busy = true;
|
|
|
|
toast.show("Connecting to host...");
|
2022-01-24 02:23:08 +00:00
|
|
|
Backend.joinServer(server_addr.text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Console start"
|
|
|
|
onClicked: {
|
2022-03-01 05:18:00 +00:00
|
|
|
mainWindow.busy = true;
|
|
|
|
toast.show("Connecting to host...");
|
2022-01-24 02:23:08 +00:00
|
|
|
Backend.startServer(9527);
|
|
|
|
Backend.joinServer("127.0.0.1");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|