mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user