Grid currency, partial
This commit is contained in:
@@ -46,6 +46,8 @@
|
||||
#include "llwindow.h"
|
||||
#include "llappviewer.h"
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
static const S32 STANDARD_BUY_AMOUNT = 2000;
|
||||
static const S32 MINIMUM_BALANCE_AMOUNT = 0;
|
||||
|
||||
@@ -263,9 +265,11 @@ void LLFloaterBuyCurrencyUI::updateUI()
|
||||
childSetVisible("buy_action", true);
|
||||
childSetTextArg("buy_action", "[NAME]", mTargetName);
|
||||
childSetTextArg("buy_action", "[PRICE]", llformat("%d",mTargetPrice));
|
||||
childSetTextArg("buy_action", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetTextArg("buy_action_unknown", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
childSetVisible("buy_action_unknown", true);
|
||||
}
|
||||
}
|
||||
@@ -274,16 +278,19 @@ void LLFloaterBuyCurrencyUI::updateUI()
|
||||
childShow("balance_label");
|
||||
childShow("balance_amount");
|
||||
childSetTextArg("balance_amount", "[AMT]", llformat("%d", balance));
|
||||
childSetTextArg("balance_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
|
||||
S32 buying = mManager.getAmount();
|
||||
childShow("buying_label");
|
||||
childShow("buying_amount");
|
||||
childSetTextArg("buying_amount", "[AMT]", llformat("%d", buying));
|
||||
childSetTextArg("buying_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
|
||||
S32 total = balance + buying;
|
||||
childShow("total_label");
|
||||
childShow("total_amount");
|
||||
childSetTextArg("total_amount", "[AMT]", llformat("%d", total));
|
||||
childSetTextArg("total_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
|
||||
childSetVisible("purchase_warning_repurchase", false);
|
||||
childSetVisible("purchase_warning_notenough", false);
|
||||
|
||||
Reference in New Issue
Block a user