refactor(ui): update Slint UI paths and update CMakeList.txt accordingly

This commit is contained in:
Kieran Kihn
2025-12-09 20:17:12 +08:00
parent bea9caa078
commit 592ae1ad23
5 changed files with 1 additions and 1 deletions

33
ui/MainWindow.slint Normal file
View File

@@ -0,0 +1,33 @@
import { ConnectPage } from "ConnectPage.slint";
import { StartPage } from "StartPage.slint";
enum PageType {
ConnectPage,
StartPage,
GamePage
}
export component MainWindow inherits Window {
in property <PageType> active-page: PageType.ConnectPage;
in property <bool> is-connecting;
in property <bool> is-ready;
callback request-connect(string, string, string);
callback request-start;
width: 1920px;
height: 1080px;
if root.active-page == PageType.ConnectPage: connect-page := ConnectPage {
is-connecting: root.is-connecting;
request-connect(server-address, server-port, player-name) => {
root.request-connect(server-address, server-port, player-name);
}
}
if root.active-page == PageType.StartPage: start-page := StartPage {
is-ready: root.is-ready;
request-start => {
root.request-start();
}
}
}