Multi Currency View
Create Currency Views and Currency Owner Monitors with using the UI Designer Currency tab.
Multi Currency View
Currencies are displayed using a Multi Currency View. It maps a Currency to a Currency View. Once a Currency Amount or a Currency Collection is set the Multi Currency View will display the amount of each currency specified.
Useful API methods include:
// Draw the currency on the Multi Currency View by using a Currency Collection or a Currency Amount array. m_MultiCurrencyView.DrawCurrency(currencyCollection); m_MultiCurrencyView.DrawCurrency(currencyAmounts); // Set the text color, useful to shop or crafting menus to display if there is enough currency for example. m_MultiCurrencyView.SetTextColor(color);
Currency View
Similarly to Item Views, Currency Views can be customized. Although usually all that is suggested is to specify an Image component to display the Currency Icon set in the editor.
Useful API methods include:
// Set the amount of currency to display. m_CurrencyView.SetValue(currencyAmount);
Currency Owner Monitor
The Currency Owner Monitor uses a Multi Currency View to display a Currency Owner amount of currency. The Currency Owner can be easily found using an Inventory Identifier ID.
Useful API methods include:
// Set the Currency Owner to Monitor. m_CurrencyOwnerMonitor.SetCurrencyOwner(currencyOwner);