Public Types | |
enum | AIConfigWindowWidgets { AIC_WIDGET_CLOSEBOX = 0, AIC_WIDGET_CAPTION, AIC_WIDGET_BACKGROUND, AIC_WIDGET_LIST, AIC_WIDGET_SCROLLBAR, AIC_WIDGET_CHANGE, AIC_WIDGET_CONFIGURE, AIC_WIDGET_CLOSE, AIC_WIDGET_RESIZE } |
Enum referring to the widgets of the AI config window. More... | |
Public Member Functions | |
virtual void | OnPaint () |
This window is currently being repainted. | |
virtual void | OnClick (Point pt, int widget) |
A click with the left mouse button has been made on the window. | |
virtual void | OnDoubleClick (Point pt, int widget) |
A double click with the left mouse button has been made on the window. | |
virtual void | OnResize (Point new_size, Point delta) |
Called when the window got resized. | |
virtual void | OnTick () |
Called once per (game) tick. | |
Data Fields | |
CompanyID | selected_slot |
bool | clicked_button |
bool | clicked_increase |
int | timeout |
Definition at line 417 of file ai_gui.cpp.
Enum referring to the widgets of the AI config window.
AIC_WIDGET_CLOSEBOX | Close window button. |
AIC_WIDGET_CAPTION | Window caption. |
AIC_WIDGET_BACKGROUND | Window background. |
AIC_WIDGET_LIST | List with currently selected AIs. |
AIC_WIDGET_SCROLLBAR | Scrollbar to scroll through the selected AIs. |
AIC_WIDGET_CHANGE | Select another AI button. |
AIC_WIDGET_CONFIGURE | Change AI settings button. |
AIC_WIDGET_CLOSE | Close window button. |
AIC_WIDGET_RESIZE | Resize button. |
Definition at line 419 of file ai_gui.cpp.
virtual void AIConfigWindow::OnClick | ( | Point | pt, | |
int | widget | |||
) | [inline, virtual] |
A click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. |
Reimplemented from Window.
Definition at line 482 of file ai_gui.cpp.
References _settings_newgame, AIC_WIDGET_BACKGROUND, AIC_WIDGET_CHANGE, AIC_WIDGET_CLOSE, AIC_WIDGET_CONFIGURE, AIC_WIDGET_LIST, DifficultySettings::diff_level, GameSettings::difficulty, INVALID_COMPANY, INVALID_STRING_ID, IsInsideBS(), max(), MAX_COMPANIES, DifficultySettings::max_no_competitors, min(), Scrollbar::pos, Window::SetDirty(), Window::vscroll, Point::x, and Point::y.
Referenced by OnDoubleClick().
virtual void AIConfigWindow::OnDoubleClick | ( | Point | pt, | |
int | widget | |||
) | [inline, virtual] |
A double click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. |
Reimplemented from Window.
Definition at line 525 of file ai_gui.cpp.
References AIC_WIDGET_LIST, INVALID_COMPANY, and OnClick().
Called when the window got resized.
new_size | the new size of the window. | |
delta | the amount of which the window size changed. |
Reimplemented from Window.
Definition at line 535 of file ai_gui.cpp.
References AIC_WIDGET_LIST, Scrollbar::cap, Widget::data, Window::vscroll, Window::widget, and Point::y.