From 7c889d5a80a59d3281775c3ea731f4e640295353 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 3 Dec 2024 18:56:44 +0100 Subject: working on save load --- src/scenes/world_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scenes/world_map.c') diff --git a/src/scenes/world_map.c b/src/scenes/world_map.c index f96ba0e..3ef4cdb 100644 --- a/src/scenes/world_map.c +++ b/src/scenes/world_map.c @@ -667,16 +667,16 @@ static void world_map_draw_event_log(platform_window* window) event* e = array_at(&_active_world->log.events, read_cursor); float inner_pad = 5*scale; - s32 texth = renderer->render_text_cutoff(fnt, text_x+inner_pad, text_y+inner_pad, e->message, COLOR_TEXT, text_w-(inner_pad*2)); s32 highlight_w = text_w; s32 highlight_h = texth+(inner_pad); - if (e->type != EVENT_TYPE_INFO && mouse_interacts(text_x, text_y, highlight_w, highlight_h)) { + if (e->data != 0 && e->type != EVENT_TYPE_INFO && mouse_interacts(text_x, text_y, highlight_w, highlight_h)) { platform_set_cursor(window, CURSOR_POINTER); renderer->render_rectangle(text_x, text_y, text_w, highlight_h, rgba(255,255,255,20)); + // data is 0 when loading from save file. if (is_left_clicked()) { switch (e->type) { -- cgit v1.2.3-70-g09d2