mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 14:47:38 +00:00
Convert the widgets to use the new blit function.
This commit is contained in:
parent
b5278dae9d
commit
7cbcca6fb3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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."));
|
||||
|
Loading…
x
Reference in New Issue
Block a user