diff options
author | Marvin Borner | 2021-05-21 21:08:30 +0200 |
---|---|---|
committer | Marvin Borner | 2021-05-21 21:08:30 +0200 |
commit | 72869a4220ab321fd893e93fbec4532aa3892f8f (patch) | |
tree | ba640e385435049c74f00d96d3bc47908a181e5e /apps/chess | |
parent | a69af1e2cc219f2f4010a6231dd32416a18437f2 (diff) |
GUI improvements and leak reduction
Diffstat (limited to 'apps/chess')
-rw-r--r-- | apps/chess/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/chess/main.c b/apps/chess/main.c index e5a8799..b0da8d1 100644 --- a/apps/chess/main.c +++ b/apps/chess/main.c @@ -68,14 +68,12 @@ static void load_image(struct piece *tile) icon); } -static void mouseclick(u32 widget_id, vec2 pos) +static void mouseclick(struct gui_event_mouse *event) { - UNUSED(pos); - vec2 clicked = vec2(0, 0); for (u32 x = 0; x < SIZE; x++) for (u32 y = 0; y < SIZE; y++) - if (tiles[x][y].widget == widget_id) + if (tiles[x][y].widget == event->widget) clicked = vec2(x, y); struct piece *clicked_piece = &tiles[clicked.x][clicked.y]; |