mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
set the new view's coordinates based on it being a root view.
This commit is contained in:
parent
1cccd005fe
commit
626dad45ac
1 changed files with 15 additions and 14 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue