Fixing clicking on phone

This commit is contained in:
Vladislav Khorev 2026-06-27 13:50:39 +03:00
parent bdad5fa107
commit 763ba9eeac
27 changed files with 179 additions and 48 deletions

View File

@ -22,14 +22,36 @@
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
},
{
"type": "Button",
"name": "phoneMain",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -60,
"width": 882,
"height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
@ -41,7 +63,7 @@
"height": 172, "height": 172,
"texture": "resources/w/ui/img/phone2/ClockDay001.png" "texture": "resources/w/ui/img/phone2/ClockDay001.png"
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "phoneTimeNight", "name": "phoneTimeNight",
"horizontal_gravity": "center", "horizontal_gravity": "center",
@ -51,7 +73,7 @@
"height": 120.4, "height": 120.4,
"texture": "resources/w/ui/img/phone2/ClockNight001.png" "texture": "resources/w/ui/img/phone2/ClockNight001.png"
}, },
{ {
"type": "StaticImage", "type": "StaticImage",
"name": "phoneTimeDawn", "name": "phoneTimeDawn",
"horizontal_gravity": "center", "horizontal_gravity": "center",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phoneBank/PhoneBank002.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phoneBank/PhoneBank002.png",
"hover": "resources/w/ui/img/phoneBank/PhoneBank002.png",
"pressed": "resources/w/ui/img/phoneBank/PhoneBank002.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChatList001.png", "normal": "resources/w/ui/img/phone/PhoneChatList001.png",
"hover": "resources/w/ui/img/phone/PhoneChatList001.png", "hover": "resources/w/ui/img/phone/PhoneChatList001.png",

View File

@ -48,6 +48,8 @@
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChatList001.png", "normal": "resources/w/ui/img/phone/PhoneChatList001.png",
"hover": "resources/w/ui/img/phone/PhoneChatList001.png", "hover": "resources/w/ui/img/phone/PhoneChatList001.png",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png",
"hover": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png",
"pressed": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phoneMap/PhoneMapUni001.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phoneMap/PhoneMapUni001.png",
"hover": "resources/w/ui/img/phoneMap/PhoneMapUni001.png",
"pressed": "resources/w/ui/img/phoneMap/PhoneMapUni001.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 882, "width": 882,
"height": 1416, "height": 1416,
"texture": "resources/w/ui/img/phoneVideo/PhoneVideo003.png" "clickZoneWidth": 600,
"clickZoneHeight": 900,
"textures": {
"normal": "resources/w/ui/img/phoneVideo/PhoneVideo003.png",
"hover": "resources/w/ui/img/phoneVideo/PhoneVideo003.png",
"pressed": "resources/w/ui/img/phoneVideo/PhoneVideo003.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phoneBank/PhoneBank002.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phoneBank/PhoneBank002.png",
"hover": "resources/w/ui/img/phoneBank/PhoneBank002.png",
"pressed": "resources/w/ui/img/phoneBank/PhoneBank002.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChat001.png", "normal": "resources/w/ui/img/phone/PhoneChat001.png",
"hover": "resources/w/ui/img/phone/PhoneChat001.png", "hover": "resources/w/ui/img/phone/PhoneChat001.png",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChatList001.png", "normal": "resources/w/ui/img/phone/PhoneChatList001.png",
"hover": "resources/w/ui/img/phone/PhoneChatList001.png", "hover": "resources/w/ui/img/phone/PhoneChatList001.png",

View File

@ -48,6 +48,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": { "textures": {
"normal": "resources/w/ui/img/phone/PhoneChatList001.png", "normal": "resources/w/ui/img/phone/PhoneChatList001.png",
"hover": "resources/w/ui/img/phone/PhoneChatList001.png", "hover": "resources/w/ui/img/phone/PhoneChatList001.png",

View File

@ -22,14 +22,20 @@
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -22,14 +22,20 @@
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phone2/Phone002.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phone2/Phone002.png",
"hover": "resources/w/ui/img/phone2/Phone002.png",
"pressed": "resources/w/ui/img/phone2/Phone002.png"
}
}, },
{ {
"type": "StaticImage", "type": "StaticImage",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png",
"hover": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png",
"pressed": "resources/w/ui/img/phoneMap/PhoneMapDorm001.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -21,15 +21,21 @@
"pressed": "resources/transparent.png" "pressed": "resources/transparent.png"
} }
}, },
{ {
"type": "StaticImage", "type": "Button",
"name": "phoneMain", "name": "phoneMain",
"horizontal_gravity": "center", "horizontal_gravity": "center",
"vertical_gravity": "center", "vertical_gravity": "center",
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"texture": "resources/w/ui/img/phoneMap/PhoneMapUni001.png" "clickZoneWidth": 500,
"clickZoneHeight": 800,
"textures": {
"normal": "resources/w/ui/img/phoneMap/PhoneMapUni001.png",
"hover": "resources/w/ui/img/phoneMap/PhoneMapUni001.png",
"pressed": "resources/w/ui/img/phoneMap/PhoneMapUni001.png"
}
}, },
{ {
"type": "Button", "type": "Button",

View File

@ -29,6 +29,8 @@
"y": -60, "y": -60,
"width": 617.4, "width": 617.4,
"height": 991.2, "height": 991.2,
"clickZoneWidth": 500,
"clickZoneHeight": 800,
"texture": "resources/w/ui/img/phoneVideo/PhoneVideo003.png" "texture": "resources/w/ui/img/phoneVideo/PhoneVideo003.png"
}, },
{ {

View File

@ -7,7 +7,6 @@
#include <algorithm> #include <algorithm>
#include <string> #include <string>
namespace ZL { namespace ZL {
static int questStatusPriority(Quest::QuestStatus status) { static int questStatusPriority(Quest::QuestStatus status) {
@ -610,6 +609,7 @@ namespace ZL {
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) { uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
closePhoneEntirely(); closePhoneEntirely();
}); });
uiManager.setButtonCallback("phoneMain", [this](const std::string&) {});
uiManager.setButtonCallback("phoneMessenger", [this](const std::string&) { uiManager.setButtonCallback("phoneMessenger", [this](const std::string&) {
openPhoneMessenger(); openPhoneMessenger();
}); });
@ -710,6 +710,7 @@ namespace ZL {
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) { uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
closePhoneEntirely(); closePhoneEntirely();
}); });
uiManager.setButtonCallback("phoneMain", [this](const std::string&) {});
uiManager.setButtonCallback("buttonBack", [this](const std::string&) { uiManager.setButtonCallback("buttonBack", [this](const std::string&) {
uiManager.popMenu(); uiManager.popMenu();
uiManager.updateAllLayouts(); uiManager.updateAllLayouts();
@ -723,6 +724,7 @@ namespace ZL {
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) { uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
closePhoneEntirely(); closePhoneEntirely();
}); });
uiManager.setButtonCallback("phoneMain", [this](const std::string&) {});
uiManager.setButtonCallback("buttonBack", [this](const std::string&) { uiManager.setButtonCallback("buttonBack", [this](const std::string&) {
uiManager.popMenu(); uiManager.popMenu();
uiManager.updateAllLayouts(); uiManager.updateAllLayouts();
@ -768,6 +770,7 @@ namespace ZL {
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) { uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
closePhoneEntirely(); closePhoneEntirely();
}); });
uiManager.setButtonCallback("phoneMain", [this](const std::string&) {});
uiManager.setButtonCallback("buttonBack", [this](const std::string&) { uiManager.setButtonCallback("buttonBack", [this](const std::string&) {
uiManager.popMenu(); uiManager.popMenu();
uiManager.updateAllLayouts(); uiManager.updateAllLayouts();