summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-26 12:49:26 +0000
committeralberth <alberth@openttd.org>2009-07-26 12:49:26 +0000
commit75ccf9de3a4abc4a67a373959013a18321995d88 (patch)
tree7464c0b223d12fd580b65f77347fd6c81da11d5b /src/window_gui.h
parent5b576e6e7a200eda8f1ef05254133591d32f2e27 (diff)
downloadopenttd-75ccf9de3a4abc4a67a373959013a18321995d88.tar.xz
(svn r16960) -Doc: Added some viewport and vehicle type doxygen strings.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index f44efbcc2..ff806d1f1 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -189,14 +189,18 @@ enum SortButtonState {
};
/**
- * Data structure for a window viewport
+ * Data structure for a window viewport.
+ * A viewport is either following a vehicle (its id in then in #follow_vehicle), or it aims to display a specific
+ * location #dest_scrollpos_x, #dest_scrollpos_y (#follow_vehicle is then #INVALID_VEHICLE).
+ * The actual location being shown is #scrollpos_x, #scrollpos_y.
+ * @see InitializeViewport(), UpdateViewportPosition().
*/
struct ViewportData : ViewPort {
- VehicleID follow_vehicle;
- int32 scrollpos_x;
- int32 scrollpos_y;
- int32 dest_scrollpos_x;
- int32 dest_scrollpos_y;
+ VehicleID follow_vehicle; ///< VehicleID to follow if following a vehicle, #INVALID_VEHICLE otherwise.
+ int32 scrollpos_x; ///< Currently shown x coordinate (virtual screen coordinate of topleft corner of the viewport).
+ int32 scrollpos_y; ///< Currently shown y coordinate (virtual screen coordinate of topleft corner of the viewport).
+ int32 dest_scrollpos_x; ///< Current destination x coordinate to display (virtual screen coordinate of topleft corner of the viewport).
+ int32 dest_scrollpos_y; ///< Current destination y coordinate to display (virtual screen coordinate of topleft corner of the viewport).
};
/**