summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-02-17 20:55:26 +0000
committerrubidium <rubidium@openttd.org>2013-02-17 20:55:26 +0000
commitd0d4710f565f90229f8beacc5995422093d57f69 (patch)
tree6cc6d95469f6c0364ac7c1216334bcdf87abbe55 /src
parent52aeef1a79a91dce085fb04726b4a36340c7b091 (diff)
downloadopenttd-d0d4710f565f90229f8beacc5995422093d57f69.tar.xz
(svn r25021) -Codechange: make a lot of SmallMapWindow members protected (fonsinchen)
Diffstat (limited to 'src')
-rw-r--r--src/smallmap_gui.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h
index 3cd216440..e35a51c66 100644
--- a/src/smallmap_gui.h
+++ b/src/smallmap_gui.h
@@ -63,6 +63,7 @@ protected:
static const uint FORCE_REFRESH_PERIOD = 0x1F; ///< map is redrawn after that many ticks
static const uint BLINK_PERIOD = 0x0F; ///< highlight blinking interval
+ uint min_number_of_columns; ///< Minimal number of columns in legends.
uint min_number_of_fixed_rows; ///< Minimal number of rows in the legends for the fixed layouts only (all except #SMT_INDUSTRY).
uint column_width; ///< Width of a column in the #WID_SM_LEGEND widget.
@@ -99,28 +100,6 @@ protected:
GfxFillRect(x2 - 3, y, x2, y, PC_VERY_LIGHT_YELLOW);
}
- void DrawMapIndicators() const;
- void DrawSmallMapColumn(void *dst, uint xc, uint yc, int pitch, int reps, int start_pos, int end_pos, Blitter *blitter) const;
- void DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) const;
- void DrawTowns(const DrawPixelInfo *dpi) const;
- void DrawSmallMap(DrawPixelInfo *dpi) const;
-
- Point RemapTile(int tile_x, int tile_y) const;
- Point PixelToTile(int px, int py, int *sub, bool add_sub = true) const;
- Point ComputeScroll(int tx, int ty, int x, int y, int *sub);
- void SetZoomLevel(ZoomLevelChange change, const Point *zoom_pt);
- void SetupWidgetData();
- uint32 GetTileColours(const TileArea &ta) const;
-
- int GetPositionOnLegend(Point pt);
-
-
-public:
-
- uint min_number_of_columns; ///< Minimal number of columns in legends.
-
- SmallMapWindow(const WindowDesc *desc, int window_number);
-
/**
* Compute minimal required width of the legends.
* @return Minimally needed width for displaying the smallmap legends in pixels.
@@ -154,6 +133,26 @@ public:
void SelectLegendItem(int click_pos, LegendAndColour *legend, int end_legend_item, int begin_legend_item = 0);
void SwitchMapType(SmallMapType map_type);
void SetNewScroll(int sx, int sy, int sub);
+
+ void DrawMapIndicators() const;
+ void DrawSmallMapColumn(void *dst, uint xc, uint yc, int pitch, int reps, int start_pos, int end_pos, Blitter *blitter) const;
+ void DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) const;
+ void DrawTowns(const DrawPixelInfo *dpi) const;
+ void DrawSmallMap(DrawPixelInfo *dpi) const;
+
+ Point RemapTile(int tile_x, int tile_y) const;
+ Point PixelToTile(int px, int py, int *sub, bool add_sub = true) const;
+ Point ComputeScroll(int tx, int ty, int x, int y, int *sub);
+ void SetZoomLevel(ZoomLevelChange change, const Point *zoom_pt);
+ void SetupWidgetData();
+ uint32 GetTileColours(const TileArea &ta) const;
+
+ int GetPositionOnLegend(Point pt);
+
+public:
+ friend class NWidgetSmallmapDisplay;
+
+ SmallMapWindow(const WindowDesc *desc, int window_number);
void SmallMapCenterOnCurrentPos();
virtual void SetStringParameters(int widget) const;