Fixing hints for portrait mode

This commit is contained in:
Vladislav Khorev 2026-06-27 15:14:03 +03:00
parent 763ba9eeac
commit 40e7e0ee44
15 changed files with 162 additions and 163 deletions

View File

@ -18,8 +18,8 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint4", "name": "hint4",
"width": 940, "width": 705,
"height": 312, "height": 234,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"texture": "resources/w/ui/img/Hint4.png", "texture": "resources/w/ui/img/Hint4.png",
"pulse": { "pulse": {

View File

@ -18,8 +18,8 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint5", "name": "hint5",
"width": 808, "width": 606,
"height": 268, "height": 201,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"texture": "resources/w/ui/img/Hint5.png", "texture": "resources/w/ui/img/Hint5.png",
"pulse": { "pulse": {

View File

@ -58,21 +58,22 @@
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "location", "name": "hint6aarrow",
"width": 380, "horizontal_gravity": "right",
"height": 64, "vertical_gravity" : "bottom",
"y": 30, "width": 118,
"horizontal_gravity": "center", "height": 118,
"vertical_align": "top", "x": 80,
"texture": "resources/w/ui/img/Location_dorm.png" "y": 60,
"texture": "resources/w/ui/img/hint_arrow_right_bottom.png"
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint6a", "name": "hint6a",
"width": 606, "width": 606,
"height": 234, "height": 234,
"x" : 270, "x" : 110,
"y" : -20, "y" : 80,
"horizontal_gravity": "right", "horizontal_gravity": "right",
"vertical_gravity" : "bottom", "vertical_gravity" : "bottom",
"texture": "resources/w/ui/img/Hint6a.png", "texture": "resources/w/ui/img/Hint6a.png",

View File

@ -85,47 +85,22 @@
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint6b", "name": "hint6aarrow",
"horizontal_gravity": "right", "horizontal_gravity": "right",
"width": 738.75, "vertical_gravity" : "bottom",
"height": 292.5, "width": 118,
"x": 0,
"y": 200,
"texture": "resources/w/ui/img/Hint6b.png",
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
},
{
"type": "StaticImage",
"name": "hint6barrow",
"horizontal_gravity": "right",
"width": 24,
"height": 118, "height": 118,
"x": 280, "x": 80,
"y": 120, "y": 60,
"texture": "resources/w/ui/img/hint_arrow_up.png", "texture": "resources/w/ui/img/hint_arrow_right_bottom.png"
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint6a", "name": "hint6a",
"width": 606, "width": 606,
"height": 234, "height": 234,
"x" : 270, "x" : 110,
"y" : -20, "y" : 80,
"horizontal_gravity": "right", "horizontal_gravity": "right",
"vertical_gravity" : "bottom", "vertical_gravity" : "bottom",
"texture": "resources/w/ui/img/Hint6a.png", "texture": "resources/w/ui/img/Hint6a.png",
@ -140,14 +115,43 @@
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint6aarrow", "name": "hint6b",
"width": 170, "horizontal_gravity": "right",
"height": 48, "width": 738.75,
"x" : 140, "height": 292.5,
"y" : 50, "x": 0,
"y": 360,
"texture": "resources/w/ui/img/Hint6b.png",
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
},
{
"type": "StaticImage",
"name": "hint6barrow",
"horizontal_gravity": "right",
"width": 118,
"height": 118,
"x": 80,
"y": 300,
"texture": "resources/w/ui/img/hint_arrow_right_top.png"
},
{
"type": "StaticImage",
"name": "hint7arrow",
"horizontal_gravity": "right", "horizontal_gravity": "right",
"vertical_gravity" : "bottom", "vertical_gravity" : "bottom",
"texture": "resources/w/ui/img/hint_arrow_left.png", "width": 118,
"height": 118,
"x": 80,
"y": 60,
"texture": "resources/w/ui/img/hint_arrow_right_bottom.png",
"visible":false,
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
"maxScale": 1.08, "maxScale": 1.08,
@ -162,8 +166,8 @@
"name": "hint7", "name": "hint7",
"width": 606, "width": 606,
"height": 201, "height": 201,
"x" : 270, "x" : 110,
"y" : -20, "y" : 80,
"visible":false, "visible":false,
"horizontal_gravity": "right", "horizontal_gravity": "right",
"vertical_gravity" : "bottom", "vertical_gravity" : "bottom",
@ -176,26 +180,6 @@
"fadeIn": { "fadeIn": {
"durationMs": 1000 "durationMs": 1000
} }
},
{
"type": "StaticImage",
"name": "hint7arrow",
"width": 170,
"height": 48,
"x" : 140,
"y" : 50,
"visible":false,
"horizontal_gravity": "right",
"vertical_gravity" : "bottom",
"texture": "resources/w/ui/img/hint_arrow_left.png",
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
} }
] ]
} }

