Changeset - r20063:f808fc7ab0bd
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-02-17 20:55:26
rubidium@openttd.org
(svn r25021) -Codechange: make a lot of SmallMapWindow members protected (fonsinchen)
1 file changed with 21 insertions and 22 deletions:
0 comments (0 inline, 0 general)
src/smallmap_gui.h
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)