diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-09-23 04:18:17 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-09-23 04:18:20 +0200 |
| commit | 9e308d97d983b152dc920219cf4555524747c992 (patch) | |
| tree | 8f8ffe5183aed676ac535632f6170315835d06d1 /src/gui | |
| parent | 68ccd085fce7233d7ecd7893f7856ded0165fe1c (diff) | |
| download | rts-9e308d97d983b152dc920219cf4555524747c992.tar.gz | |
gui.c: Remove unneeded condition
Even if neither hcentered or vcentered are used, GUI element position
must be determined by that of its parents.
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/src/gui.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/src/gui.c b/src/gui/src/gui.c index 38e8565..9af530b 100644 --- a/src/gui/src/gui.c +++ b/src/gui/src/gui.c @@ -47,9 +47,7 @@ void gui_coords(const struct gui_common *const g, short *const x, { short px = p->x + p->xoff, py = p->y + p->yoff; - if (p->hcentered || p->vcentered) - gui_coords(p, &px, &py); - + gui_coords(p, &px, &py); *x += px; *y += py; } |
