mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
feat(ui): add AFTER_GAME state and restart flow in GameUI
- Introduced `AFTER_GAME` state to handle post-game logic. - Updated `GameUI` to show restart prompt when the game ends. - Modified `StartPage` and `MainWindow` to support restart behavior. - Adjusted `endGame` method to transition to `AFTER_GAME`.
This commit is contained in:
@@ -2,6 +2,7 @@ import {Button} from "Components.slint";
|
||||
|
||||
export component StartPage inherits Window {
|
||||
in property <bool> is-ready;
|
||||
in property <bool> is-restart;
|
||||
|
||||
callback request-start;
|
||||
|
||||
@@ -44,7 +45,7 @@ export component StartPage inherits Window {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "连接成功,所有玩家准备后开始游戏";
|
||||
text: is-restart ? "游戏结束,重新准备以重新开始游戏" : "连接成功,所有玩家准备后开始游戏";
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
horizontal-alignment: center;
|
||||
|
||||
Reference in New Issue
Block a user