Functions

# ai_gui.hpp File Reference

Window for configuring the AIs More...

`#include "../company_type.h"`

Go to the source code of this file.

## Functions
Window * | ShowAIDebugWindow (CompanyID show_company=INVALID_COMPANY)
| Open the AI debug window and select the given company.
void | ShowAIConfigWindow ()
| Open the AI config window.
void | ShowAIDebugWindowIfAIError ()
| Open the AI debug window if one of the AI scripts has crashed.
void | InitializeAIGui ()
| Reset the AI windows to their initial state.

## Detailed Description

Window for configuring the AIs

Definition in file ai_gui.hpp.

## Function Documentation

void ShowAIConfigWindow | ( |  | ) |

Open the AI config window.

Definition at line 937 of file ai_gui.cpp.

References DeleteWindowByClass(), and WC_GAME_OPTIONS.

Referenced by MenuClickSettings(), and SelectGameWindow::OnClick().

Window* ShowAIDebugWindow | ( | CompanyID | show_company | ) |

Open the AI debug window and select the given company.

Parameters:

  | show_company | Display debug information about this AI company.

Definition at line 1502 of file ai_gui.cpp.

References _ai_debug_desc, _network_server, _networking, BringWindowToFrontById(), AIDebugWindow::ChangeToAI(), INVALID_COMPANY, INVALID_STRING_ID, ShowErrorMessage(), WC_AI_DEBUG, and WL_INFO.

Referenced by AIDebugGlobalHotkeys(), GameInstance::Died(), AIInstance::Died(), MenuClickHelp(), MainToolbarWindow::OnHotkey(), and ShowAIDebugWindowIfAIError().

void ShowAIDebugWindowIfAIError | ( |  | ) |

Open the AI debug window if one of the AI scripts has crashed.

Definition at line 1525 of file ai_gui.cpp.

References _network_server, _networking, Game::GetGameInstance(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, CompanyProperties::is_ai, ScriptInstance::IsDead(), OWNER_DEITY, and ShowAIDebugWindow().

Referenced by InitializeWindowsAndCaches().