Public Member Functions | |
VehicleListWindow (const WindowDesc *desc, WindowNumber window_number) | |
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 | OnDropdownSelect (int widget, int index) |
A dropdown option associated to this window has been selected. | |
virtual void | OnTick () |
Called once per (game) tick. | |
virtual void | OnResize (Point new_size, Point delta) |
Called when the window got resized. | |
virtual void | OnInvalidateData (int data) |
Some data on this window has become invalid. |
bitmask for w->window_number 0-7 CompanyID (owner) 8-10 window type (use flags in vehicle_gui.h) 11-15 vehicle type (using VEH_, but can be compressed to fewer bytes if needed) 16-31 StationID or OrderID depending on window type (bit 8-10)
Definition at line 807 of file vehicle_gui.cpp.
virtual void VehicleListWindow::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 1014 of file vehicle_gui.cpp.
References Scrollbar::cap, CMD_MASS_START_STOP, DoCommandP(), GB(), INVALID_STRING_ID, INVALID_TILE, Scrollbar::pos, Window::resize, Window::SetDirty(), ShowVehicleViewWindow(), ResizeInfo::step_height, Window::vscroll, and Point::y.
virtual void VehicleListWindow::OnDropdownSelect | ( | int | widget, | |
int | index | |||
) | [inline, virtual] |
A dropdown option associated to this window has been selected.
widget | the widget (button) that the dropdown is associated with. | |
index | the element in the dropdown that is selected. |
Reimplemented from Window.
Definition at line 1071 of file vehicle_gui.cpp.
References DEFAULT_GROUP, DEPOT_MASS_SEND, DEPOT_SERVICE, DoCommandP(), GB(), and Window::SetDirty().
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 1114 of file vehicle_gui.cpp.
References Scrollbar::cap, Window::resize, ResizeInfo::step_height, Window::vscroll, and Point::y.
virtual void VehicleListWindow::OnInvalidateData | ( | int | data | ) | [inline, virtual] |