Found a town window class. More...
Public Member Functions | |
FoundTownWindow (WindowDesc *desc, WindowNumber window_number) | |
void | RandomTownName () |
void | UpdateButtons (bool check_availability) |
void | ExecuteFoundTownCommand (TileIndex tile, bool random, StringID errstr, CommandCallback cc) |
virtual void | OnClick (Point pt, int widget, int click_count) |
A click with the left mouse button has been made on the window. | |
virtual void | OnPlaceObject (Point pt, TileIndex tile) |
The user clicked some place on the map when a tile highlight mode has been set. | |
virtual void | OnPlaceObjectAbort () |
The user cancelled a tile highlight mode that has been set. | |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Some data on this window has become invalid. | |
Private Attributes | |
TownSize | town_size |
Selected town size. | |
TownLayout | town_layout |
Selected town layout. | |
bool | city |
Are we building a city? | |
QueryString | townname_editbox |
Townname editbox. | |
bool | townnamevalid |
Is generated town name valid? | |
uint32 | townnameparts |
Generated town name. | |
TownNameParams | params |
Town name parameters. |
Found a town window class.
Definition at line 1037 of file town_gui.cpp.
virtual void FoundTownWindow::OnClick | ( | Point | pt, | |
int | widget, | |||
int | click_count | |||
) | [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. | |
click_count | Number of fast consecutive clicks at same position |
Reimplemented from Window.
Definition at line 1117 of file town_gui.cpp.
References _generating_world, city, GenerateTowns(), HandlePlacePushButton(), HT_RECT, Window::SetDirty(), Window::SetFocusedWidget(), Window::SetWidgetLoweredState(), ShowErrorMessage(), town_layout, town_size, UpdateNearestTownForRoadTiles(), WID_TF_CITY, WID_TF_LAYOUT_BETTER, WID_TF_LAYOUT_GRID2, WID_TF_LAYOUT_GRID3, WID_TF_LAYOUT_ORIGINAL, WID_TF_LAYOUT_RANDOM, WID_TF_MANY_RANDOM_TOWNS, WID_TF_NEW_TOWN, WID_TF_RANDOM_TOWN, WID_TF_SIZE_LARGE, WID_TF_SIZE_MEDIUM, WID_TF_SIZE_RANDOM, WID_TF_SIZE_SMALL, WID_TF_TOWN_NAME_EDITBOX, WID_TF_TOWN_NAME_RANDOM, and WL_INFO.
virtual void FoundTownWindow::OnInvalidateData | ( | int | data = 0 , |
|
bool | gui_scope = true | |||
) | [inline, virtual] |
Some data on this window has become invalid.
data | Information about the changed data. | |
gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details. |
Reimplemented from Window.
Definition at line 1178 of file town_gui.cpp.
The user clicked some place on the map when a tile highlight mode has been set.
pt | the exact point on the map that has been clicked. | |
tile | the tile on the map that has been clicked. |
Reimplemented from Window.
Definition at line 1162 of file town_gui.cpp.