CurrencyDisplay ​
Inherits: HBoxContainer
Enhanced display component for showing a single currency with icon and amount
Description ​
This component displays a currency's icon and formatted amount. It automatically updates when the currency amount changes.
Variables ​
CurrencyDefinition | currency_definition | null |
InventoryComponent | inventory_data | null |
int | currency_id | 0 |
Methods ​
void | setup_currency_display( currency_def: CurrencyDefinition, inventory: InventoryComponent ) |
void | clear_display() |
void | refresh_display() |
Variable descriptions ​
CurrencyDefinition currency_definition = null ​
The currency definition being displayed
InventoryComponent inventory_data = null ​
The inventory data that contains the currency amounts
int currency_id = 0 ​
The currency ID we're displaying
Method descriptions ​
void setup_currency_display( currency_def: CurrencyDefinition, inventory: InventoryComponent ) ​
Setup this display for a specific currency (original method) @param currency_def: The currency definition to display @param inventory: The inventory data to get amounts from
void clear_display() ​
Clear the display and disconnect signals
void refresh_display() ​
Force refresh the display (useful for manual updates)