Working on UI hints

This commit is contained in:
Vladislav Khorev 2026-06-01 19:02:03 +03:00
parent 3d4560bb51
commit 8552725dfc
28 changed files with 1052 additions and 46 deletions

View File

@ -389,6 +389,7 @@ function book_dialog_zone001_enter_callback()
print("book_dialog_zone001_enter_callback step 2") print("book_dialog_zone001_enter_callback step 2")
game_api.start_dialogue("ghost_dialog002") game_api.start_dialogue("ghost_dialog002")
game_api.set_trigger_zone_enabled(3, false) game_api.set_trigger_zone_enabled(3, false)
game_api.advance_darklands_hud()
else else
print("book_dialog_zone001_enter_callback step 3") print("book_dialog_zone001_enter_callback step 3")

View File

@ -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
]
}
]
}
}

View File

@ -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
]
}
]
}
}

View File

@ -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"
}
]
}
}

View File

@ -85,9 +85,9 @@
"clickZoneWidth": 89, "clickZoneWidth": 89,
"clickZoneHeight": 89, "clickZoneHeight": 89,
"textures": { "textures": {
"normal": "resources/w/ui/img/Darklands001_State=Default001.png", "normal": "resources/w/ui/img/Darklands002_State=Default002.png",
"hover": "resources/w/ui/img/Darklands001_State=Hover001.png", "hover": "resources/w/ui/img/Darklands002_State=Selected002.png",
"pressed": "resources/w/ui/img/Darklands001_State=Pressed001.png" "pressed": "resources/w/ui/img/Darklands002_State=Tap002.png"
} }
}, },
{ {

View File

@ -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"
}
]
}
}

View File

@ -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"
}
]
}
}

View File

@ -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
]
}
]
}
}

View File

@ -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
]
}
]
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
resources/w/ui/img/Darklands002_State=Default002.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/Darklands002_State=Selected002.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/Darklands002_State=Tap002.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/HealthBarBase002.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/HealthBarFill001.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/HealthBarPanel001.png (Stored with Git LFS)

Binary file not shown.

