Switch the default gui2 render engine.

In gui2 there are two render engines; one using the widget's position to
render and the other based on the requested coordinates. The later is
used in the new widgets (pane, viewport and matrix) exclusively, meaning
these widgets don't work with the old engine.

The new one has been tested a while under --new-widgets and seems to
have no glitches so make it the default.

The old code hasn't been removed since doing so will force a huge
recompilation and it's desired to quickly switch back in case there
has been a regression.

The code is used to experiment with a different approach of the
implementation of a listbox.
This commit is contained in:
Mark de Wever 2012-05-28 09:55:55 +00:00
parent c0dee4ea4b
commit f1753d92f1

View file

@ -791,7 +791,19 @@ void twindow::draw()
SDL_Rect rect = get_rect();
sdl_blit(restorer_, 0, frame_buffer, &rect);
if(new_widgets) {
/**
* @todo Remove the if an always use the true branch.
*
* When removing that code the draw functions with only a frame_buffer
* as parameter should also be removed since they will be unused from
* that moment.
*/
#if 0
if(new_widgets)
#else
if(true)
#endif
{
// Background.
for(std::vector<twidget*>::iterator itor = item.begin();
itor != item.end(); ++itor) {