View File

@ -63,8 +63,8 @@
"height": 64, "height": 64,
"y": 30, "y": 30,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_align": "top", "vertical_gravity": "bottom",
"texture": "resources/w/ui/img/Location_uni_ext.png" "texture": "resources/w/ui/img/Location_dorm.png"
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
@ -73,7 +73,7 @@
"width": 738.75, "width": 738.75,
"height": 292.5, "height": 292.5,
"x": 0, "x": 0,
"y": 200, "y": 360,
"texture": "resources/w/ui/img/Hint6b.png", "texture": "resources/w/ui/img/Hint6b.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
@ -88,11 +88,11 @@
"type": "StaticImage", "type": "StaticImage",
"name": "hint6barrow", "name": "hint6barrow",
"horizontal_gravity": "right", "horizontal_gravity": "right",
"width": 24, "width": 118,
"height": 118, "height": 118,
"x": 280, "x": 80,
"y": 120, "y": 300,
"texture": "resources/w/ui/img/hint_arrow_up.png" "texture": "resources/w/ui/img/hint_arrow_right_top.png"
} }
] ]
} }

View File

@ -10,9 +10,10 @@
"name": "hint2", "name": "hint2",
"width": 72, "width": 72,
"height": 354, "height": 354,
"y": 200, "y": -100,
"x": 500, "x": 0,
"horizontal_gravity": "right", "horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/hint_arrow_down.png", "texture": "resources/w/ui/img/hint_arrow_down.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
@ -26,11 +27,12 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint1", "name": "hint1",
"width": 880, "width": 660,
"height": 268, "height": 201,
"x": 100, "x": 0,
"y" : -40, "y" : 160,
"horizontal_gravity": "right", "horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/Hint1.png", "texture": "resources/w/ui/img/Hint1.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

View File

@ -7,25 +7,6 @@
"vertical_align": "center", "vertical_align": "center",
"horizontal_align": "center", "horizontal_align": "center",
"children": [ "children": [
{
"type": "StaticImage",
"name": "hint_m002",
"width": 400,
"height": 156,
"x": 420,
"y": 0,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"texture": "resources/w/ui/img/Hint_m001.png",
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
},
{ {
"type": "Button", "type": "Button",
"name": "phoneExitButton", "name": "phoneExitButton",
@ -260,6 +241,25 @@
] ]
} }
] ]
},
{
"type": "StaticImage",
"name": "hint_m002",
"width": 600,
"height": 234,
"x": 0,
"y": 10,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"texture": "resources/w/ui/img/Hint_m001.png",
"pulse": {
"minScale": 0.92,
"maxScale": 1.08,
"periodMs": 1500
},
"fadeIn": {
"durationMs": 1000
}
} }
] ]
} }

View File

