From d0d4710f565f90229f8beacc5995422093d57f69 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 17 Feb 2013 20:55:26 +0000 Subject: (svn r25021) -Codechange: make a lot of SmallMapWindow members protected (fonsinchen) --- src/smallmap_gui.h | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'src/smallmap_gui.h') 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; -- cgit v1.2.3-54-g00ecf