Skip to content

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 ​

CurrencyDefinitioncurrency_definitionnull
InventoryComponentinventory_datanull
intcurrency_id0

Methods ​

voidsetup_currency_display( currency_def: CurrencyDefinition, inventory: InventoryComponent )
voidclear_display()
voidrefresh_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)