mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 12:20:00 +02:00
Show real balance
This commit is contained in:
parent
a91c0cb169
commit
f28544e405
1 changed files with 11 additions and 2 deletions
|
@ -27,6 +27,9 @@ Item {
|
|||
|
||||
Hifi.QmlCommerce {
|
||||
id: commerce;
|
||||
onBalanceResult : {
|
||||
balanceText.text = parseFloat(balance/100).toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
@ -84,12 +87,18 @@ Item {
|
|||
color: hifi.colors.darkGray;
|
||||
// Alignment
|
||||
horizontalAlignment: Text.AlignRight;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
commerce.balance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Balance Text
|
||||
FiraSansRegular {
|
||||
text: "0.00";
|
||||
id: balanceText;
|
||||
// Text size
|
||||
size: 28;
|
||||
// Anchors
|
||||
|
|
Loading…
Reference in a new issue