OpenTTD Source: CurrencySpec Struct Reference

OpenTTD Source 13.2.1

Public Member Functions | Data Fields
CurrencySpec Struct Reference

Specification of a currency. More...

`#include <currency.h>`

## Public Member Functions
| CurrencySpec (uint16 rate, const char *separator, Year to_euro, const char *prefix, const char *suffix, byte symbol_pos, StringID name)

## Data Fields
uint16 | rate
| The conversion rate compared to the base currency.
std::string | separator
| The thousands separator for this currency.
Year | to_euro
| Year of switching to the Euro. May also be CF_NOEURO or CF_ISEURO.
std::string | prefix
| Prefix to apply when formatting money in this currency.
std::string | suffix
| Suffix to apply when formatting money in this currency.
byte | symbol_pos
| The currency symbol is represented by two possible values, prefix and suffix Usage of one or the other is determined by symbol_pos. More...
StringID | name

## Detailed Description

Specification of a currency.

Definition at line 72 of file currency.h.

## Field Documentation

## ◆ symbol_pos

byte CurrencySpec::symbol_pos

The currency symbol is represented by two possible values, prefix and suffix Usage of one or the other is determined by symbol_pos.

0 = prefix 1 = suffix 2 = both : Special case only for custom currency. It is not a spec from Newgrf, rather a way to let users do what they want with custom currency

Definition at line 87 of file currency.h.

The documentation for this struct was generated from the following file:

- src/currency.h