BIN
resources/w/ui/img/Hint_darklands001.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/Hint_darklands002_attack.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/Hint_darklands003_hp.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/ui/img/hint_arrow_up.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -215,6 +215,8 @@ namespace ZL
"resources/navigation/uni_interior2_unlocked_hall.txt" "resources/navigation/uni_interior2_unlocked_hall.txt"
}; };
*/ */
/* /*
uniInteriorParams.navigationJsonPaths = { uniInteriorParams.navigationJsonPaths = {
"resources/navigation/uni_interior0_all_locked.json", "resources/navigation/uni_interior0_all_locked.json",
@ -262,8 +264,14 @@ namespace ZL
locations["uni_interior"]->scriptEngine.setGlobalStore(&globalInts); locations["uni_interior"]->scriptEngine.setGlobalStore(&globalInts);
locations["uni_interior"]->scriptEngine.setGlobalFloatStore(&globalFloats); locations["uni_interior"]->scriptEngine.setGlobalFloatStore(&globalFloats);
locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); }; locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
locations["uni_interior"]->requestAdvanceDarklandsHud = [this]() { menuManager.advanceUniIntDarklandsHud(); };
if (locations["uni_interior"]->player) if (locations["uni_interior"]->player)
locations["uni_interior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); }; 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; LocationSetup uniExteriorParams = uniInteriorParams;
uniExteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_exterior.json"; uniExteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_exterior.json";
@ -381,6 +389,7 @@ namespace ZL
if (menuManager.tutorialStep == TutorialStep::Step2) { if (menuManager.tutorialStep == TutorialStep::Step2) {
menuManager.advanceTutorialStep(); menuManager.advanceTutorialStep();
} }
menuManager.onPlayerStartedWalking();
}; };
} }
@ -1056,7 +1065,6 @@ namespace ZL
return; return;
} }
// Only the primary, non-UI-captured pointer can promote itself into a // Only the primary, non-UI-captured pointer can promote itself into a
// camera-rotation drag once it crosses the movement threshold. // camera-rotation drag once it crosses the movement threshold.
if (hasPrimaryPointer && fingerId == primaryPointerId && it != activePointers.end() if (hasPrimaryPointer && fingerId == primaryPointerId && it != activePointers.end()
@ -1068,7 +1076,6 @@ namespace ZL
} }
} }
if (currentLocation) { if (currentLocation) {
// Forwarded for dialogue hover and (when cameraDragging) camera rotation. // Forwarded for dialogue hover and (when cameraDragging) camera rotation.
currentLocation->handleMotion(fingerId, eventX, eventY, mx, my); currentLocation->handleMotion(fingerId, eventX, eventY, mx, my);
@ -1108,7 +1115,6 @@ namespace ZL
if (darklandsFlashAlpha >= 1.0f) { if (darklandsFlashAlpha >= 1.0f) {
isDarklands = !isDarklands; isDarklands = !isDarklands;
// Change HUD // Change HUD
menuManager.setDarklandsMode(isDarklands); menuManager.setDarklandsMode(isDarklands);

View File

@ -94,6 +94,10 @@ namespace ZL
// request the transition without coupling Location to Game directly. // request the transition without coupling Location to Game directly.
std::function<bool()> requestDarklandsTransition; std::function<bool()> 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<void()> requestAdvanceDarklandsHud;
// Navigation editor — toggle with 'N', save with 'B', right-click to finalize polygon // Navigation editor — toggle with 'N', save with 'B', right-click to finalize polygon
bool navigationEditorMode = false; bool navigationEditorMode = false;

View File

@ -81,8 +81,14 @@ namespace ZL {
hudStep5aRoot = loadUiFromFile("resources/w/ui/hud_step5a.json", renderer, zipFile); hudStep5aRoot = loadUiFromFile("resources/w/ui/hud_step5a.json", renderer, zipFile);
hudStep5bRoot = loadUiFromFile("resources/w/ui/hud_step5b.json", renderer, zipFile); hudStep5bRoot = loadUiFromFile("resources/w/ui/hud_step5b.json", renderer, zipFile);
hudStep5abRoot = loadUiFromFile("resources/w/ui/hud_step5ab.json", renderer, zipFile); hudStep5abRoot = loadUiFromFile("resources/w/ui/hud_step5ab.json", renderer, zipFile);
hudUniExtRoot = loadUiFromFile("resources/w/ui/hud_uni_ext.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); 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); phoneChatListRoot = loadUiFromFile("resources/w/ui/screen_phone_chat_list.json", renderer, zipFile);
phoneChat1Root = loadUiFromFile("resources/w/ui/screen_phone_chat1.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); phoneChat2Root = loadUiFromFile("resources/w/ui/screen_phone_chat2.json", renderer, zipFile);
@ -344,29 +350,25 @@ namespace ZL {
} }
void MenuManager::setupGameplayHudCallbacks() { void MenuManager::setupGameplayHudCallbacks() {
uiManager.setButtonCallback("phoneButton", [this](const std::string&) { if (uiManager.findButton("phoneButton"))
openPhoneScreen(); uiManager.setButtonCallback("phoneButton", [this](const std::string&) { openPhoneScreen(); });
}); if (uiManager.findButton("inventoryButton"))
uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { openInventory(); });
openInventory(); if (uiManager.findButton("journalButton"))
}); uiManager.setButtonCallback("journalButton", [this](const std::string&) { openQuestJournal(); });
uiManager.setButtonCallback("journalButton", [this](const std::string&) { if (uiManager.findButton("darklandsButton"))
openQuestJournal(); uiManager.setButtonCallback("darklandsButton", [this](const std::string&) { startDarklandsTransitionFunc(); });
});
uiManager.setButtonCallback("darklandsButton", [this](const std::string&) {
startDarklandsTransitionFunc();
});
} }
void MenuManager::onLocationChanged(const std::string& locationName) { void MenuManager::onLocationChanged(const std::string& locationName) {
if (state != GameState::Gameplay) return; if (state != GameState::Gameplay) return;
currentLocationName_ = locationName;
if (locationName == "uni_exterior") { if (locationName == "uni_exterior") {
uiManager.replaceRoot(hudUniExtRoot); uiManager.replaceRoot(currentIsDarklands_ ? hudUniExtDarkRoot : hudUniExtRoot);
setupGameplayHudCallbacks(); setupGameplayHudCallbacks();
} else if (locationName == "uni_interior") { } else if (locationName == "uni_interior") {
uiManager.replaceRoot(hudUniIntRoot); applyUniIntHud();
setupGameplayHudCallbacks();
} else { } else {
// Returning to dorm: reuse step5ab, suppress already-completed hints // Returning to dorm: reuse step5ab, suppress already-completed hints
uiManager.replaceRoot(hudStep5abRoot); uiManager.replaceRoot(hudStep5abRoot);
@ -408,10 +410,22 @@ namespace ZL {
} }
void MenuManager::onItemPickedUp(const std::string& itemId) { 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) { if (tutorialStep != TutorialStep::Step4 && tutorialStep != TutorialStep::Step5) {
return; 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 == "phone") tutorialPhonePickedUp = true;
if (itemId == "journal") tutorialJournalPickedUp = true; if (itemId == "journal") tutorialJournalPickedUp = true;
@ -604,17 +618,70 @@ namespace ZL {
void MenuManager::setDarklandsMode(bool enabled) void MenuManager::setDarklandsMode(bool enabled)
{ {
if (enabled) currentIsDarklands_ = enabled;
{
uiManager.setNodeVisible("darklandsButton", false);
uiManager.setNodeVisible("phoneButton", false);
} if (currentLocationName_ == "uni_interior") {
else if (enabled && uniIntTutorialState_ == UniIntTutorialState::Step11) {
{ uniIntTutorialState_ = UniIntTutorialState::DarklandsActive;
uiManager.setNodeVisible("darklandsButton", true); }
uiManager.setNodeVisible("phoneButton", true); 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<UiNode> 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 } // namespace ZL

View File

@ -63,6 +63,9 @@ namespace ZL {
void advanceTutorialStep(); void advanceTutorialStep();
void onItemPickedUp(const std::string& itemId); void onItemPickedUp(const std::string& itemId);
void onLocationChanged(const std::string& locationName); void onLocationChanged(const std::string& locationName);
void onEnemyKilledInUniInterior();
void advanceUniIntDarklandsHud();
void onPlayerStartedWalking();
TutorialStep tutorialStep = TutorialStep::Step0; TutorialStep tutorialStep = TutorialStep::Step0;
@ -81,12 +84,18 @@ namespace ZL {
void openPhoneChatFromList(std::shared_ptr<UiNode> chatRoot, const std::string& dialogueId); void openPhoneChatFromList(std::shared_ptr<UiNode> chatRoot, const std::string& dialogueId);
void returnToPhoneChatList(); void returnToPhoneChatList();
void closePhoneScreenFromChat(); void closePhoneScreenFromChat();
void applyUniIntHud();
GameState state = GameState::Gameplay; GameState state = GameState::Gameplay;
Inventory* inventory = nullptr; Inventory* inventory = nullptr;
std::string zipFile_; std::string zipFile_;
int inventorySelectedIndex_ = -1; 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 tutorialPhonePickedUp = false;
bool tutorialJournalPickedUp = false; bool tutorialJournalPickedUp = false;
bool tutorialPhoneScreenOpened = false; bool tutorialPhoneScreenOpened = false;
@ -101,7 +110,13 @@ namespace ZL {
std::shared_ptr<UiNode> hudStep5bRoot; std::shared_ptr<UiNode> hudStep5bRoot;
std::shared_ptr<UiNode> hudStep5abRoot; std::shared_ptr<UiNode> hudStep5abRoot;
std::shared_ptr<UiNode> hudUniExtRoot; std::shared_ptr<UiNode> hudUniExtRoot;
std::shared_ptr<UiNode> hudUniIntRoot; std::shared_ptr<UiNode> hudUniIntStep10Root;
std::shared_ptr<UiNode> hudUniIntStep11Root;
std::shared_ptr<UiNode> hudUniIntStep12Root;
std::shared_ptr<UiNode> hudUniIntFullRoot;
std::shared_ptr<UiNode> hudUniIntStep13Root;
std::shared_ptr<UiNode> hudUniIntDarkFullRoot;
std::shared_ptr<UiNode> hudUniExtDarkRoot;
std::shared_ptr<UiNode> phoneChatListRoot; std::shared_ptr<UiNode> phoneChatListRoot;
std::shared_ptr<UiNode> phoneChat1Root; std::shared_ptr<UiNode> phoneChat1Root;
std::shared_ptr<UiNode> phoneChat2Root; std::shared_ptr<UiNode> phoneChat2Root;

View File

@ -203,6 +203,15 @@ namespace ZL {
game->requestDarklandsTransition(); 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) // set_location_callbacks(on_enter, on_exit)
// on_enter() called once when the player arrives at this location. // on_enter() called once when the player arrives at this location.
// on_exit() called once just before the player leaves this location. // on_exit() called once just before the player leaves this location.