set the new view's coordinates based on it being a root view.

This commit is contained in:
Bill Currie 2007-04-08 08:47:47 +00:00 committed by Jeff Teunissen
parent 1cccd005fe
commit 626dad45ac

View file

@ -44,20 +44,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/view.h"
VISIBLE view_t *
view_new (int xp, int yp, int xl, int yl, grav_t grav)
{
view_t *view = calloc (1, sizeof (view_t));
view->xpos = xp;
view->ypos = yp;
view->xlen = xl;
view->ylen = yl;
view->gravity = grav;
view->visible = 1;
view->draw = view_draw;
return view;
}
static void
setgeometry (view_t *view)
{
@ -120,6 +106,21 @@ setgeometry (view_t *view)
setgeometry (view->children[i]);
}
VISIBLE view_t *
view_new (int xp, int yp, int xl, int yl, grav_t grav)
{
view_t *view = calloc (1, sizeof (view_t));
view->xpos = xp;
view->ypos = yp;
view->xlen = xl;
view->ylen = yl;
view->gravity = grav;
view->visible = 1;
view->draw = view_draw;
setgeometry (view);
return view;
}
VISIBLE void
view_insert (view_t *par, view_t *view, int pos)
{