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 {
|
||||
enabled: root.is-current-player-turn;
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
clicked => {
|
||||
@@ -664,7 +665,7 @@ export component GamePage inherits Window {
|
||||
player-name: current-player-name;
|
||||
card-count: current-player-card-count;
|
||||
has-uno: current-player-has-uno;
|
||||
is-current-turn: true;
|
||||
is-current-turn: is-current-player-turn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user