Make font_texture_create() more generic

Move font_texture_create() to font.c so it can be used for purposes other
than rendering the menu, for example server side decoration.

Refactor menu.c and menu.h to use this more generic font_texture_create()
This commit is contained in:
Johan Malm 2021-08-07 08:35:46 +01:00
parent 8fc6f795db
commit 5ecf0e1e7e
5 changed files with 104 additions and 72 deletions

View file

@ -7,9 +7,13 @@
struct menuitem {
char *action;
char *command;
struct wlr_box geo_box;
struct wlr_texture *active_texture;
struct wlr_texture *inactive_texture;
struct wlr_box box;
struct {
struct wlr_texture *active;
struct wlr_texture *inactive;
int offset_x;
int offset_y;
} texture;
bool selected;
struct wl_list link;
};