Skip to content

Commit

Permalink
fix: result translation (again) + player table special cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliboy50 committed Aug 22, 2023
1 parent 95ad542 commit 2749405
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
18 changes: 11 additions & 7 deletions velonimo.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ Board
.player-table.player-position-bottom .player-table-name {
bottom: 10px;
}
/* Put the player name below the finished image even when players are at the top of the board */
.player-table.player-position-top.has-finished-1 .player-table-name,
.player-table.player-position-top.has-finished-2 .player-table-name,
.player-table.player-position-top.has-finished-3 .player-table-name,
.player-table.player-position-top.has-finished-4 .player-table-name {
top: 120px;
}
.player-table-hand {
position: absolute;
width: 90px;
Expand Down Expand Up @@ -291,15 +298,12 @@ Board
bottom: 50px;
}
.player-special-cards div {
display: block;
display: none;
width: 30px;
height: 30px;
background-image: url('img/cards.png'); /* background-position is dynamically computed */
background-size: 630px 1134px; /* width = cardWidth * number of columns in sprite ; height = cardHeight * number of rows in sprite */
border-radius: 50%;
opacity: 0;
transition-property: opacity;
transition-duration: 0.5s;
z-index: 5;
}
.player-table.has-jersey .player-table-jersey,
Expand All @@ -309,7 +313,7 @@ Board
.player-table.has-legends-coach-shark .player-table-legends-coach,
.player-table.has-legends-coach-badger .player-table-legends-coach,
.player-table.has-legends-coach-elephant .player-table-legends-coach {
opacity: 1;
display: block;
}
.player-table.has-jersey.has-used-jersey .player-table-jersey,
.player-table.has-legends-broom-wagon.has-used-legends-broom-wagon .player-table-legends-broom-wagon,
Expand Down Expand Up @@ -340,10 +344,10 @@ Board
pointer-events: none;
}
.player-table.player-position-top .player-table-finish-position {
bottom: -20px;
bottom: -25px;
}
.player-table.player-position-bottom .player-table-finish-position {
top: -20px;
top: -25px;
}
.player-table.has-finished-1 .player-table-finish-position,
.player-table.has-finished-2 .player-table-finish-position,
Expand Down
12 changes: 5 additions & 7 deletions velonimo.game.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,13 +1263,11 @@ function stEndRound() {
}
$this->notifyAllPlayers('tableWindow', '', [
'id' => 'finalScoring',
'title' => [
'str' => clienttranslate('Result of round ${currentRound}/${howManyRounds}'),
'args' => [
'currentRound' => $currentRound,
'howManyRounds' => $howManyRounds,
],
],
'title' => sprintf(
clienttranslate('Result of round %s/%s'),
$currentRound,
$howManyRounds
),
'table' => [
$headers,
$previousPoints,
Expand Down
4 changes: 2 additions & 2 deletions velonimo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@ function (dojo, declare) {
if (selectedCardsGroup) {
if (!$(DOM_ID_PLAYER_HAND_UNGROUP_CARDS_BUTTON)) {
dojo.place(
`<a href="javascript:void(0)" id="${DOM_ID_PLAYER_HAND_UNGROUP_CARDS_BUTTON}" class="bgabutton bgabutton_red"><span>${_('Ungroup cards')}</span></a>`,
`<a href="javascript:void(0)" id="${DOM_ID_PLAYER_HAND_UNGROUP_CARDS_BUTTON}" class="bgabutton bgabutton_gray"><span>${_('Ungroup cards')}</span></a>`,
DOM_ID_PLAYER_HAND_TITLE_WRAPPER_LEFT
);
this.addTooltip(DOM_ID_PLAYER_HAND_UNGROUP_CARDS_BUTTON, '', _('Click this button to stop grouping selected cards.'));
Expand All @@ -2979,7 +2979,7 @@ function (dojo, declare) {
} else if (selectedCards.length > 1 && this.getCardsValue(selectedCards) > 0) {
if (!$(DOM_ID_PLAYER_HAND_GROUP_CARDS_BUTTON)) {
dojo.place(
`<a href="javascript:void(0)" id="${DOM_ID_PLAYER_HAND_GROUP_CARDS_BUTTON}" class="bgabutton bgabutton_blue"><span>${_('Group cards')}</span></a>`,
`<a href="javascript:void(0)" id="${DOM_ID_PLAYER_HAND_GROUP_CARDS_BUTTON}" class="bgabutton bgabutton_gray"><span>${_('Group cards')}</span></a>`,
DOM_ID_PLAYER_HAND_TITLE_WRAPPER_LEFT
);
this.addTooltip(DOM_ID_PLAYER_HAND_GROUP_CARDS_BUTTON, '', _('Click this button to group selected cards. Grouped cards are not affected by sorting.'));
Expand Down

0 comments on commit 2749405

Please sign in to comment.