Appearance
Money
Inherits: LibTSMModule
Functions
FromString
lua
function UI.Money.FromString(value)
-> number?Converts a string money value to a number value (in copper). The value passed to this function can contain colored text, but must use g/s/c for the denominations and not icons.
Parameters:
| Name | Type | Description |
|---|---|---|
value | string | The money value to be converted as a string |
Returns:
| Type | Description |
|---|---|
number? |
ToStringExact
lua
function UI.Money.ToStringExact(value, color)
-> stringConverts a money value to a string with maximum precision.
Parameters:
| Name | Type | Description |
|---|---|---|
value | number | The value in copper |
color | string | An optional color value |
Returns:
| Type | Description |
|---|---|
string |
ToStringForAH
lua
function UI.Money.ToStringForAH(value, color, disabled)
-> stringConverts a money value to a string with settings suitable for the auction house.
Parameters:
| Name | Type | Description |
|---|---|---|
value | number | The value in copper |
color | string | An optional color value |
disabled | boolean | Optionally use the disabled tokens |
Returns:
| Type | Description |
|---|---|
string |
ToStringForTooltip
lua
function UI.Money.ToStringForTooltip(value, color, useIcon, disabled)
-> stringConverts a money value to a string with maximum precision.
Parameters:
| Name | Type | Description |
|---|---|---|
value | number | The value in copper |
color | string | The color value |
useIcon | boolean | Use icons instead of text |
disabled | boolean | Use the disabled format |
Returns:
| Type | Description |
|---|---|
string |
ToStringForUI
lua
function UI.Money.ToStringForUI(value, color)
-> stringConverts a money value to a string with settings suitable for the UI.
Parameters:
| Name | Type | Description |
|---|---|---|
value | number | The value in copper |
color | string | An optional color value |
Returns:
| Type | Description |
|---|---|
string |
ToStringForUIShort
lua
function UI.Money.ToStringForUIShort(value)
-> stringConverts a money value to as short of a string as possible for display in the UI.
Parameters:
| Name | Type | Description |
|---|---|---|
value | number | The value in copper |
Returns:
| Type | Description |
|---|---|
string |