From 2e749ed26eb6aac59d5d0541855bdce0c448779b Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Sun, 19 Jul 2026 21:38:22 +0300 Subject: [PATCH] Fixing Android stuff --- .../dialogue/uni_exterior_dialogues003.json | 64 +++ resources/start_dorm.lua | 6 +- resources/start_uni_exterior.lua | 35 +- resources/start_uni_interior.lua | 12 +- resources/w/ui/hud_step2android.json | 65 +++ .../w/ui/img/main/aboutPage003android.png | 4 +- ...rait.json => portrait_screen_credits.json} | 18 +- resources/w/ui/screen_about_android.json | 13 + resources/w/ui/screen_credits.json | 18 +- resources/w/ui/screen_main_menu.json | 2 +- resources/w/ui/screen_main_menu_android.json | 2 +- resources/w/ui_en/hud_step2android.json | 65 +++ resources/w/ui_en/img/Hint3android.png | 3 + .../w/ui_en/portrait_screen_credits.json | 369 ++++++++++++++++++ resources/w/ui_en/screen_about_android.json | 13 + resources/w/ui_en/screen_credits.json | 18 +- resources/w/ui_en/screen_main_menu.json | 2 +- .../w/ui_en/screen_main_menu_android.json | 2 +- src/MenuManager.cpp | 35 +- src/MenuManager.h | 2 +- 20 files changed, 716 insertions(+), 32 deletions(-) create mode 100644 resources/w/ui/hud_step2android.json rename resources/w/ui/{screen_credits_portrait.json => portrait_screen_credits.json} (96%) create mode 100644 resources/w/ui_en/hud_step2android.json create mode 100644 resources/w/ui_en/img/Hint3android.png create mode 100644 resources/w/ui_en/portrait_screen_credits.json diff --git a/resources/dialogue/uni_exterior_dialogues003.json b/resources/dialogue/uni_exterior_dialogues003.json index d2fb8d1..04ad884 100644 --- a/resources/dialogue/uni_exterior_dialogues003.json +++ b/resources/dialogue/uni_exterior_dialogues003.json @@ -412,6 +412,70 @@ } ] }, + { + "id": "dialog_chat_aiperi003", + "start": "line_1", + "nodes": [ + { + "id": "line_1", + "type": "Line", + "speaker": "Бекзат", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "Айпери ты куда убежала?", + "next": "line_2", + "chatBubble": "out" + }, + { + "id": "line_2", + "type": "Line", + "speaker": "Айпери", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "Ты достал уже, я не могу тебя ждать вечно! Возишься как сонная муха.", + "next": "line_3", + "chatBubble": "in" + }, + { + "id": "line_3", + "type": "Line", + "speaker": "Айпери", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "У меня нет времени ждать тебя, мне уже пора на курсы ехать.", + "next": "line_4", + "chatBubble": "in" + }, + { + "id": "line_4", + "type": "Line", + "speaker": "Бекзат", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "Так когда я тебе нож верну?", + "next": "line_5", + "chatBubble": "out" + }, + { + "id": "line_5", + "type": "Line", + "speaker": "Айпери", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "Приходи завтра в универ! Я каждый день в унике с раннего утра.", + "next": "line_6", + "chatBubble": "in" + }, + { + "id": "line_6", + "type": "Line", + "speaker": "Бекзат", + "portrait": "resources/dialogue/portrait_phone.png", + "text": "Хорошо, встретимся завтра.", + "next": "end_1", + "chatBubble": "out" + }, + { + "id": "end_1", + "type": "End" + } + ] + }, { "id": "dialog_car001", "start": "line_1", diff --git a/resources/start_dorm.lua b/resources/start_dorm.lua index 45148f1..ca53c81 100644 --- a/resources/start_dorm.lua +++ b/resources/start_dorm.lua @@ -106,13 +106,15 @@ end function on_alik_door_click() if (game_api.is_night()) then game_api.start_dialogue("door_alik_dialog002") + game_api.player_stop() + game_api.player_rotate_to(-90.0) else if (alik_door_opened == false) then game_api.start_dialogue("door_alik_dialog001") + game_api.player_stop() + game_api.player_rotate_to(-90.0) end end - game_api.player_stop() - game_api.player_rotate_to(-90.0) end function callback_deactivate_cover_alik_room() diff --git a/resources/start_uni_exterior.lua b/resources/start_uni_exterior.lua index ac3ea0c..807a945 100644 --- a/resources/start_uni_exterior.lua +++ b/resources/start_uni_exterior.lua @@ -155,8 +155,9 @@ function callback_aiperi_chat() game_api.setIntValue("aiperi_chat_opened", 1) local aiperi_knife_aware = game_api.getIntValue("aiperi_knife_aware") local aiperi_talked_after_knife = game_api.getIntValue("aiperi_talked_after_knife") - - if (player_hold_knife) and (aiperi_talked_after_knife == 0) then + local player_hold_knife = game_api.getIntValue("player_hold_knife") + + if (player_hold_knife==1) and (aiperi_talked_after_knife == 0) then game_api.start_dialogue("dialog_chat_aiperi003") game_api.setIntValue("aiperi_talked_after_knife", 1) else @@ -170,6 +171,36 @@ function callback_aiperi_chat() end end end + --[[ + local aiperi_chat_opened = game_api.getIntValue("aiperi_chat_opened") + local aiperi_knife_aware = game_api.getIntValue("aiperi_knife_aware") + local aiperi_talked_after_knife = game_api.getIntValue("aiperi_talked_after_knife") + local lection_is_over = game_api.getIntValue("lection_is_over") + local player_hold_knife = game_api.getIntValue("player_hold_knife") + local player_hold_key = game_api.getIntValue("player_hold_key") + + if (player_hold_knife==1) and (aiperi_talked_after_knife == 0) then + game_api.start_dialogue("dialog_chat_aiperi003") + game_api.setIntValue("aiperi_talked_after_knife", 1) + else + print("dialogx- step 2") + if aiperi_chat_opened == 0 then + print("dialogx- step 3") + game_api.setIntValue("aiperi_chat_opened", 1) + if aiperi_knife_aware == 0 then + print("dialogx- step 4") + if (lection_is_over == 1) then + print("dialogx- step 5") + if (player_hold_key == 0) then + print("dialogx- step 6") + game_api.start_dialogue("dialog_chat_aiperi002") + end + else + game_api.start_dialogue("dialog_chat_aiperi001") + end + end + end + end]] end end diff --git a/resources/start_uni_interior.lua b/resources/start_uni_interior.lua index afc44fd..14d818f 100644 --- a/resources/start_uni_interior.lua +++ b/resources/start_uni_interior.lua @@ -5,7 +5,6 @@ hall_door_opened = false teacher_door_opened = false player_hold_book = false -player_hold_knife = false teacher_arrived_to_library = false teacher_told_about_book = false @@ -60,9 +59,10 @@ game_api.set_trigger_zone_callbacks("lection_hall_zone001", function knife_dialog_zone001_enter_callback() local day = game_api.getIntValue("day") local player_hold_key = game_api.getIntValue("player_hold_key") + local player_hold_knife = game_api.getIntValue("player_hold_knife") if (day == 0) then - if (player_hold_knife == false) then + if (player_hold_knife == 0) then local lection_is_over = game_api.getIntValue("lection_is_over") if lection_is_over == 1 then game_api.npc_stop_and_rotate_to_player(1) @@ -111,7 +111,8 @@ function on_knife_pickup() game_api.pickup_item("knife") game_api.deactivate_interactive_object("Knife001") game_api.set_npc_enabled(1, false) - player_hold_knife = true + game_api.setIntValue("player_hold_knife", 1) + game_api.set_trigger_zone_enabled(2, true) game_api.npc_walk_to(0, -4.57412, 0, 6.78495, on_teacher_arrived2) game_api.quest_set_objective_completed("aiperi_knife", "aiperi_knife_take") @@ -1171,8 +1172,9 @@ function callback_aiperi_chat() local aiperi_knife_aware = game_api.getIntValue("aiperi_knife_aware") local aiperi_talked_after_knife = game_api.getIntValue("aiperi_talked_after_knife") local lection_is_over = game_api.getIntValue("lection_is_over") - - if (player_hold_knife) and (aiperi_talked_after_knife == 0) then + local player_hold_knife = game_api.getIntValue("player_hold_knife") + + if (player_hold_knife==1) and (aiperi_talked_after_knife == 0) then game_api.start_dialogue("dialog_chat_aiperi003") game_api.setIntValue("aiperi_talked_after_knife", 1) else diff --git a/resources/w/ui/hud_step2android.json b/resources/w/ui/hud_step2android.json new file mode 100644 index 0000000..5ef3812 --- /dev/null +++ b/resources/w/ui/hud_step2android.json @@ -0,0 +1,65 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -35, + "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": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_gravity": "bottom", + "texture": "resources/w/ui/img/Location_dorm.png" + }, + { + "type": "LinearLayout", + "orientation": "vertical", + "vertical_align": "center", + "horizontal_align": "center", + "spacing": 0, + "width": "match_parent", + "height": 600, + "y": 300, + "children": [ + { + "type": "StaticImage", + "name": "hint3", + "width": 692, + "height": 312, + "horizontal_gravity": "center", + "texture": "resources/w/ui/img/Hint3.png", + "pulse": { + "minScale": 0.92, + "maxScale": 1.08, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 1000 + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/resources/w/ui/img/main/aboutPage003android.png b/resources/w/ui/img/main/aboutPage003android.png index 8908476..424230e 100644 --- a/resources/w/ui/img/main/aboutPage003android.png +++ b/resources/w/ui/img/main/aboutPage003android.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce1685a2e54bf230531513da5cea0344177969f653afd0584928d39a45005ff5 -size 198399 +oid sha256:f9babe23b999774b2f718319a5c47fd4eafd2a246ce86c842bdb2d81d636c212 +size 195591 diff --git a/resources/w/ui/screen_credits_portrait.json b/resources/w/ui/portrait_screen_credits.json similarity index 96% rename from resources/w/ui/screen_credits_portrait.json rename to resources/w/ui/portrait_screen_credits.json index a909fb5..c58c3ab 100644 --- a/resources/w/ui/screen_credits_portrait.json +++ b/resources/w/ui/portrait_screen_credits.json @@ -30,7 +30,7 @@ 0, 3600 ], - "duration": 40.0 + "duration": 37.0 } ] } @@ -43,7 +43,7 @@ "type": "TextView", "name": "smallPause", "width": 300, - "height": 700, + "height": 1570, "text": "", "fontSize": 40, "textCentered": true, @@ -333,12 +333,22 @@ "type": "TextView", "name": "creditsText28", "width": 300, - "height": 40, + "height": 160, "text": "Некоторые арты, 3D модели\nи текстуры были созданы\nс помощью нейросетей.", "fontSize": 32, "textCentered": false, "color": [1.0, 1.0, 1.0, 1.0] - } + }, + { + "type": "TextView", + "name": "creditsText29", + "width": 300, + "height": 40, + "text": "Некоторые текстуры были\nразработаны Magnific\nwww.magnific.com", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + } ] }, { diff --git a/resources/w/ui/screen_about_android.json b/resources/w/ui/screen_about_android.json index 3895708..1234216 100644 --- a/resources/w/ui/screen_about_android.json +++ b/resources/w/ui/screen_about_android.json @@ -21,6 +21,19 @@ "horizontal_gravity": "center", "vertical_gravity": "center", "texture": "resources/w/ui/img/main/aboutPage003android.png" + }, + { + "type": "TextButton", + "name": "websiteButton", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "y": 200, + "width": 200, + "height": 60, + "text": "Сайт игры Тень над Бишкеком", + "fontSize": 36, + "color": [0.55, 0.9, 1.0, 1.0], + "textCentered": true }, { "type": "TextButton", diff --git a/resources/w/ui/screen_credits.json b/resources/w/ui/screen_credits.json index a288e10..a75d90b 100644 --- a/resources/w/ui/screen_credits.json +++ b/resources/w/ui/screen_credits.json @@ -28,9 +28,9 @@ "type": "move", "to": [ 0, - 2600 + 2800 ], - "duration": 30.0 + "duration": 33.0 } ] } @@ -333,12 +333,22 @@ "type": "TextView", "name": "creditsText28", "width": 300, - "height": 40, + "height": 160, "text": "Некоторые арты, 3D модели\nи текстуры были созданы\nс помощью нейросетей.", "fontSize": 32, "textCentered": false, "color": [1.0, 1.0, 1.0, 1.0] - } + }, + { + "type": "TextView", + "name": "creditsText29", + "width": 300, + "height": 40, + "text": "Некоторые текстуры были\nразработаны Magnific\nwww.magnific.com", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + } ] }, { diff --git a/resources/w/ui/screen_main_menu.json b/resources/w/ui/screen_main_menu.json index cb45c59..3fbf1be 100644 --- a/resources/w/ui/screen_main_menu.json +++ b/resources/w/ui/screen_main_menu.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.1", + "text": "v. 1.0.2", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui/screen_main_menu_android.json b/resources/w/ui/screen_main_menu_android.json index f798abd..45a6d60 100644 --- a/resources/w/ui/screen_main_menu_android.json +++ b/resources/w/ui/screen_main_menu_android.json @@ -116,7 +116,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.1", + "text": "v. 1.0.2", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui_en/hud_step2android.json b/resources/w/ui_en/hud_step2android.json new file mode 100644 index 0000000..38e3966 --- /dev/null +++ b/resources/w/ui_en/hud_step2android.json @@ -0,0 +1,65 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -35, + "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": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y": 30, + "horizontal_gravity": "center", + "vertical_gravity": "bottom", + "texture": "resources/w/ui_en/img/Location_dorm.png" + }, + { + "type": "LinearLayout", + "orientation": "vertical", + "vertical_align": "center", + "horizontal_align": "center", + "spacing": 0, + "width": "match_parent", + "height": 600, + "y": 300, + "children": [ + { + "type": "StaticImage", + "name": "hint3", + "width": 692, + "height": 312, + "horizontal_gravity": "center", + "texture": "resources/w/ui_en/img/Hint3android.png", + "pulse": { + "minScale": 0.88, + "maxScale": 0.95, + "periodMs": 1500 + }, + "fadeIn": { + "durationMs": 1000 + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/resources/w/ui_en/img/Hint3android.png b/resources/w/ui_en/img/Hint3android.png new file mode 100644 index 0000000..5da4dc0 --- /dev/null +++ b/resources/w/ui_en/img/Hint3android.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52eaa515eaa498936f792fd9b6fb93f29b3560cead17dc11fb7370a9d1d654e4 +size 327227 diff --git a/resources/w/ui_en/portrait_screen_credits.json b/resources/w/ui_en/portrait_screen_credits.json new file mode 100644 index 0000000..2f20ce7 --- /dev/null +++ b/resources/w/ui_en/portrait_screen_credits.json @@ -0,0 +1,369 @@ +{ + "root": { + "type": "FrameLayout", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "StaticImage", + "name": "creditsBkg", + "width": 2992, + "height": 1632, + "horizontal_gravity": "center", + "vertical_gravity": "center", + "texture": "resources/w/ui/img/main/MenuBkg001_v001.png" + }, + { + "type": "LinearLayout", + "name": "creditsLinearLayout", + "orientation": "vertical", + "horizontal_gravity": "center", + "vertical_gravity": "top", + "horizontal_align": "left", + "animations": { + "slowScroll": { + "repeat": true, + "steps": [ + { + "type": "move", + "to": [ + 0, + 3600 + ], + "duration": 37.0 + } + ] + } + }, + "width": 300, + "height": 4500, + "spacing": 20, + "children": [ + { + "type": "TextView", + "name": "smallPause", + "width": 300, + "height": 1570, + "text": "", + "fontSize": 40, + "textCentered": true, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsTitleText", + "width": 300, + "height": 60, + "text": "Shadow over Bishkek Demo", + "fontSize": 40, + "textCentered": true, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText1", + "width": 300, + "height": 20, + "text": "Producer:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText2", + "width": 300, + "height": 40, + "text": "Vladislav Khorev", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText3", + "width": 300, + "height": 20, + "text": "Game Design:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText4", + "width": 300, + "height": 20, + "text": "Vladislav Khorev", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText5", + "width": 300, + "height": 40, + "text": "Leila Bobrova", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText6", + "width": 300, + "height": 20, + "text": "Story:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText7", + "width": 300, + "height": 20, + "text": "Vladislav Khorev", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText8", + "width": 300, + "height": 40, + "text": "Leila Bobrova", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText9", + "width": 300, + "height": 20, + "text": "Development:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText10", + "width": 300, + "height": 20, + "text": "Vladislav Khorev", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText11", + "width": 300, + "height": 20, + "text": "Vladislav Kan", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText12", + "width": 300, + "height": 20, + "text": "Beksultan Almazbekov", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText13", + "width": 300, + "height": 40, + "text": "Sergei Zotov", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText14", + "width": 300, + "height": 20, + "text": "Characters and animations:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText15", + "width": 300, + "height": 20, + "text": "Dmitry Prohorchik", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText16", + "width": 300, + "height": 40, + "text": "Roman Trestcov", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText17", + "width": 300, + "height": 20, + "text": "3D Assets:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText18", + "width": 300, + "height": 20, + "text": "Dmitry Prohorchik", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText19", + "width": 300, + "height": 40, + "text": "Ishmaladi (turbosquid.com)", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText20", + "width": 300, + "height": 20, + "text": "Arts:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText21", + "width": 300, + "height": 40, + "text": "Maggie Tem", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText22", + "width": 300, + "height": 20, + "text": "UI/UX:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText23", + "width": 300, + "height": 40, + "text": "Kenje Kazmatova", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText24", + "width": 300, + "height": 20, + "text": "Music:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText25", + "width": 300, + "height": 40, + "text": "Pazetic_Ocean", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText26", + "width": 300, + "height": 20, + "text": "Sounds:", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 0.85, 0.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText27", + "width": 300, + "height": 300, + "text": "IENBA, ImAFoley, stradie,\nItsTheGoodstuff, uwesoundboiz,\nAnthousai, Foxfire-,\nn-lerche, CogFireStudios,\nadcbicycle, AntoineRomo,\nSmallConfusion, joedeshon,\nefectirijillo (FreeSound.org)", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText28", + "width": 300, + "height": 160, + "text": "Some art, 3D models\nand textures were created\nusing neural networks.", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "creditsText29", + "width": 300, + "height": 40, + "text": "Some textures were\nDesigned by Magnific\nwww.magnific.com", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + } + ] + }, + { + "type": "Button", + "name": "creditsBackButton", + "width": "match_parent", + "height": "match_parent", + "x": 0, + "y": 0, + "textures": { + "normal": "resources/transparent.png", + "hover": "resources/transparent.png", + "pressed": "resources/transparent.png" + } + } + ] + } +} diff --git a/resources/w/ui_en/screen_about_android.json b/resources/w/ui_en/screen_about_android.json index f56b04e..c929238 100644 --- a/resources/w/ui_en/screen_about_android.json +++ b/resources/w/ui_en/screen_about_android.json @@ -21,6 +21,19 @@ "horizontal_gravity": "center", "vertical_gravity": "center", "texture": "resources/w/ui_en/img/main/aboutPage003android.png" + }, + { + "type": "TextButton", + "name": "websiteButton", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "y": 200, + "width": 200, + "height": 60, + "text": "Shadow over Bishkek website", + "fontSize": 36, + "color": [0.55, 0.9, 1.0, 1.0], + "textCentered": true }, { "type": "TextButton", diff --git a/resources/w/ui_en/screen_credits.json b/resources/w/ui_en/screen_credits.json index 2b62265..025db23 100644 --- a/resources/w/ui_en/screen_credits.json +++ b/resources/w/ui_en/screen_credits.json @@ -28,9 +28,9 @@ "type": "move", "to": [ 0, - 2600 + 2800 ], - "duration": 30.0 + "duration": 33.0 } ] } @@ -333,12 +333,22 @@ "type": "TextView", "name": "creditsText28", "width": 300, - "height": 40, + "height": 160, "text": "Some art, 3D models\nand textures were created\nusing neural networks.", "fontSize": 32, "textCentered": false, "color": [1.0, 1.0, 1.0, 1.0] - } + }, + { + "type": "TextView", + "name": "creditsText29", + "width": 300, + "height": 40, + "text": "Some textures were\nDesigned by Magnific\nwww.magnific.com", + "fontSize": 32, + "textCentered": false, + "color": [1.0, 1.0, 1.0, 1.0] + } ] }, { diff --git a/resources/w/ui_en/screen_main_menu.json b/resources/w/ui_en/screen_main_menu.json index 7d33aa5..47d49a3 100644 --- a/resources/w/ui_en/screen_main_menu.json +++ b/resources/w/ui_en/screen_main_menu.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.1", + "text": "v. 1.0.2", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui_en/screen_main_menu_android.json b/resources/w/ui_en/screen_main_menu_android.json index b642b9c..05d74f9 100644 --- a/resources/w/ui_en/screen_main_menu_android.json +++ b/resources/w/ui_en/screen_main_menu_android.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.1", + "text": "v. 1.0.2", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/src/MenuManager.cpp b/src/MenuManager.cpp index 5eed02b..1bcb259 100644 --- a/src/MenuManager.cpp +++ b/src/MenuManager.cpp @@ -163,10 +163,11 @@ namespace FRG { #ifdef __ANDROID__ hudStep1Root = loadLocalizedUi("resources/w/ui/hud_step1android.json", zipFile); + hudStep2Root = loadLocalizedUi("resources/w/ui/hud_step2android.json", zipFile); #else hudStep1Root = loadLocalizedUi("resources/w/ui/hud_step1.json", zipFile); -#endif hudStep2Root = loadLocalizedUi("resources/w/ui/hud_step2.json", zipFile); +#endif #ifdef __ANDROID__ hudStep3Root = loadLocalizedUi("resources/w/ui/hud_step3android.json", zipFile); #else @@ -230,12 +231,12 @@ namespace FRG { mainMenuRoot = loadLocalizedUi("resources/w/ui/screen_main_menu_android.json", zipFile); aboutScreenRoot = loadLocalizedUi("resources/w/ui/screen_about_android.json", zipFile); #else - mainMenuRoot = loadLocalizedUi("resources/w/ui/screen_main_menu.json", zipFile); aboutScreenRoot = loadLocalizedUi("resources/w/ui/screen_about.json", zipFile); #endif + creditsScreenRoot = loadLocalizedUi("resources/w/ui/screen_credits.json", zipFile); - portraitCreditsScreenRoot = loadLocalizedUi("resources/w/ui/screen_credits_portrait.json", zipFile); + portraitCreditsScreenRoot = loadLocalizedUi("resources/w/ui/portrait_screen_credits.json", zipFile); settingsScreenRoot = loadLocalizedUi("resources/w/ui/screen_settings.json", zipFile); settingsGraphicsScreenRoot = loadLocalizedUi("resources/w/ui/screen_settings_graphics.json", zipFile); languageScreenRoot = loadLocalizedUi("resources/w/ui/screen_language.json", zipFile); @@ -493,6 +494,14 @@ namespace FRG { SDL_OpenURL("https://store.steampowered.com/app/4801010/"); }); + +#ifdef __ANDROID__ + uiManager.setTextButtonCallback("websiteButton", [this](const std::string&) { + audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg"); + SDL_OpenURL("https://shadowoverbishkek.com/"); + }); +#endif + uiManager.setTextButtonCallback("telegramButton", [this](const std::string&) { audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg"); SDL_OpenURL("https://telegram.me/fishrungames"); @@ -514,6 +523,23 @@ namespace FRG { { uiManager.pushMenuFromSavedRoot(creditsScreenRoot); } + + static std::string gameTitle; + +#ifdef __ANDROID__ + if (g_currentLanguage == Language::English) + { + gameTitle = "Shadow over Bishkek"; + } + else if (g_currentLanguage == Language::Russian) + { + gameTitle = u8"Тень над Бишкеком"; + } + + uiManager.setText("creditsTitleText", gameTitle); +#endif + + uiManager.setButtonCallback("creditsBackButton", [this](const std::string&) { isPlayerInCreditsMenu = false; uiManager.popMenu(); @@ -521,10 +547,11 @@ namespace FRG { audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg"); }); - + uiManager.updateAllLayouts(); uiManager.stopAnimationOnNode("creditsLinearLayout", "slowScroll"); uiManager.resetAnimationOnNode("creditsLinearLayout"); uiManager.startAnimationOnNode("creditsLinearLayout", "slowScroll"); + } void MenuManager::showSettingsScreen() { diff --git a/src/MenuManager.h b/src/MenuManager.h index 78ba100..f327ef1 100644 --- a/src/MenuManager.h +++ b/src/MenuManager.h @@ -324,7 +324,7 @@ namespace FRG { static constexpr float CHAT_FBO_OFFSET_DOWN_L = 70.0f; static constexpr float CHAT_FBO_WIDTH_P = 670.0f; - static constexpr float CHAT_FBO_OFFSET_UP_P = 356.0f; + static constexpr float CHAT_FBO_OFFSET_UP_P = 364.0f; static constexpr float CHAT_FBO_OFFSET_DOWN_P = 70.0f; std::unique_ptr chatFrameBuffer_;