Commit Graph

6 Commits

Author SHA1 Message Date
Bill Currie 4defba8251 [ui] Free the view's children array
This would have leaked memory if views were being created and destroyed
dynamically instead of just the once-off in the current code.
2022-05-12 19:58:18 +09:00
Bill Currie 79add5590b [build] Fix some make distcheck issues
The never ending battle against bit-rot.
2022-05-06 15:50:13 +09:00
Bill Currie bafe54b010 [view] Add a cexpr enum for grav_t
And use it for hud_scoreboard_gravity. Putting the enum def in view made
the most sense as view does own the base type and the enum is likely to
be by useful for other settings.
2022-04-24 21:09:58 +09:00
Bill Currie a75c027b7f [ui] Add two view manipulation functions
One moves and resizes the view in one operation as a bit of an
optimization as moving and resizing both update any child views, and
this does only one update.

The other sets the gravity and updates any child views as their
absolute positions would change as well as the updated view's absolute
position.
2021-07-10 17:57:59 +09:00
Bill Currie 24fd443ef3 [ui] Move txtbuffer and vrect tests to libs/ui
Fixes make check
2021-06-13 14:29:46 +09:00
Bill Currie 813497a1aa [ui] Create library for UI support code
Currently this has text buffer, input line, vrect and view code.
2021-06-12 22:50:51 +09:00