Restore drawing of the minimap.
Mordante, please check if this code is ok. Not sure if draw_background is really needed.
This commit is contained in:
parent
bbcb2b40cd
commit
74e1e20612
2 changed files with 12 additions and 2 deletions
|
@ -37,9 +37,16 @@ void tminimap::set_borders(const unsigned left,
|
|||
set_dirty();
|
||||
}
|
||||
|
||||
void tminimap::impl_draw_background(surface& /*frame_buffer*/)
|
||||
void tminimap::impl_draw_foreground(surface& surface)
|
||||
{
|
||||
assert(false); // FIXME implement.
|
||||
draw_map(surface);
|
||||
}
|
||||
|
||||
void tminimap::impl_draw_background(surface& frame_buffer)
|
||||
{
|
||||
canvas(0).draw();
|
||||
SDL_Rect rect = get_rect();
|
||||
SDL_BlitSurface(canvas(0).surf(), NULL, frame_buffer, &rect);
|
||||
}
|
||||
|
||||
void tminimap::draw_map(surface& surface)
|
||||
|
|
|
@ -98,6 +98,9 @@ private:
|
|||
/** Inherited from tcontrol. */
|
||||
void impl_draw_background(surface& frame_buffer);
|
||||
|
||||
/** Inherited from tcontrol. */
|
||||
void impl_draw_foreground(surface& surface);
|
||||
|
||||
/** Inherited from tcontrol. */
|
||||
const std::string& get_control_type() const
|
||||
{ static const std::string type = "minimap"; return type; }
|
||||
|
|
Loading…
Add table
Reference in a new issue