OpenTTD Source 20241224-master-gee860a5c8e
|
Information about one grf parameter. More...
#include <newgrf_config.h>
Public Member Functions | |
GRFParameterInfo (uint nr) | |
Create a new empty GRFParameterInfo object. | |
void | Finalize () |
Finalize Action 14 info after file scan is finished. | |
Data Fields | |
GRFTextList | name = {} |
The name of this parameter. | |
GRFTextList | desc = {} |
The description of this parameter. | |
uint32_t | min_value = 0 |
The minimal value this parameter can have. | |
uint32_t | max_value = UINT32_MAX |
The maximal value of this parameter. | |
uint32_t | def_value = 0 |
Default value of this parameter. | |
GRFParameterType | type = PTYPE_UINT_ENUM |
The type of this parameter. | |
uint8_t | param_nr |
GRF parameter to store content in. | |
uint8_t | first_bit = 0 |
First bit to use in the GRF parameter. | |
uint8_t | num_bit = 32 |
Number of bits to use for this parameter. | |
bool | complete_labels = false |
True if all values have a label. | |
std::map< uint32_t, GRFTextList > | value_names = {} |
Names for each value. | |
Information about one grf parameter.
Definition at line 126 of file newgrf_config.h.
|
inlineexplicit |
Create a new empty GRFParameterInfo object.
nr | The newgrf parameter that is changed. |
Definition at line 131 of file newgrf_config.h.
void GRFParameterInfo::Finalize | ( | ) |
Finalize Action 14 info after file scan is finished.
Definition at line 212 of file newgrf_config.cpp.
References complete_labels, max_value, min_value, and value_names.
bool GRFParameterInfo::complete_labels = false |
True if all values have a label.
Definition at line 146 of file newgrf_config.h.
Referenced by Finalize().
uint32_t GRFParameterInfo::def_value = 0 |
Default value of this parameter.
Definition at line 138 of file newgrf_config.h.
Referenced by ChangeGRFParamDefault().
GRFTextList GRFParameterInfo::desc = {} |
The description of this parameter.
Definition at line 134 of file newgrf_config.h.
Referenced by ChangeGRFParamDescription().
uint8_t GRFParameterInfo::first_bit = 0 |
First bit to use in the GRF parameter.
Definition at line 143 of file newgrf_config.h.
Referenced by ChangeGRFParamMask().
uint32_t GRFParameterInfo::max_value = UINT32_MAX |
The maximal value of this parameter.
Definition at line 137 of file newgrf_config.h.
Referenced by ChangeGRFParamLimits(), ChangeGRFParamValueNames(), and Finalize().
uint32_t GRFParameterInfo::min_value = 0 |
The minimal value this parameter can have.
Definition at line 136 of file newgrf_config.h.
Referenced by ChangeGRFParamLimits(), and Finalize().
GRFTextList GRFParameterInfo::name = {} |
The name of this parameter.
Definition at line 133 of file newgrf_config.h.
Referenced by ChangeGRFParamName().
uint8_t GRFParameterInfo::num_bit = 32 |
Number of bits to use for this parameter.
Definition at line 144 of file newgrf_config.h.
Referenced by ChangeGRFParamMask().
uint8_t GRFParameterInfo::param_nr |
GRF parameter to store content in.
Definition at line 142 of file newgrf_config.h.
Referenced by ChangeGRFParamMask(), NewGRFParametersWindow::GetDummyParameterInfo(), GRFConfig::GetValue(), and GRFConfig::SetValue().
GRFParameterType GRFParameterInfo::type = PTYPE_UINT_ENUM |
The type of this parameter.
Definition at line 140 of file newgrf_config.h.
Referenced by ChangeGRFParamLimits(), ChangeGRFParamType(), NewGRFParametersWindow::DrawWidget(), and NewGRFParametersWindow::OnClick().
std::map<uint32_t, GRFTextList> GRFParameterInfo::value_names = {} |
Names for each value.
Definition at line 148 of file newgrf_config.h.
Referenced by ChangeGRFParamValueNames(), and Finalize().