@ -130,13 +130,13 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m001arrow", "name": "hint_m001arrow",
"width": 170, "width": 48,
"height": 48, "height": 170,
"x" : -220, "x": -110,
"y" : 150, "y": -400,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity" : "bottom", "vertical_gravity": "center",
"texture": "resources/w/ui/img/hint_arrow_left.png", "texture": "resources/w/ui/img/hint_arrow_up.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
"maxScale": 1.08, "maxScale": 1.08,
@ -149,12 +149,12 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m001", "name": "hint_m001",
"width": 414, "width": 621,
"height": 156, "height": 234,
"x" : -420, "x": 0,
"y" : 100, "y": -470,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity" : "bottom", "vertical_gravity": "center",
"texture": "resources/w/ui/img/Hint_m002.png", "texture": "resources/w/ui/img/Hint_m002.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,

View File

@ -130,13 +130,13 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m001arrow", "name": "hint_m001arrow",
"width": 170, "width": 48,
"height": 48, "height": 170,
"x": -220, "x": -110,
"y": 150, "y": -400,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "bottom", "vertical_gravity": "center",
"texture": "resources/w/ui/img/hint_arrow_left.png", "texture": "resources/w/ui/img/hint_arrow_up.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
"maxScale": 1.08, "maxScale": 1.08,
@ -149,12 +149,12 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m001", "name": "hint_m001",
"width": 414, "width": 621,
"height": 156, "height": 234,
"x": -420, "x": 0,
"y": 100, "y": -470,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "bottom", "vertical_gravity": "center",
"texture": "resources/w/ui/img/Hint_m002.png", "texture": "resources/w/ui/img/Hint_m002.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
@ -168,13 +168,13 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m003arrow", "name": "hint_m003arrow",
"width": 170, "width": 48,
"height": 48, "height": 170,
"x": 220, "x" : 110,
"y": 270, "y" : 130,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "bottom", "vertical_gravity" : "center",
"texture": "resources/w/ui/img/hint_arrow_right.png", "texture": "resources/w/ui/img/hint_arrow_down_small.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
"maxScale": 1.08, "maxScale": 1.08,
@ -187,12 +187,12 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m003", "name": "hint_m003",
"width": 318, "width": 636,
"height": 178, "height": 356,
"x": 420, "x" : 0,
"y": 220, "y" : 250,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "bottom", "vertical_gravity" : "center",
"texture": "resources/w/ui/img/Hint_m003.png", "texture": "resources/w/ui/img/Hint_m003.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,

View File

@ -130,13 +130,13 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m003arrow", "name": "hint_m003arrow",
"width": 170, "width": 48,
"height": 48, "height": 170,
"x" : 220, "x" : 110,
"y" : 270, "y" : 130,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity" : "bottom", "vertical_gravity" : "center",
"texture": "resources/w/ui/img/hint_arrow_right.png", "texture": "resources/w/ui/img/hint_arrow_down_small.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,
"maxScale": 1.08, "maxScale": 1.08,
@ -149,12 +149,12 @@
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "hint_m003", "name": "hint_m003",
"width": 318, "width": 636,
"height": 178, "height": 356,
"x" : 420, "x" : 0,
"y" : 220, "y" : 250,
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity" : "bottom", "vertical_gravity" : "center",
"texture": "resources/w/ui/img/Hint_m003.png", "texture": "resources/w/ui/img/Hint_m003.png",
"pulse": { "pulse": {
"minScale": 0.92, "minScale": 0.92,

View File

@ -941,6 +941,7 @@ namespace ZL
Environment::computeProjectionDimensions(); Environment::computeProjectionDimensions();
const bool isPortrait = Environment::width < Environment::height; const bool isPortrait = Environment::width < Environment::height;
menuManager.uiManager.updateAllLayouts(); menuManager.uiManager.updateAllLayouts();
menuManager.topUiManager.updateAllLayouts();
if (wasPortrait != isPortrait) { if (wasPortrait != isPortrait) {
menuManager.onOrientationChanged(); menuManager.onOrientationChanged();
} }

View File

@ -606,6 +606,8 @@ namespace ZL {
uiManager.pushMenuFromSavedRoot(phoneMainRoot); uiManager.pushMenuFromSavedRoot(phoneMainRoot);
} }
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) { uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
closePhoneEntirely(); closePhoneEntirely();
}); });