OpenTTD Source: src/script/script_config.hpp File Reference

OpenTTD Source 15.0-RC2

Data Structures | Typedefs | Enumerations | Variables
script_config.hpp File Reference

ScriptConfig stores the configuration settings of every Script. More...

`#include "../company_type.h"`
`#include "../textfile_gui.h"`
`#include "script_instance.hpp"`

Go to the source code of this file.

## Data Structures
struct | ScriptConfigItem
| Info about a single Script setting. More...
class | ScriptConfig
| Script settings. More...

## Typedefs
using | ScriptConfigFlags = EnumBitSet< ScriptConfigFlag, uint8_t >
typedef std::map< int, std::string > | LabelMapping
| Map-type used to map the setting numbers to labels.
typedef std::vector< ScriptConfigItem > | ScriptConfigItemList
| List of ScriptConfig items.

## Enumerations
enum class | ScriptConfigFlag : uint8_t { Boolean = 1 , InGame = 2 , Developer = 3 }
| Flags for Script settings. More...

## Variables
static const int | INT32_DIGITS_WITH_SIGN_AND_TERMINATION = 10 + 1 + 1
| Maximum of 10 digits for MIN / MAX_INT32, 1 for the sign and 1 for '\0'.

## Detailed Description

ScriptConfig stores the configuration settings of every Script.

Definition in file script_config.hpp.

## Typedef Documentation

## ◆ LabelMapping

typedef std::map<int, std::string> LabelMapping

Map-type used to map the setting numbers to labels.

Definition at line 30 of file script_config.hpp.

## ◆ ScriptConfigFlags

using ScriptConfigFlags = EnumBitSet<ScriptConfigFlag, uint8_t>

Definition at line 28 of file script_config.hpp.

## ◆ ScriptConfigItemList

typedef std::vector<ScriptConfigItem> ScriptConfigItemList

List of ScriptConfig items.

Definition at line 48 of file script_config.hpp.

## Enumeration Type Documentation

## ◆ ScriptConfigFlag

enum class ScriptConfigFlag : uint8_t
| strong

Flags for Script settings.

Enumerator
Boolean | This value is a boolean (either 0 (false) or 1 (true) ).
InGame | This setting can be changed while the Script is running.
Developer | This setting will only be visible when the Script development tools are active.

Definition at line 21 of file script_config.hpp.

## Variable Documentation

## ◆ INT32_DIGITS_WITH_SIGN_AND_TERMINATION

const int INT32_DIGITS_WITH_SIGN_AND_TERMINATION = 10 + 1 + 1
| static

Maximum of 10 digits for MIN / MAX_INT32, 1 for the sign and 1 for '\0'.

Definition at line 18 of file script_config.hpp.

Referenced by GSConfigWindow::OnClick(), and ScriptSettingsWindow::OnClick().