Implement taking smallmap screenshots.

This is largely based on this patch:
http://www.tt-forums.net/viewtopic.php?p=849533#p849533
with the following changes:
* this uses a button in the smallmap window instead of a console command
* screenshot now uses zoom level and mode of smallmap window
This commit is contained in:
Jonathan G Rennison
2015-08-04 01:26:32 +01:00
parent 163c30570b
commit 948b4e1d5e
6 changed files with 128 additions and 9 deletions

View File

@@ -157,7 +157,7 @@ protected:
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;
void DrawSmallMap(DrawPixelInfo *dpi, bool draw_indicators = true) const;
Point RemapTile(int tile_x, int tile_y) const;
Point PixelToTile(int px, int py, int *sub, bool add_sub = true) const;
@@ -189,6 +189,9 @@ public:
virtual void OnTick();
virtual void OnScroll(Point delta);
virtual void OnMouseOver(Point pt, int widget);
void TakeScreenshot();
void ScreenshotCallbackHandler(void *buf, uint y, uint pitch, uint n);
};
#endif /* SMALLMAP_GUI_H */