Convert the widgets to use the new blit function.

This commit is contained in:
Mark de Wever 2009-06-01 15:39:35 +00:00
parent b5278dae9d
commit 7cbcca6fb3
3 changed files with 6 additions and 10 deletions

View File

@ -314,9 +314,8 @@ void tcontrol::impl_draw_background(surface& frame_buffer)
<< " dirty " << get_dirty()
<< ".\n";
#endif
canvas(get_state()).draw();
SDL_Rect rect = get_rect();
SDL_BlitSurface(canvas(get_state()).surf(), NULL, frame_buffer, &rect);
canvas(get_state()).blit(frame_buffer, get_rect());
}
tpoint tcontrol::get_best_text_size(const tpoint& minimum_size, const tpoint& maximum_size) const

View File

@ -36,16 +36,12 @@ SDL_Rect tpanel::get_client_rect() const
void tpanel::impl_draw_background(surface& frame_buffer)
{
canvas(0).draw();
SDL_Rect rect = get_rect();
SDL_BlitSurface(canvas(0).surf(), NULL, frame_buffer, &rect);
canvas(0).blit(frame_buffer, get_rect());
}
void tpanel::impl_draw_foreground(surface& frame_buffer)
{
canvas(1).draw();
SDL_Rect rect = get_rect();
SDL_BlitSurface(canvas(1).surf(), NULL, frame_buffer, &rect);
canvas(1).blit(frame_buffer, get_rect());
}
tpoint tpanel::border_space() const

View File

@ -855,7 +855,8 @@ tmulti_page_definition::tresolution::tresolution(const config& cfg) :
*/
// Add a dummy state since every widget needs a state.
state.push_back(tstate_definition(config("draw")));
static config dummy ("draw");
state.push_back(tstate_definition(dummy));
const config &child = cfg.child("grid");
VALIDATE(child, _("No grid defined."));