OpenTTD Source 20260108-master-g8ba1860eaa
script_gui.h File Reference

Window for configuring the scripts. More...

#include "../company_type.h"
#include "../textfile_type.h"

Go to the source code of this file.

Functions

void ShowScriptListWindow (CompanyID slot, bool show_all)
 Open the Script list window to chose a script for the given company slot.
 
WindowShowScriptDebugWindow (CompanyID show_company=CompanyID::Invalid(), bool new_window=false)
 Open the Script debug window and select the given company.
 
void ShowScriptSettingsWindow (CompanyID slot)
 Open the Script settings window to change the Script settings for a Script.
 
void ShowScriptTextfileWindow (Window *parent, TextfileType file_type, CompanyID slot)
 Open the Script version of the textfile window.
 
void ShowScriptDebugWindowIfScriptError ()
 Open the AI debug window if one of the AI scripts has crashed.
 
void InitializeScriptGui ()
 Reset the Script windows to their initial state.
 

Detailed Description

Window for configuring the scripts.

Definition in file script_gui.h.

Function Documentation

◆ InitializeScriptGui()

void InitializeScriptGui ( )

Reset the Script windows to their initial state.

Definition at line 1298 of file script_gui.cpp.

References ScriptDebugWindow::FilterState::script_debug_company.

◆ ShowScriptDebugWindow()

Window * ShowScriptDebugWindow ( CompanyID  show_company,
bool  new_window 
)

◆ ShowScriptDebugWindowIfScriptError()

void ShowScriptDebugWindowIfScriptError ( )

◆ ShowScriptListWindow()

void ShowScriptListWindow ( CompanyID  slot,
bool  show_all 
)

Open the Script list window to chose a script for the given company slot.

Parameters
slotThe slot to change the script of.
show_allWhether to show all available versions.

Definition at line 278 of file script_gui.cpp.

References _script_list_desc, CloseWindowByClass(), and WC_SCRIPT_LIST.

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

◆ ShowScriptSettingsWindow()

void ShowScriptSettingsWindow ( CompanyID  slot)

Open the Script settings window to change the Script settings for a Script.

Parameters
slotThe CompanyID of the Script to change the settings.

Definition at line 588 of file script_gui.cpp.

References _script_settings_desc, CloseWindowByClass(), WC_SCRIPT_LIST, and WC_SCRIPT_SETTINGS.

Referenced by AIConfigWindow::OnClick(), and ScriptDebugWindow::OnClick().

◆ ShowScriptTextfileWindow()

void ShowScriptTextfileWindow ( Window parent,
TextfileType  file_type,
CompanyID  slot 
)

Open the Script version of the textfile window.

Parameters
file_typeThe type of textfile to display.
slotThe slot the Script is using.

Definition at line 631 of file script_gui.cpp.

References Window::CloseChildWindowById(), and WC_TEXTFILE.

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