fix(ui): bind turn state to TouchArea and player component

- Enabled `TouchArea` based on the current player's turn.
- Updated player component to reflect dynamic turn state.
This commit is contained in:
Kieran Kihn
2025-12-10 22:30:44 +08:00
parent 955aa0956d
commit 3fa3dbcb2a

View File

@@ -613,6 +613,7 @@ export component GamePage inherits Window {
} }
TouchArea { TouchArea {
enabled: root.is-current-player-turn;
width: parent.width; width: parent.width;
height: parent.height; height: parent.height;
clicked => { clicked => {
@@ -664,7 +665,7 @@ export component GamePage inherits Window {
player-name: current-player-name; player-name: current-player-name;
card-count: current-player-card-count; card-count: current-player-card-count;
has-uno: current-player-has-uno; has-uno: current-player-has-uno;
is-current-turn: true; is-current-turn: is-current-player-turn;
} }
} }