From 8552725dfcdd238e9a4fb73a4da946ad760c9bf8 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Mon, 1 Jun 2026 19:02:03 +0300 Subject: [PATCH] Working on UI hints --- resources/start_uni_interior.lua | 1 + resources/w/ui/hud_uni_ext_dark.json | 126 +++++++++++++++ resources/w/ui/hud_uni_int_dark_full.json | 126 +++++++++++++++ resources/w/ui/hud_uni_int_full.json | 131 +++++++++++++++ ...{hud_uni_int.json => hud_uni_int_old.json} | 6 +- resources/w/ui/hud_uni_int_step10.json | 88 ++++++++++ resources/w/ui/hud_uni_int_step11.json | 131 +++++++++++++++ resources/w/ui/hud_uni_int_step12.json | 152 ++++++++++++++++++ resources/w/ui/hud_uni_int_step13.json | 135 ++++++++++++++++ .../ui/img/Darklands001_State=Default001.png | 3 - .../w/ui/img/Darklands001_State=Hover001.png | 3 - .../ui/img/Darklands001_State=Pressed001.png | 3 - .../ui/img/Darklands002_State=Default002.png | 3 + .../ui/img/Darklands002_State=Selected002.png | 3 + .../w/ui/img/Darklands002_State=Tap002.png | 3 + ...hBarBorder001.png => HealthBarBack001.png} | 0 resources/w/ui/img/HealthBarBase002.png | 3 + resources/w/ui/img/HealthBarFill001.png | 3 + resources/w/ui/img/HealthBarPanel001.png | 3 - resources/w/ui/img/Hint_darklands001.png | 3 + .../w/ui/img/Hint_darklands002_attack.png | 3 + resources/w/ui/img/Hint_darklands003_hp.png | 3 + resources/w/ui/img/hint_arrow_up.png | 3 + src/Game.cpp | 14 +- src/Location.h | 4 + src/MenuManager.cpp | 119 +++++++++++--- src/MenuManager.h | 17 +- src/ScriptEngine.cpp | 9 ++ 28 files changed, 1052 insertions(+), 46 deletions(-) create mode 100644 resources/w/ui/hud_uni_ext_dark.json create mode 100644 resources/w/ui/hud_uni_int_dark_full.json create mode 100644 resources/w/ui/hud_uni_int_full.json rename resources/w/ui/{hud_uni_int.json => hud_uni_int_old.json} (93%) create mode 100644 resources/w/ui/hud_uni_int_step10.json create mode 100644 resources/w/ui/hud_uni_int_step11.json create mode 100644 resources/w/ui/hud_uni_int_step12.json create mode 100644 resources/w/ui/hud_uni_int_step13.json delete mode 100644 resources/w/ui/img/Darklands001_State=Default001.png delete mode 100644 resources/w/ui/img/Darklands001_State=Hover001.png delete mode 100644 resources/w/ui/img/Darklands001_State=Pressed001.png create mode 100644 resources/w/ui/img/Darklands002_State=Default002.png create mode 100644 resources/w/ui/img/Darklands002_State=Selected002.png create mode 100644 resources/w/ui/img/Darklands002_State=Tap002.png rename resources/w/ui/img/{HealthBarBorder001.png => HealthBarBack001.png} (100%) create mode 100644 resources/w/ui/img/HealthBarBase002.png create mode 100644 resources/w/ui/img/HealthBarFill001.png delete mode 100644 resources/w/ui/img/HealthBarPanel001.png create mode 100644 resources/w/ui/img/Hint_darklands001.png create mode 100644 resources/w/ui/img/Hint_darklands002_attack.png create mode 100644 resources/w/ui/img/Hint_darklands003_hp.png create mode 100644 resources/w/ui/img/hint_arrow_up.png diff --git a/resources/start_uni_interior.lua b/resources/start_uni_interior.lua index 3090e2b..78fd4d2 100644 --- a/resources/start_uni_interior.lua +++ b/resources/start_uni_interior.lua @@ -389,6 +389,7 @@ function book_dialog_zone001_enter_callback() print("book_dialog_zone001_enter_callback step 2") game_api.start_dialogue("ghost_dialog002") game_api.set_trigger_zone_enabled(3, false) + game_api.advance_darklands_hud() else print("book_dialog_zone001_enter_callback step 3") diff --git a/resources/w/ui/hud_uni_ext_dark.json b/resources/w/ui/hud_uni_ext_dark.json new file mode 100644 index 0000000..09a8f09 --- /dev/null +++ b/resources/w/ui/hud_uni_ext_dark.json @@ -0,0 +1,126 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_ext.png" + }, + { + "type": "StaticImage", + "name": "healthBarPanel", + "width": 389, + "height": 132.2, + "y": -5, + "x": -5, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBase002.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBack001.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarFill001.png" + }, + { + "type": "TextView", + "name": "healthValue", + "x": 255.0, + "y": 45.5, + "width": 100.0, + "height": 44.0, + "horizontal_gravity": "left", + "vertical_gravity": "top", + "text": "200/200", + "fontSize": 20, + "fontPath": "resources/fonts/DroidSans.ttf", + "textCentered": false, + "topAligned": false, + "wrap": true, + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + ] + } +} diff --git a/resources/w/ui/hud_uni_int_dark_full.json b/resources/w/ui/hud_uni_int_dark_full.json new file mode 100644 index 0000000..b0a5213 --- /dev/null +++ b/resources/w/ui/hud_uni_int_dark_full.json @@ -0,0 +1,126 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_int.png" + }, + { + "type": "StaticImage", + "name": "healthBarPanel", + "width": 389, + "height": 132.2, + "y": -5, + "x": -5, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBase002.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBack001.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarFill001.png" + }, + { + "type": "TextView", + "name": "healthValue", + "x": 255.0, + "y": 45.5, + "width": 100.0, + "height": 44.0, + "horizontal_gravity": "left", + "vertical_gravity": "top", + "text": "200/200", + "fontSize": 20, + "fontPath": "resources/fonts/DroidSans.ttf", + "textCentered": false, + "topAligned": false, + "wrap": true, + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + ] + } +} diff --git a/resources/w/ui/hud_uni_int_full.json b/resources/w/ui/hud_uni_int_full.json new file mode 100644 index 0000000..c788eef --- /dev/null +++ b/resources/w/ui/hud_uni_int_full.json @@ -0,0 +1,131 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "phoneButton", + "horizontal_gravity": "right", + "vertical_gravity": "bottom", + "x": -46, + "y": -46, + "width": 229, + "height": 229, + "clickZoneWidth": 104, + "clickZoneHeight": 104, + "textures": { + "normal": "resources/w/ui/img/Phone001_State=Default.png", + "hover": "resources/w/ui/img/Phone001_State=Selected.png", + "pressed": "resources/w/ui/img/Phone001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "darklandsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 330, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Darklands002_State=Default002.png", + "hover": "resources/w/ui/img/Darklands002_State=Selected002.png", + "pressed": "resources/w/ui/img/Darklands002_State=Tap002.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_int.png" + }, + { + "type": "StaticImage", + "name": "hint_darklands001", + "width": 470, + "height": 156, + "x": 630, + "y": 200, + "texture": "resources/w/ui/img/Hint_darklands001.png", + "pulse": { + "minScale": 0.92, + "maxScale": 1.08, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 600 + } + }, + { + "type": "StaticImage", + "name": "hint_darklands001_arrow", + "width": 24, + "height": 118, + "x": 860, + "y": 110, + "texture": "resources/w/ui/img/hint_arrow_up.png" + } + ] + } +} \ No newline at end of file diff --git a/resources/w/ui/hud_uni_int.json b/resources/w/ui/hud_uni_int_old.json similarity index 93% rename from resources/w/ui/hud_uni_int.json rename to resources/w/ui/hud_uni_int_old.json index e8f46cf..0797a34 100644 --- a/resources/w/ui/hud_uni_int.json +++ b/resources/w/ui/hud_uni_int_old.json @@ -85,9 +85,9 @@ "clickZoneWidth": 89, "clickZoneHeight": 89, "textures": { - "normal": "resources/w/ui/img/Darklands001_State=Default001.png", - "hover": "resources/w/ui/img/Darklands001_State=Hover001.png", - "pressed": "resources/w/ui/img/Darklands001_State=Pressed001.png" + "normal": "resources/w/ui/img/Darklands002_State=Default002.png", + "hover": "resources/w/ui/img/Darklands002_State=Selected002.png", + "pressed": "resources/w/ui/img/Darklands002_State=Tap002.png" } }, { diff --git a/resources/w/ui/hud_uni_int_step10.json b/resources/w/ui/hud_uni_int_step10.json new file mode 100644 index 0000000..1c58f58 --- /dev/null +++ b/resources/w/ui/hud_uni_int_step10.json @@ -0,0 +1,88 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "phoneButton", + "horizontal_gravity": "right", + "vertical_gravity": "bottom", + "x": -46, + "y": -46, + "width": 229, + "height": 229, + "clickZoneWidth": 104, + "clickZoneHeight": 104, + "textures": { + "normal": "resources/w/ui/img/Phone001_State=Default.png", + "hover": "resources/w/ui/img/Phone001_State=Selected.png", + "pressed": "resources/w/ui/img/Phone001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_int.png" + } + ] + } +} diff --git a/resources/w/ui/hud_uni_int_step11.json b/resources/w/ui/hud_uni_int_step11.json new file mode 100644 index 0000000..c788eef --- /dev/null +++ b/resources/w/ui/hud_uni_int_step11.json @@ -0,0 +1,131 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "phoneButton", + "horizontal_gravity": "right", + "vertical_gravity": "bottom", + "x": -46, + "y": -46, + "width": 229, + "height": 229, + "clickZoneWidth": 104, + "clickZoneHeight": 104, + "textures": { + "normal": "resources/w/ui/img/Phone001_State=Default.png", + "hover": "resources/w/ui/img/Phone001_State=Selected.png", + "pressed": "resources/w/ui/img/Phone001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "darklandsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 330, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Darklands002_State=Default002.png", + "hover": "resources/w/ui/img/Darklands002_State=Selected002.png", + "pressed": "resources/w/ui/img/Darklands002_State=Tap002.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_int.png" + }, + { + "type": "StaticImage", + "name": "hint_darklands001", + "width": 470, + "height": 156, + "x": 630, + "y": 200, + "texture": "resources/w/ui/img/Hint_darklands001.png", + "pulse": { + "minScale": 0.92, + "maxScale": 1.08, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 600 + } + }, + { + "type": "StaticImage", + "name": "hint_darklands001_arrow", + "width": 24, + "height": 118, + "x": 860, + "y": 110, + "texture": "resources/w/ui/img/hint_arrow_up.png" + } + ] + } +} \ No newline at end of file diff --git a/resources/w/ui/hud_uni_int_step12.json b/resources/w/ui/hud_uni_int_step12.json new file mode 100644 index 0000000..64abba5 --- /dev/null +++ b/resources/w/ui/hud_uni_int_step12.json @@ -0,0 +1,152 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_uni_int.png" + }, + { + "type": "StaticImage", + "name": "hint_darklands003_arrow", + "width": 24, + "height": 118, + "x": 210, + "y": 110, + "texture": "resources/w/ui/img/hint_arrow_up.png" + }, + { + "type": "StaticImage", + "name": "hint_darklands003", + "width": 470, + "height": 202, + "x": 130, + "y": 200, + "texture": "resources/w/ui/img/Hint_darklands003_hp.png", + "pulse": { + "minScale": 0.92, + "maxScale": 1.08, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 600 + } + }, + { + "type": "StaticImage", + "name": "healthBarPanel", + "width": 389, + "height": 132.2, + "y": -5, + "x": -5, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBase002.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBack001.png" + }, + { + "type": "StaticImage", + "name": "healthBarFill", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarFill001.png" + }, + { + "type": "TextView", + "name": "healthValue", + "x": 255.0, + "y": 45.5, + "width": 100.0, + "height": 44.0, + "horizontal_gravity": "left", + "vertical_gravity": "top", + "text": "200/200", + "fontSize": 20, + "fontPath": "resources/fonts/DroidSans.ttf", + "textCentered": false, + "topAligned": false, + "wrap": true, + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + ] + } +} \ No newline at end of file diff --git a/resources/w/ui/hud_uni_int_step13.json b/resources/w/ui/hud_uni_int_step13.json new file mode 100644 index 0000000..bb8a8d1 --- /dev/null +++ b/resources/w/ui/hud_uni_int_step13.json @@ -0,0 +1,135 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/Settings001_State=Default001.png", + "hover": "resources/w/ui/img/Settings001_State=Selected001.png", + "pressed": "resources/w/ui/img/Settings001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 110, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "Button", + "name": "journalButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 220, + "y": -18, + "width": 165, + "height": 165, + "clickZoneWidth": 89, + "clickZoneHeight": 89, + "textures": { + "normal": "resources/w/ui/img/Journal001_State=Default.png", + "hover": "resources/w/ui/img/Journal001_State=Selected.png", + "pressed": "resources/w/ui/img/Journal001_State=Tap.png" + } + }, + { + "type": "StaticImage", + "name": "hint_darklands002", + "horizontal_gravity": "center", + "vertical_gravity": "top", + "width": 470, + "height": 178, + "x": 0, + "y": 20, + "texture": "resources/w/ui/img/Hint_darklands002_attack.png", + "pulse": { + "minScale": 0.92, + "maxScale": 1.08, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 600 + } + }, + { + "type": "StaticImage", + "name": "healthBarPanel", + "width": 389, + "height": 132.2, + "y": -5, + "x": -5, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBase002.png" + }, + { + "type": "StaticImage", + "name": "healthBarBorder", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarBack001.png" + }, + { + "type": "StaticImage", + "name": "healthBarFill", + "width": 151.2, + "height": 22.8, + "y": 49.8, + "x": 100.6, + "horizontal_gravity": "left", + "vertical_align": "top", + "texture": "resources/w/ui/img/HealthBarFill001.png" + }, + { + "type": "TextView", + "name": "healthValue", + "x": 255.0, + "y": 45.5, + "width": 100.0, + "height": 44.0, + "horizontal_gravity": "left", + "vertical_gravity": "top", + "text": "200/200", + "fontSize": 20, + "fontPath": "resources/fonts/DroidSans.ttf", + "textCentered": false, + "topAligned": false, + "wrap": true, + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + ] + } +} diff --git a/resources/w/ui/img/Darklands001_State=Default001.png b/resources/w/ui/img/Darklands001_State=Default001.png deleted file mode 100644 index 103f627..0000000 --- a/resources/w/ui/img/Darklands001_State=Default001.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5eb57e42514b538c6e235c93b08a7c0c672c64089edf6ee6bcc9ba9abe6ac4f5 -size 798847 diff --git a/resources/w/ui/img/Darklands001_State=Hover001.png b/resources/w/ui/img/Darklands001_State=Hover001.png deleted file mode 100644 index b24d45d..0000000 --- a/resources/w/ui/img/Darklands001_State=Hover001.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee3994ebaf2f21b37ec714cecc2e41f1d519137eb52336c2e98b507d028b2ed3 -size 953963 diff --git a/resources/w/ui/img/Darklands001_State=Pressed001.png b/resources/w/ui/img/Darklands001_State=Pressed001.png deleted file mode 100644 index cb11842..0000000 --- a/resources/w/ui/img/Darklands001_State=Pressed001.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:adef07163acf6f22d325099004ef467f86a8948c713b7fcaf6553e5e6280e3ed -size 725062 diff --git a/resources/w/ui/img/Darklands002_State=Default002.png b/resources/w/ui/img/Darklands002_State=Default002.png new file mode 100644 index 0000000..b701598 --- /dev/null +++ b/resources/w/ui/img/Darklands002_State=Default002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:718c1d56b7bd0a230b559b2787b3d80d95a846b917934bc209a7f26acf491d45 +size 709145 diff --git a/resources/w/ui/img/Darklands002_State=Selected002.png b/resources/w/ui/img/Darklands002_State=Selected002.png new file mode 100644 index 0000000..459f682 --- /dev/null +++ b/resources/w/ui/img/Darklands002_State=Selected002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cbb940afa572aa0f8e3acdb56964d75c426eb6ddf464024bbb1df0017290708 +size 755696 diff --git a/resources/w/ui/img/Darklands002_State=Tap002.png b/resources/w/ui/img/Darklands002_State=Tap002.png new file mode 100644 index 0000000..cd8a4d0 --- /dev/null +++ b/resources/w/ui/img/Darklands002_State=Tap002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c03ccb4e3d3d0252fff3f11033f1cccf48622b5c417c84cf13e8d89db69ae03 +size 680775 diff --git a/resources/w/ui/img/HealthBarBorder001.png b/resources/w/ui/img/HealthBarBack001.png similarity index 100% rename from resources/w/ui/img/HealthBarBorder001.png rename to resources/w/ui/img/HealthBarBack001.png diff --git a/resources/w/ui/img/HealthBarBase002.png b/resources/w/ui/img/HealthBarBase002.png new file mode 100644 index 0000000..7e9011e --- /dev/null +++ b/resources/w/ui/img/HealthBarBase002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d2404878fb1ffc58f6fde19db620ec5a521f6c4604016c90a00038c676411e7 +size 1082629 diff --git a/resources/w/ui/img/HealthBarFill001.png b/resources/w/ui/img/HealthBarFill001.png new file mode 100644 index 0000000..d70744a --- /dev/null +++ b/resources/w/ui/img/HealthBarFill001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74064b5f24b8314631e17db13cc3029cb070d82fe973578daf0a6a6c8a1d5e96 +size 67101 diff --git a/resources/w/ui/img/HealthBarPanel001.png b/resources/w/ui/img/HealthBarPanel001.png deleted file mode 100644 index b07f061..0000000 --- a/resources/w/ui/img/HealthBarPanel001.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f54720ee525740449fce1ba0861a08acc23f68c19f05faf0ac89a1683fd2890 -size 1089235 diff --git a/resources/w/ui/img/Hint_darklands001.png b/resources/w/ui/img/Hint_darklands001.png new file mode 100644 index 0000000..40e20d2 --- /dev/null +++ b/resources/w/ui/img/Hint_darklands001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87c030916193e9cb63814e3ebcb393e8bbaafc4e7766dfdf19c87ca77ac7b284 +size 312915 diff --git a/resources/w/ui/img/Hint_darklands002_attack.png b/resources/w/ui/img/Hint_darklands002_attack.png new file mode 100644 index 0000000..409094d --- /dev/null +++ b/resources/w/ui/img/Hint_darklands002_attack.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc92c54e873525555fa4385a7bbbf5d0887a81a2215bc17978ef782d3c38ba53 +size 355925 diff --git a/resources/w/ui/img/Hint_darklands003_hp.png b/resources/w/ui/img/Hint_darklands003_hp.png new file mode 100644 index 0000000..a39ac7e --- /dev/null +++ b/resources/w/ui/img/Hint_darklands003_hp.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57de0828a5bd35ffe1df8664a38d4af7ab64d0efc2ef9d15128b3b48ba31c25a +size 395082 diff --git a/resources/w/ui/img/hint_arrow_up.png b/resources/w/ui/img/hint_arrow_up.png new file mode 100644 index 0000000..3d38c95 --- /dev/null +++ b/resources/w/ui/img/hint_arrow_up.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb859189e7ed73e340b4d16f19937451f14577f714859ab263eca865665c6cc +size 1785 diff --git a/src/Game.cpp b/src/Game.cpp index e5a6e98..5e1fea1 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -215,6 +215,8 @@ namespace ZL "resources/navigation/uni_interior2_unlocked_hall.txt" }; */ + + /* uniInteriorParams.navigationJsonPaths = { "resources/navigation/uni_interior0_all_locked.json", @@ -262,8 +264,14 @@ namespace ZL locations["uni_interior"]->scriptEngine.setGlobalStore(&globalInts); locations["uni_interior"]->scriptEngine.setGlobalFloatStore(&globalFloats); locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); }; + locations["uni_interior"]->requestAdvanceDarklandsHud = [this]() { menuManager.advanceUniIntDarklandsHud(); }; if (locations["uni_interior"]->player) locations["uni_interior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); }; + for (auto& npc : locations["uni_interior"]->npcs) { + if (npc && npc->canAttack) { + npc->onDeathAnimComplete = [this]() { menuManager.onEnemyKilledInUniInterior(); }; + } + } LocationSetup uniExteriorParams = uniInteriorParams; uniExteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_exterior.json"; @@ -309,7 +317,7 @@ namespace ZL "resources/navigation/dorm2_b.json", "resources/navigation/dorm2_all_open.json", };*/ - + /* params_dorm.navigationJsonPaths = { @@ -381,6 +389,7 @@ namespace ZL if (menuManager.tutorialStep == TutorialStep::Step2) { menuManager.advanceTutorialStep(); } + menuManager.onPlayerStartedWalking(); }; } @@ -1056,7 +1065,6 @@ namespace ZL return; } - // Only the primary, non-UI-captured pointer can promote itself into a // camera-rotation drag once it crosses the movement threshold. if (hasPrimaryPointer && fingerId == primaryPointerId && it != activePointers.end() @@ -1068,7 +1076,6 @@ namespace ZL } } - if (currentLocation) { // Forwarded for dialogue hover and (when cameraDragging) camera rotation. currentLocation->handleMotion(fingerId, eventX, eventY, mx, my); @@ -1108,7 +1115,6 @@ namespace ZL if (darklandsFlashAlpha >= 1.0f) { isDarklands = !isDarklands; - // Change HUD menuManager.setDarklandsMode(isDarklands); diff --git a/src/Location.h b/src/Location.h index 960ab66..1886f89 100644 --- a/src/Location.h +++ b/src/Location.h @@ -94,6 +94,10 @@ namespace ZL // request the transition without coupling Location to Game directly. std::function requestDarklandsTransition; + // Set by Game after setup(). Lua calls this to advance the uni_interior HUD + // from step12 to step13 (trigger-zone encounter hint). + std::function requestAdvanceDarklandsHud; + // Navigation editor — toggle with 'N', save with 'B', right-click to finalize polygon bool navigationEditorMode = false; diff --git a/src/MenuManager.cpp b/src/MenuManager.cpp index 6fe8ec1..ad89cd1 100644 --- a/src/MenuManager.cpp +++ b/src/MenuManager.cpp @@ -81,8 +81,14 @@ namespace ZL { hudStep5aRoot = loadUiFromFile("resources/w/ui/hud_step5a.json", renderer, zipFile); hudStep5bRoot = loadUiFromFile("resources/w/ui/hud_step5b.json", renderer, zipFile); hudStep5abRoot = loadUiFromFile("resources/w/ui/hud_step5ab.json", renderer, zipFile); - hudUniExtRoot = loadUiFromFile("resources/w/ui/hud_uni_ext.json", renderer, zipFile); - hudUniIntRoot = loadUiFromFile("resources/w/ui/hud_uni_int.json", renderer, zipFile); + hudUniExtRoot = loadUiFromFile("resources/w/ui/hud_uni_ext.json", renderer, zipFile); + hudUniIntStep10Root = loadUiFromFile("resources/w/ui/hud_uni_int_step10.json", renderer, zipFile); + hudUniIntStep11Root = loadUiFromFile("resources/w/ui/hud_uni_int_step11.json", renderer, zipFile); + hudUniIntStep12Root = loadUiFromFile("resources/w/ui/hud_uni_int_step12.json", renderer, zipFile); + hudUniIntStep13Root = loadUiFromFile("resources/w/ui/hud_uni_int_step13.json", renderer, zipFile); + hudUniIntFullRoot = loadUiFromFile("resources/w/ui/hud_uni_int_full.json", renderer, zipFile); + hudUniIntDarkFullRoot = loadUiFromFile("resources/w/ui/hud_uni_int_dark_full.json", renderer, zipFile); + hudUniExtDarkRoot = loadUiFromFile("resources/w/ui/hud_uni_ext_dark.json", renderer, zipFile); phoneChatListRoot = loadUiFromFile("resources/w/ui/screen_phone_chat_list.json", renderer, zipFile); phoneChat1Root = loadUiFromFile("resources/w/ui/screen_phone_chat1.json", renderer, zipFile); phoneChat2Root = loadUiFromFile("resources/w/ui/screen_phone_chat2.json", renderer, zipFile); @@ -344,29 +350,25 @@ namespace ZL { } void MenuManager::setupGameplayHudCallbacks() { - uiManager.setButtonCallback("phoneButton", [this](const std::string&) { - openPhoneScreen(); - }); - uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { - openInventory(); - }); - uiManager.setButtonCallback("journalButton", [this](const std::string&) { - openQuestJournal(); - }); - uiManager.setButtonCallback("darklandsButton", [this](const std::string&) { - startDarklandsTransitionFunc(); - }); + if (uiManager.findButton("phoneButton")) + uiManager.setButtonCallback("phoneButton", [this](const std::string&) { openPhoneScreen(); }); + if (uiManager.findButton("inventoryButton")) + uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { openInventory(); }); + if (uiManager.findButton("journalButton")) + uiManager.setButtonCallback("journalButton", [this](const std::string&) { openQuestJournal(); }); + if (uiManager.findButton("darklandsButton")) + uiManager.setButtonCallback("darklandsButton", [this](const std::string&) { startDarklandsTransitionFunc(); }); } void MenuManager::onLocationChanged(const std::string& locationName) { if (state != GameState::Gameplay) return; + currentLocationName_ = locationName; if (locationName == "uni_exterior") { - uiManager.replaceRoot(hudUniExtRoot); + uiManager.replaceRoot(currentIsDarklands_ ? hudUniExtDarkRoot : hudUniExtRoot); setupGameplayHudCallbacks(); } else if (locationName == "uni_interior") { - uiManager.replaceRoot(hudUniIntRoot); - setupGameplayHudCallbacks(); + applyUniIntHud(); } else { // Returning to dorm: reuse step5ab, suppress already-completed hints uiManager.replaceRoot(hudStep5abRoot); @@ -408,10 +410,22 @@ namespace ZL { } void MenuManager::onItemPickedUp(const std::string& itemId) { + if (itemId == "note_spell" && uniIntTutorialState_ == UniIntTutorialState::Step10) { + uniIntTutorialState_ = UniIntTutorialState::Step11; + if (currentLocationName_ == "uni_interior" && state == GameState::Gameplay) + applyUniIntHud(); + } + if (tutorialStep != TutorialStep::Step4 && tutorialStep != TutorialStep::Step5) { return; } + // Dorm tutorial HUD logic must not run in other locations. + // currentLocationName_ is empty only before the first teleport (still in dorm). + if (!currentLocationName_.empty() && currentLocationName_ != "location_dorm") { + return; + } + if (itemId == "phone") tutorialPhonePickedUp = true; if (itemId == "journal") tutorialJournalPickedUp = true; @@ -604,17 +618,70 @@ namespace ZL { void MenuManager::setDarklandsMode(bool enabled) { - if (enabled) - { - uiManager.setNodeVisible("darklandsButton", false); - uiManager.setNodeVisible("phoneButton", false); + currentIsDarklands_ = enabled; - } - else - { - uiManager.setNodeVisible("darklandsButton", true); - uiManager.setNodeVisible("phoneButton", true); + if (currentLocationName_ == "uni_interior") { + if (enabled && uniIntTutorialState_ == UniIntTutorialState::Step11) { + uniIntTutorialState_ = UniIntTutorialState::DarklandsActive; + } + applyUniIntHud(); + } else if (currentLocationName_ == "uni_exterior") { + if (state == GameState::Gameplay) { + uiManager.replaceRoot(enabled ? hudUniExtDarkRoot : hudUniExtRoot); + setupGameplayHudCallbacks(); + } + } else { + uiManager.setNodeVisible("darklandsButton", !enabled); + uiManager.setNodeVisible("phoneButton", !enabled); } } + void MenuManager::applyUniIntHud() + { + if (state != GameState::Gameplay) return; + std::shared_ptr root; + if (currentIsDarklands_) { + switch (uniIntTutorialState_) { + case UniIntTutorialState::DarklandsStep13: root = hudUniIntStep13Root; break; + case UniIntTutorialState::DarklandsFull: root = hudUniIntDarkFullRoot; break; + default: root = hudUniIntStep12Root; break; + } + } else { + switch (uniIntTutorialState_) { + case UniIntTutorialState::Step10: root = hudUniIntStep10Root; break; + case UniIntTutorialState::Step11: root = hudUniIntStep11Root; break; + default: root = hudUniIntFullRoot; break; + } + } + uiManager.replaceRoot(root); + setupGameplayHudCallbacks(); + } + + void MenuManager::onPlayerStartedWalking() + { + if (currentLocationName_ == "uni_interior" + && currentIsDarklands_ + && uniIntTutorialState_ == UniIntTutorialState::DarklandsActive) { + uiManager.setNodeVisible("hint_darklands003", false); + uiManager.setNodeVisible("hint_darklands003_arrow", false); + } + } + + void MenuManager::advanceUniIntDarklandsHud() + { + if (uniIntTutorialState_ != UniIntTutorialState::DarklandsActive) return; + uniIntTutorialState_ = UniIntTutorialState::DarklandsStep13; + if (currentLocationName_ == "uni_interior" && currentIsDarklands_ && state == GameState::Gameplay) + applyUniIntHud(); + } + + void MenuManager::onEnemyKilledInUniInterior() + { + if (uniIntTutorialState_ != UniIntTutorialState::DarklandsActive + && uniIntTutorialState_ != UniIntTutorialState::DarklandsStep13) return; + uniIntTutorialState_ = UniIntTutorialState::DarklandsFull; + if (currentLocationName_ == "uni_interior" && currentIsDarklands_ && state == GameState::Gameplay) + applyUniIntHud(); + } + } // namespace ZL diff --git a/src/MenuManager.h b/src/MenuManager.h index 51a2499..eae37a5 100644 --- a/src/MenuManager.h +++ b/src/MenuManager.h @@ -63,6 +63,9 @@ namespace ZL { void advanceTutorialStep(); void onItemPickedUp(const std::string& itemId); void onLocationChanged(const std::string& locationName); + void onEnemyKilledInUniInterior(); + void advanceUniIntDarklandsHud(); + void onPlayerStartedWalking(); TutorialStep tutorialStep = TutorialStep::Step0; @@ -81,12 +84,18 @@ namespace ZL { void openPhoneChatFromList(std::shared_ptr chatRoot, const std::string& dialogueId); void returnToPhoneChatList(); void closePhoneScreenFromChat(); + void applyUniIntHud(); GameState state = GameState::Gameplay; Inventory* inventory = nullptr; std::string zipFile_; int inventorySelectedIndex_ = -1; + enum class UniIntTutorialState { Step10, Step11, DarklandsActive, DarklandsStep13, DarklandsFull }; + UniIntTutorialState uniIntTutorialState_ = UniIntTutorialState::Step10; + std::string currentLocationName_; + bool currentIsDarklands_ = false; + bool tutorialPhonePickedUp = false; bool tutorialJournalPickedUp = false; bool tutorialPhoneScreenOpened = false; @@ -101,7 +110,13 @@ namespace ZL { std::shared_ptr hudStep5bRoot; std::shared_ptr hudStep5abRoot; std::shared_ptr hudUniExtRoot; - std::shared_ptr hudUniIntRoot; + std::shared_ptr hudUniIntStep10Root; + std::shared_ptr hudUniIntStep11Root; + std::shared_ptr hudUniIntStep12Root; + std::shared_ptr hudUniIntFullRoot; + std::shared_ptr hudUniIntStep13Root; + std::shared_ptr hudUniIntDarkFullRoot; + std::shared_ptr hudUniExtDarkRoot; std::shared_ptr phoneChatListRoot; std::shared_ptr phoneChat1Root; std::shared_ptr phoneChat2Root; diff --git a/src/ScriptEngine.cpp b/src/ScriptEngine.cpp index 3221708..e3d4cab 100644 --- a/src/ScriptEngine.cpp +++ b/src/ScriptEngine.cpp @@ -203,6 +203,15 @@ namespace ZL { game->requestDarklandsTransition(); }); + // advance_darklands_hud() + // Advances the uni_interior darklands HUD from step12 to step13. + // Call when the player enters the ghost trigger zone in darklands. + api.set_function("advance_darklands_hud", + [game]() { + if (game->requestAdvanceDarklandsHud) + game->requestAdvanceDarklandsHud(); + }); + // set_location_callbacks(on_enter, on_exit) // on_enter() called once when the player arrives at this location. // on_exit() called once just before the player leaves this location.