show user coins and mbux in casino

master
Aevann 2023-03-24 19:13:50 +02:00
parent e359bc008d
commit d096e3eaf6
2 changed files with 21 additions and 12 deletions

View File

@ -13,10 +13,12 @@ function initializeGame() {
function updatePlayerCurrencies(updated) {
if (updated.coins) {
document.getElementById("user-coins-amount").innerText = updated.coins;
document.getElementById("user-coins-amount-casino").innerText = updated.coins;
}
if (updated.marseybux) {
document.getElementById("user-bux-amount").innerText = updated.marseybux;
document.getElementById("user-bux-amount-casino").innerText = updated.marseybux;
}
}

View File

@ -39,18 +39,25 @@
<hr>
</div>
<div class="btn-group">
<span class="unbreakable mr-3">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
value="coin" checked>
<label for="wagerCoins" class="btn btn-primary border-0 pl-0">
<label for="wagerCoins" class="btn btn-primary border-0 px-0">
<img id="wagerCoinsImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=1" alt="coin" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin">
</label>
<input type="radio" class="btn-check ml-2" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
<span id="user-coins-amount-casino">{{v.coins}}</span>
</span>
<span class="unbreakable">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
value="marseybux">
<label for="wagerMarseybux" class="btn btn-primary border-0 pl-0">
<label for="wagerMarseybux" class="btn btn-primary border-0 px-0">
<img id="wagerMarseybuxImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/marseybux.webp?x=1" alt="marseybux" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Marseybux">
</label>
<span id="user-bux-amount-casino">{{v.marseybux}}</span>
</span>
</div>
</div>
</div>