OpenTTD Source 20241224-master-gee860a5c8e
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

typedef std::map< int, std::string > LabelMapping
 Map-type used to map the setting numbers to labels.
 
typedef std::vector< ScriptConfigItemScriptConfigItemList
 List of ScriptConfig items.
 

Enumerations

enum  ScriptConfigFlags { SCRIPTCONFIG_NONE = 0x0 , SCRIPTCONFIG_BOOLEAN = 0x2 , SCRIPTCONFIG_INGAME = 0x4 , SCRIPTCONFIG_DEVELOPER = 0x8 }
 Bitmask of 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 29 of file script_config.hpp.

◆ ScriptConfigItemList

typedef std::vector<ScriptConfigItem> ScriptConfigItemList

List of ScriptConfig items.

Definition at line 44 of file script_config.hpp.

Enumeration Type Documentation

◆ ScriptConfigFlags

Bitmask of flags for Script settings.

Enumerator
SCRIPTCONFIG_NONE 

No flags set.

SCRIPTCONFIG_BOOLEAN 

This value is a boolean (either 0 (false) or 1 (true) ).

SCRIPTCONFIG_INGAME 

This setting can be changed while the Script is running.

SCRIPTCONFIG_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().