diff --git a/resources/config2/npcs.json b/resources/config2/npcs.json index a5a1aab..1d6a00e 100644 --- a/resources/config2/npcs.json +++ b/resources/config2/npcs.json @@ -15,6 +15,7 @@ "modelCorrectionRotX": 0.0, "modelCorrectionRotY": 180.0, "modelCorrectionRotZ": 0.0, + "interactionRadius": 2.0, "gift": { "id": "guard_token", "name": "Guard's Token", diff --git a/resources/config2/ui_inventory.json b/resources/config2/ui_inventory.json index 5f2a167..80f9500 100644 --- a/resources/config2/ui_inventory.json +++ b/resources/config2/ui_inventory.json @@ -26,18 +26,25 @@ { "type": "FrameLayout", "name": "inventory_items_panel", - "x": 100.0, + "x": 50.0, "y": 150.0, - "width": 500.0, - "height": 600.0, + "width": 250.0, + "height": 300.0, "children": [ + { + "type": "StaticImage", + "name": "panel_background", + "width": 200, + "height": 400, + "texture": "resources/sand2.png" + }, { "type": "TextView", "name": "inventory_items_text", - "x": 100.0, - "y": 30.0, - "width": 460.0, - "height": 450.0, + "x": -100.0, + "y": -100.0, + "width": 250.0, + "height": 300.0, "text": "Inventory (Empty)", "fontSize": 18, "fontPath": "resources/fonts/DroidSans.ttf", @@ -47,8 +54,8 @@ { "type": "TextButton", "name": "close_inventory_button", - "x": 200.0, - "y": 20.0, + "x": 165.0, + "y": 0.0, "width": 40.0, "height": 40.0, "text": "X", diff --git a/src/Game.cpp b/src/Game.cpp index 5dd3790..47b3ca8 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -613,6 +613,11 @@ namespace ZL std::cout << "\n========== MOUSE DOWN EVENT ==========" << std::endl; handleDown(ZL::UiManager::MOUSE_FINGER_ID, mx, my); + if (menuManager.uiManager.isUiInteractionForFinger(ZL::UiManager::MOUSE_FINGER_ID)) { + std::cout << "[CLICK] UI handled, skipping character movement" << std::endl; + continue; + } + // Calculate ray for picking if (dialogueSystem.blocksGameplayInput()) { dialogueSystem.handlePointerReleased(static_cast(mx), Environment::projectionHeight - static_cast(my));