finances_react_util¶
Source: base/tealdef/game_mechanics/finance/finances_react_util.d.tl
Notes
Chart, legend and slider recipes of the finances window.
FinancesReactUtil¶
record global base/tealdef/game_mechanics/finance/finances_react_util.d.tl:3
global record FinancesReactUtil
Load: local finances_react_util = ug_require "/game_mechanics/finance/finances_react_util.tl"
Notes
Recipes of the finances window.
Fields
| Name | Type | Description |
|---|---|---|
FinancesChart |
Recipe<FinancesChartParam> |
Chart recipe. used 4× in the base game |
FinancesChartLegend |
Recipe<FinancesChartLegendParam> |
Legend recipe. used 3× in the base game |
FinancesCargoLegend |
Recipe<FinancesCargoLegendParam> |
Cargo legend recipe. used 1× in the base game |
FinancesSlider |
Recipe<FinancesSliderParam> |
Slider recipe. used 1× in the base game |
FinancesReactUtil.FinancesChartParam¶
record base/tealdef/game_mechanics/finance/finances_react_util.d.tl:4
record FinancesChartParam
Notes
Params of the finances chart.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/finance/finances_react_util.tl:12
Fields
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
Series to draw. |
labels |
{string} |
Series labels. |
colors |
{Vec4f} |
Series colours. |
chartType |
Builtin.SeriesParam.Type |
Chart type of the series. |
lineWidth |
number |
Line width. |
Functions
xFormatter(number) : string base/tealdef/game_mechanics/finance/finances_react_util.d.tl:10
Notes
Formats x-axis labels.
Returns string
yFormatter(number) : string base/tealdef/game_mechanics/finance/finances_react_util.d.tl:11
Notes
Formats y-axis labels.
Returns string
FinancesReactUtil.FinancesChartLegendParam¶
record base/tealdef/game_mechanics/finance/finances_react_util.d.tl:15
record FinancesChartLegendParam
Notes
Params of the chart legend.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/finance/finances_react_util.tl:44
Fields
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
Series of the chart. |
labels |
{string} |
Series labels. |
colors |
{Vec4f} |
Series colours. |
FinancesReactUtil.FinancesCargoLegendParam¶
record base/tealdef/game_mechanics/finance/finances_react_util.d.tl:22
record FinancesCargoLegendParam
Notes
Params of the cargo legend, whose check boxes show or hide series.
Used in the base game: 2 times in 1 file
base/content/game_mechanics/game_mechanics/finance/finances_react_util.tl:90
Fields
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
Series of the chart. |
labels |
{string} |
Series labels. |
colors |
{Vec4f} |
Series colours. |
icons |
{string} |
Cargo icons. |
logNames |
{string} |
Log name of each series, passed to setVisible. |
Functions
yFormatter(number) : string base/tealdef/game_mechanics/finance/finances_react_util.d.tl:28
Notes
Formats values.
Returns string
setVisible(logName : string, show : boolean) base/tealdef/game_mechanics/finance/finances_react_util.d.tl:29
Notes
Shows or hides a series.
| Parameter | Type | Description |
|---|---|---|
logName |
string |
Log name of the series. |
show |
boolean |
true to show. |
FinancesReactUtil.FinancesSliderParam¶
record base/tealdef/game_mechanics/finance/finances_react_util.d.tl:33
record FinancesSliderParam
Notes
Params of the slider with text before and after it.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/finance/finances_react_util.tl:272
Fields
| Name | Type | Description |
|---|---|---|
value |
integer |
Current value. |
min |
integer |
Minimum. |
max |
integer |
Maximum. |
prefix |
string |
Text before the slider. |
postfix |
string |
Text after the slider. |
Functions
onValueChange(integer) : string base/tealdef/game_mechanics/finance/finances_react_util.d.tl:37
Notes
Called with the new value.
Returns string