diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-12-03 18:56:44 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-12-03 18:56:44 +0100 |
| commit | 7c889d5a80a59d3281775c3ea731f4e640295353 (patch) | |
| tree | 46523346f725e5491cb7d1b8f374d84e9d4713a4 /src/scenes/world_map.c | |
| parent | e953d6fc634ed445332f9fdc47c9c4a6a205ea75 (diff) | |
working on save load
Diffstat (limited to 'src/scenes/world_map.c')
| -rw-r--r-- | src/scenes/world_map.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)
{
|
