From ddad32458eadc82d5449bec43acfe4e3153bb811 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 4 Feb 2025 12:16:23 -0600 Subject: [PATCH] render shop highlights at non-offset positions --- src/game/boe.dlgutil.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/boe.dlgutil.cpp b/src/game/boe.dlgutil.cpp index a50e9b77..a02e7b9d 100644 --- a/src/game/boe.dlgutil.cpp +++ b/src/game/boe.dlgutil.cpp @@ -243,17 +243,19 @@ bool handle_shop_event(location p, cFramerateLimiter& fps_limiter) { // Since shop UI was drawn into the game window with offsets, we need to apply // the same offsets to event catching areas. rectangle active_rect { shopping_rects[i][SHOPRECT_ACTIVE_AREA] }; + rectangle visual_rect { active_rect }; active_rect.offset(talk_gword_offset_x, talk_gword_offset_y); rectangle item_help_rect { shopping_rects[i][SHOPRECT_ITEM_HELP] }; + rectangle visual_item_help_rect { item_help_rect }; item_help_rect.offset(talk_gword_offset_x, talk_gword_offset_y); if(p.in(active_rect)) { - click_shop_rect(active_rect); + click_shop_rect(visual_rect); handle_sale(what_picked); return true; } else if(p.in(item_help_rect)){ - click_shop_rect(item_help_rect); + click_shop_rect(visual_item_help_rect); handle_info_request(what_picked); return true; }