Fixing lots of UI bugs

This commit is contained in:
Vladislav Khorev 2026-07-10 21:30:59 +03:00
parent 8e745ce0cd
commit 79413e7319
33 changed files with 1740 additions and 1342 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@
"id": "study_project",
"title": "Эссе манасчи",
"status": "Hidden",
"description": "Преподавательница по манасоведению Аида Джаныбековна дала мне задачу - найти в библиотеке книгу про манасчи Жусупа Мамая, и написать по этой книге эссе. Книгу нельзя выносить из библиотеки, но можно воспользоваться стоящим в библиотеке компьютером, чтобы написать эссе.",
"description": "Преподавательница по манасоведению Аида Джаныбековна дала мне задачу - найти в библиотеке книгу про манасчи Жусупа Мамая, и написать по этой книге эссе. Книгу нельзя выносить из библиотеки, но можно воспользоваться стоящим в библиотеке компьютером, чтобы написать эссе. Эссе нужно успеть написать до завтра.",
"objectives": [
{ "id": "study_project_book", "text": "Найти книгу", "completed": false },
{ "id": "study_project_write", "text": "Написать эссе", "completed": false },

View File

@ -61,7 +61,7 @@
"id": "study_project",
"title": "Essay on Manaschi",
"status": "Hidden",
"description": "My Manas studies teacher, Aida Dzhanybekovna, gave me an assignment: find a book about Zhusup Mamai's Manaschi in the library and write an essay about it. The book isn't allowed out of the library, but I can use the library's computer to write the essay.",
"description": "My Manas studies teacher, Aida Dzhanybekovna, gave me an assignment: find a book about Zhusup Mamai's Manaschi in the library and write an essay about it. The book isn't allowed out of the library, but I can use the library's computer to write the essay. The essay must be completed before tomorrow.",
"objectives": [
{ "id": "study_project_book", "text": "Find the book", "completed": false },
{ "id": "study_project_write", "text": "Write the essay", "completed": false },

View File

@ -3246,7 +3246,8 @@
"speaker": "Аида Джаныбековна",
"portrait": "resources/dialogue/portrait_teacher.png",
"text": "Я освобождаю тебя от задания по эссе. И взамен я дам тебе другое задание. Если хочешь сдать модуль, тебе придется выполнить его.",
"next": "line_17"
"next": "line_17",
"questFail": "study_project"
},
{
"id": "line_17",
@ -3973,7 +3974,7 @@
"type": "Condition",
"conditions": [
{
"flag": "player_coursework_discussed",
"flag": "player_repord_card_discussed",
"op": "Equals",
"value": 1
}
@ -4105,6 +4106,10 @@
{
"flag": "player_repord_card_discussed",
"value": 1
},
{
"flag": "player_container_discussed",
"value": 1
}
],
"next": "line_77"
@ -4130,7 +4135,7 @@
"type": "SetFlag",
"effects": [
{
"flag": "player_coursework_discussed",
"flag": "player_container_discussed",
"value": 1
}
],

BIN
resources/loading.png (Stored with Git LFS)

Binary file not shown.

BIN
resources/loading_land003_en.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/loading_land003_ru.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/exterior/Wheel_base002.png (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

View File

@ -68,9 +68,9 @@
"x": 0,
"y": 250,
"textures": {
"normal": "resources/w/ui/img/inv/ItemJournal001.png",
"hover": "resources/w/ui/img/inv/ItemJournal001.png",
"pressed": "resources/w/ui/img/inv/ItemJournal001.png"
"normal": "resources/w/ui/img/inv/ItemJournal002.png",
"hover": "resources/w/ui/img/inv/ItemJournal002.png",
"pressed": "resources/w/ui/img/inv/ItemJournal002.png"
}
},
{
@ -83,9 +83,9 @@
"x": 200,
"y": 250,
"textures": {
"normal": "resources/w/ui/img/inv/ItemKnife001.png",
"hover": "resources/w/ui/img/inv/ItemKnife001.png",
"pressed": "resources/w/ui/img/inv/ItemKnife001.png"
"normal": "resources/w/ui/img/inv/ItemKnife002.png",
"hover": "resources/w/ui/img/inv/ItemKnife002.png",
"pressed": "resources/w/ui/img/inv/ItemKnife002.png"
}
},
{
@ -98,9 +98,9 @@
"x": -200,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemNote001.png",
"hover": "resources/w/ui/img/inv/ItemNote001.png",
"pressed": "resources/w/ui/img/inv/ItemNote001.png"
"normal": "resources/w/ui/img/inv/ItemNote002.png",
"hover": "resources/w/ui/img/inv/ItemNote002.png",
"pressed": "resources/w/ui/img/inv/ItemNote002.png"
}
},
{
@ -113,9 +113,9 @@
"x": 0,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemCoursework001.png",
"hover": "resources/w/ui/img/inv/ItemCoursework001.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework001.png"
"normal": "resources/w/ui/img/inv/ItemCoursework002.png",
"hover": "resources/w/ui/img/inv/ItemCoursework002.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework002.png"
}
},
{
@ -128,9 +128,9 @@
"x": 200,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemReportCard001.png",
"hover": "resources/w/ui/img/inv/ItemReportCard001.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard001.png"
"normal": "resources/w/ui/img/inv/ItemReportCard002.png",
"hover": "resources/w/ui/img/inv/ItemReportCard002.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard002.png"
}
},
{
@ -143,9 +143,9 @@
"x": -200,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -158,9 +158,9 @@
"x": 0,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -173,9 +173,9 @@
"x": -200,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
}
]

View File

@ -41,7 +41,7 @@
"y": 190,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"texture": "resources/w/ui/img/inv/ItemSelReportCard001.png"
"texture": "resources/w/ui/img/inv/ItemSelReportCard002.png"
},
{
"type": "TextView",

View File

@ -67,9 +67,9 @@
"x": -480,
"y": 90,
"textures": {
"normal": "resources/w/ui/img/inv/ItemJournal001.png",
"hover": "resources/w/ui/img/inv/ItemJournal001.png",
"pressed": "resources/w/ui/img/inv/ItemJournal001.png"
"normal": "resources/w/ui/img/inv/ItemJournal002.png",
"hover": "resources/w/ui/img/inv/ItemJournal002.png",
"pressed": "resources/w/ui/img/inv/ItemJournal002.png"
}
},
{
@ -82,9 +82,9 @@
"x": -380,
"y": 90,
"textures": {
"normal": "resources/w/ui/img/inv/ItemKnife001.png",
"hover": "resources/w/ui/img/inv/ItemKnife001.png",
"pressed": "resources/w/ui/img/inv/ItemKnife001.png"
"normal": "resources/w/ui/img/inv/ItemKnife002.png",
"hover": "resources/w/ui/img/inv/ItemKnife002.png",
"pressed": "resources/w/ui/img/inv/ItemKnife002.png"
}
},
{
@ -97,9 +97,9 @@
"x": -580,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemNote001.png",
"hover": "resources/w/ui/img/inv/ItemNote001.png",
"pressed": "resources/w/ui/img/inv/ItemNote001.png"
"normal": "resources/w/ui/img/inv/ItemNote002.png",
"hover": "resources/w/ui/img/inv/ItemNote002.png",
"pressed": "resources/w/ui/img/inv/ItemNote002.png"
}
},
{
@ -112,9 +112,9 @@
"x": -480,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemCoursework001.png",
"hover": "resources/w/ui/img/inv/ItemCoursework001.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework001.png"
"normal": "resources/w/ui/img/inv/ItemCoursework002.png",
"hover": "resources/w/ui/img/inv/ItemCoursework002.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework002.png"
}
},
{
@ -127,9 +127,9 @@
"x": -380,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemReportCard001.png",
"hover": "resources/w/ui/img/inv/ItemReportCard001.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard001.png"
"normal": "resources/w/ui/img/inv/ItemReportCard002.png",
"hover": "resources/w/ui/img/inv/ItemReportCard002.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard002.png"
}
},
{
@ -142,9 +142,9 @@
"x": -580,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -157,9 +157,9 @@
"x": -480,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -172,9 +172,9 @@
"x": -380,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -186,7 +186,7 @@
"y": 90,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/inv/ItemSelReportCard001.png"
"texture": "resources/w/ui/img/inv/ItemSelReportCard002.png"
},
{
"type": "TextView",
@ -197,7 +197,7 @@
"y": 40,
"width": 900,
"height": 137,
"text": "Серебряный нож.",
"text": "",
"fontSize": 24,
"fontPath": "resources/fonts/DroidSans.ttf",
"textCentered": false,
@ -221,7 +221,7 @@
"y": -100,
"width": 900,
"height": 137,
"text": "А все бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут а мы идем.",
"text": "",
"fontSize": 24,
"fontPath": "resources/fonts/DroidSans.ttf",
"textCentered": false,

View File

@ -394,7 +394,7 @@
"spacing": 10,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"x": 70,
"x": 67,
"y": 400,
"width": 800,
"height": 40,

View File

@ -7,9 +7,11 @@
{
"type": "StaticImage",
"name": "languageBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",

View File

@ -7,65 +7,71 @@
{
"type": "StaticImage",
"name": "loadBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
"orientation": "vertical",
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"width": "match_parent",
"height": "match_parent",
"children": [
{
"type": "TextView",
"name": "loadTitle",
"width": 300,
"height": 70,
"text": "Выберите сохраненную игру:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot1Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot2Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot3Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot4Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
}
]
{
"type": "TextView",
"name": "loadTitle",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 200,
"width": 300,
"height": 70,
"text": "Выберите сохраненную игру:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot1Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 130,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot2Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 60,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot3Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -10,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot4Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -80,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",

View File

@ -7,8 +7,10 @@
{
"type": "StaticImage",
"name": "mainMenuBkg",
"width": 2186,
"height": 1536,
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
@ -24,9 +26,10 @@
"type": "StaticImage",
"name": "mainMenuUnderLetterBkg",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"width": 450,
"height": "match_parent",
"texture": "resources/w/ui/img/main/under_letters001.png"
"height": 900,
"texture": "resources/w/ui/img/main/under_letters002.png"
},
{
"type": "StaticImage",
@ -44,7 +47,7 @@
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"y": 120,
"y": 150,
"width": "match_parent",
"height": "match_parent",
"children": [
@ -52,7 +55,7 @@
"type": "TextButton",
"name": "menuStartButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Начать игру",
"fontSize": 48,
"textCentered": true
@ -61,7 +64,7 @@
"type": "TextButton",
"name": "menuLoadButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Загрузить игру",
"fontSize": 48,
"textCentered": true
@ -70,7 +73,7 @@
"type": "TextButton",
"name": "menuSettingsButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Настройки",
"fontSize": 48,
"textCentered": true
@ -79,7 +82,7 @@
"type": "TextButton",
"name": "menuLanguageButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Язык / Language",
"fontSize": 48,
"textCentered": true
@ -88,7 +91,7 @@
"type": "TextButton",
"name": "menuAboutButton",
"width": 300,
"height": 70,
"height": 50,
"text": "О нас",
"fontSize": 48,
"textCentered": true
@ -97,7 +100,7 @@
"type": "TextButton",
"name": "menuExitButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Выход",
"fontSize": 48,
"textCentered": true

View File

@ -7,65 +7,71 @@
{
"type": "StaticImage",
"name": "saveBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
"orientation": "vertical",
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"width": "match_parent",
"height": "match_parent",
"children": [
{
"type": "TextView",
"name": "saveTitle",
"width": 300,
"height": 70,
"text": "Выберите слот для сохранения:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot1Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot2Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot3Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot4Button",
"width": 600,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
}
]
{
"type": "TextView",
"name": "saveTitle",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 200,
"width": 300,
"height": 70,
"text": "Выберите слот для сохранения:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot1Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 130,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot2Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 60,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot3Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -10,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot4Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -80,
"width": 400,
"height": 70,
"text": "(пусто)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",

View File

@ -7,9 +7,11 @@
{
"type": "StaticImage",
"name": "settingsBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
@ -52,8 +54,8 @@
"value": 0.78125,
"interactive": true,
"textures": {
"track": "resources/w/red.png",
"knob": "resources/w/blue.png"
"track": "resources/loadingProgressBarFrame.png",
"knob": "resources/loadingProgressBar.png"
}
},
{
@ -77,8 +79,8 @@
"value": 0.625,
"interactive": true,
"textures": {
"track": "resources/w/red.png",
"knob": "resources/w/blue.png"
"track": "resources/loadingProgressBarFrame.png",
"knob": "resources/loadingProgressBar.png"
}
},
{
@ -89,7 +91,7 @@
"text": "Музыка: ВКЛ",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
},
{
"type": "TextButton",
@ -99,7 +101,7 @@
"text": "Звук: ВКЛ",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
},
{
"type": "TextButton",
@ -109,7 +111,7 @@
"text": "Полноэкранный режим: ВЫКЛ",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
}
]
},

View File

@ -68,9 +68,9 @@
"x": 0,
"y": 250,
"textures": {
"normal": "resources/w/ui/img/inv/ItemJournal001.png",
"hover": "resources/w/ui/img/inv/ItemJournal001.png",
"pressed": "resources/w/ui/img/inv/ItemJournal001.png"
"normal": "resources/w/ui/img/inv/ItemJournal002.png",
"hover": "resources/w/ui/img/inv/ItemJournal002.png",
"pressed": "resources/w/ui/img/inv/ItemJournal002.png"
}
},
{
@ -83,9 +83,9 @@
"x": 200,
"y": 250,
"textures": {
"normal": "resources/w/ui/img/inv/ItemKnife001.png",
"hover": "resources/w/ui/img/inv/ItemKnife001.png",
"pressed": "resources/w/ui/img/inv/ItemKnife001.png"
"normal": "resources/w/ui/img/inv/ItemKnife002.png",
"hover": "resources/w/ui/img/inv/ItemKnife002.png",
"pressed": "resources/w/ui/img/inv/ItemKnife002.png"
}
},
{
@ -98,9 +98,9 @@
"x": -200,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemNote001.png",
"hover": "resources/w/ui/img/inv/ItemNote001.png",
"pressed": "resources/w/ui/img/inv/ItemNote001.png"
"normal": "resources/w/ui/img/inv/ItemNote002.png",
"hover": "resources/w/ui/img/inv/ItemNote002.png",
"pressed": "resources/w/ui/img/inv/ItemNote002.png"
}
},
{
@ -113,9 +113,9 @@
"x": 0,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemCoursework001.png",
"hover": "resources/w/ui/img/inv/ItemCoursework001.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework001.png"
"normal": "resources/w/ui/img/inv/ItemCoursework002.png",
"hover": "resources/w/ui/img/inv/ItemCoursework002.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework002.png"
}
},
{
@ -128,9 +128,9 @@
"x": 200,
"y": 450,
"textures": {
"normal": "resources/w/ui/img/inv/ItemReportCard001.png",
"hover": "resources/w/ui/img/inv/ItemReportCard001.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard001.png"
"normal": "resources/w/ui/img/inv/ItemReportCard002.png",
"hover": "resources/w/ui/img/inv/ItemReportCard002.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard002.png"
}
},
{
@ -143,9 +143,9 @@
"x": -200,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -158,9 +158,9 @@
"x": 0,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -173,9 +173,9 @@
"x": -200,
"y": 650,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
}
]

View File

@ -41,7 +41,7 @@
"y": 190,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"texture": "resources/w/ui/img/inv/ItemSelReportCard001.png"
"texture": "resources/w/ui/img/inv/ItemSelReportCard002.png"
},
{
"type": "TextView",

View File

@ -67,9 +67,9 @@
"x": -480,
"y": 90,
"textures": {
"normal": "resources/w/ui/img/inv/ItemJournal001.png",
"hover": "resources/w/ui/img/inv/ItemJournal001.png",
"pressed": "resources/w/ui/img/inv/ItemJournal001.png"
"normal": "resources/w/ui/img/inv/ItemJournal002.png",
"hover": "resources/w/ui/img/inv/ItemJournal002.png",
"pressed": "resources/w/ui/img/inv/ItemJournal002.png"
}
},
{
@ -82,9 +82,9 @@
"x": -380,
"y": 90,
"textures": {
"normal": "resources/w/ui/img/inv/ItemKnife001.png",
"hover": "resources/w/ui/img/inv/ItemKnife001.png",
"pressed": "resources/w/ui/img/inv/ItemKnife001.png"
"normal": "resources/w/ui/img/inv/ItemKnife002.png",
"hover": "resources/w/ui/img/inv/ItemKnife002.png",
"pressed": "resources/w/ui/img/inv/ItemKnife002.png"
}
},
{
@ -97,9 +97,9 @@
"x": -580,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemNote001.png",
"hover": "resources/w/ui/img/inv/ItemNote001.png",
"pressed": "resources/w/ui/img/inv/ItemNote001.png"
"normal": "resources/w/ui/img/inv/ItemNote002.png",
"hover": "resources/w/ui/img/inv/ItemNote002.png",
"pressed": "resources/w/ui/img/inv/ItemNote002.png"
}
},
{
@ -112,9 +112,9 @@
"x": -480,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemCoursework001.png",
"hover": "resources/w/ui/img/inv/ItemCoursework001.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework001.png"
"normal": "resources/w/ui/img/inv/ItemCoursework002.png",
"hover": "resources/w/ui/img/inv/ItemCoursework002.png",
"pressed": "resources/w/ui/img/inv/ItemCoursework002.png"
}
},
{
@ -127,9 +127,9 @@
"x": -380,
"y": -10,
"textures": {
"normal": "resources/w/ui/img/inv/ItemReportCard001.png",
"hover": "resources/w/ui/img/inv/ItemReportCard001.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard001.png"
"normal": "resources/w/ui/img/inv/ItemReportCard002.png",
"hover": "resources/w/ui/img/inv/ItemReportCard002.png",
"pressed": "resources/w/ui/img/inv/ItemReportCard002.png"
}
},
{
@ -142,9 +142,9 @@
"x": -580,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -157,9 +157,9 @@
"x": -480,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -172,9 +172,9 @@
"x": -380,
"y": -110,
"textures": {
"normal": "resources/w/ui/img/inv/ItemBook001.png",
"hover": "resources/w/ui/img/inv/ItemBook001.png",
"pressed": "resources/w/ui/img/inv/ItemBook001.png"
"normal": "resources/w/ui/img/inv/ItemBook002.png",
"hover": "resources/w/ui/img/inv/ItemBook002.png",
"pressed": "resources/w/ui/img/inv/ItemBook002.png"
}
},
{
@ -186,7 +186,7 @@
"y": 90,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/inv/ItemSelReportCard001.png"
"texture": "resources/w/ui/img/inv/ItemSelReportCard002.png"
},
{
"type": "TextView",

View File

@ -394,7 +394,7 @@
"spacing": 10,
"horizontal_gravity": "center",
"vertical_gravity": "top",
"x": 70,
"x": 67,
"y": 400,
"width": 800,
"height": 40,

View File

@ -7,9 +7,11 @@
{
"type": "StaticImage",
"name": "languageBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",

View File

@ -7,65 +7,71 @@
{
"type": "StaticImage",
"name": "loadBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
"orientation": "vertical",
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"width": "match_parent",
"height": "match_parent",
"children": [
{
"type": "TextView",
"name": "loadTitle",
"width": 300,
"height": 70,
"text": "Select a saved game:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot1Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot2Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot3Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot4Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
}
]
{
"type": "TextView",
"name": "loadTitle",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 200,
"width": 300,
"height": 70,
"text": "Select a saved game:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot1Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 130,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot2Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 60,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot3Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -10,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "loadSlot4Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -80,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",

View File

@ -7,8 +7,10 @@
{
"type": "StaticImage",
"name": "mainMenuBkg",
"width": 2186,
"height": 1536,
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
@ -24,9 +26,10 @@
"type": "StaticImage",
"name": "mainMenuUnderLetterBkg",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"width": 450,
"height": "match_parent",
"texture": "resources/w/ui/img/main/under_letters001.png"
"height": 900,
"texture": "resources/w/ui/img/main/under_letters002.png"
},
{
"type": "StaticImage",
@ -44,7 +47,7 @@
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"y": 120,
"y": 150,
"width": "match_parent",
"height": "match_parent",
"children": [
@ -52,7 +55,7 @@
"type": "TextButton",
"name": "menuStartButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Start Game",
"fontSize": 48,
"textCentered": true
@ -61,7 +64,7 @@
"type": "TextButton",
"name": "menuLoadButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Load Game",
"fontSize": 48,
"textCentered": true
@ -70,7 +73,7 @@
"type": "TextButton",
"name": "menuSettingsButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Settings",
"fontSize": 48,
"textCentered": true
@ -79,7 +82,7 @@
"type": "TextButton",
"name": "menuLanguageButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Язык / Language",
"fontSize": 48,
"textCentered": true
@ -88,7 +91,7 @@
"type": "TextButton",
"name": "menuAboutButton",
"width": 300,
"height": 70,
"height": 50,
"text": "About Us",
"fontSize": 48,
"textCentered": true
@ -97,7 +100,7 @@
"type": "TextButton",
"name": "menuExitButton",
"width": 300,
"height": 60,
"height": 50,
"text": "Exit",
"fontSize": 48,
"textCentered": true

View File

@ -7,65 +7,71 @@
{
"type": "StaticImage",
"name": "saveBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
"orientation": "vertical",
"horizontal_align": "center",
"vertical_align": "center",
"spacing": 24,
"width": "match_parent",
"height": "match_parent",
"children": [
{
"type": "TextView",
"name": "saveTitle",
"width": 300,
"height": 70,
"text": "Select a save slot:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot1Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot2Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot3Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot4Button",
"width": 600,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
}
]
{
"type": "TextView",
"name": "saveTitle",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 200,
"width": 300,
"height": 70,
"text": "Select a save slot:",
"fontSize": 48,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot1Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 130,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot2Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": 60,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot3Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -10,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
"name": "saveSlot4Button",
"horizontal_gravity": "center",
"vertical_gravity": "center",
"y": -80,
"width": 400,
"height": 70,
"text": "(empty)",
"fontSize": 24,
"textCentered": true
},
{
"type": "TextButton",
@ -82,3 +88,4 @@
]
}
}

View File

@ -7,9 +7,11 @@
{
"type": "StaticImage",
"name": "settingsBkg",
"width": "match_parent",
"height": "match_parent",
"texture": "resources/w/ui/img/main/bkg.png"
"width": 2992,
"height": 1632,
"horizontal_gravity": "center",
"vertical_gravity": "center",
"texture": "resources/w/ui/img/main/MenuBkg001_v001.png"
},
{
"type": "LinearLayout",
@ -36,7 +38,7 @@
"name": "musicVolumeText",
"width": 500,
"height": 40,
"text": "Music volume: 100",
"text": "",
"fontSize": 32,
"textCentered": false,
"topAligned": true,
@ -52,8 +54,8 @@
"value": 0.78125,
"interactive": true,
"textures": {
"track": "resources/w/red.png",
"knob": "resources/w/blue.png"
"track": "resources/loadingProgressBarFrame.png",
"knob": "resources/loadingProgressBar.png"
}
},
{
@ -61,7 +63,7 @@
"name": "soundVolumeText",
"width": 500,
"height": 40,
"text": "Sound volume: 80",
"text": "",
"fontSize": 32,
"textCentered": false,
"topAligned": true,
@ -77,8 +79,8 @@
"value": 0.625,
"interactive": true,
"textures": {
"track": "resources/w/red.png",
"knob": "resources/w/blue.png"
"track": "resources/loadingProgressBarFrame.png",
"knob": "resources/loadingProgressBar.png"
}
},
{
@ -86,30 +88,30 @@
"name": "musicToggleButton",
"width": 500,
"height": 40,
"text": "Music: ON",
"text": "",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
},
{
"type": "TextButton",
"name": "soundToggleButton",
"width": 500,
"height": 40,
"text": "Sound: ON",
"text": "",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
},
{
"type": "TextButton",
"name": "fullScreenToggleButton",
"width": 500,
"height": 60,
"text": "Full screen: OFF",
"text": "",
"fontSize": 32,
"textCentered": true,
"color": [0.2, 0.9, 0.2, 1.0]
"color": [1.0, 1.0, 1.0, 1.0]
}
]
},

View File

@ -823,7 +823,26 @@ namespace ZL
renderer.PushMatrix();
renderer.LoadIdentity();
glBindTexture(GL_TEXTURE_2D, loadingTexture->getTexID());
if (showLoadingProgressBar == false) // Loading language screen
{
if (ZL::g_currentLanguage == ZL::Language::English)
{
glBindTexture(GL_TEXTURE_2D, menuManager.languageLoadingEn->getTexID());
}
else if (ZL::g_currentLanguage == ZL::Language::Russian)
{
glBindTexture(GL_TEXTURE_2D, menuManager.languageLoadingRu->getTexID());
}
else
{
glBindTexture(GL_TEXTURE_2D, loadingTexture->getTexID());
}
}
else
{
glBindTexture(GL_TEXTURE_2D, loadingTexture->getTexID());
}
renderer.DrawVertexRenderStruct(loadingMesh);
renderer.PopMatrix();

View File

@ -12,6 +12,10 @@
namespace ZL {
static const std::string EMPTY_LANGUAGE_RU = "(пусто)";
static const std::string EMPTY_LANGUAGE_EN = "(empty)";
static int questStatusPriority(Quest::QuestStatus status) {
switch (status) {
case Quest::QuestStatus::Available: return 0;
@ -234,6 +238,9 @@ namespace ZL {
toastTextureItemAdded = loadLocalizedTexture("resources/w/ui/img/toast/item_received001.png", zipFile);
toastTextureItemRemoved = loadLocalizedTexture("resources/w/ui/img/toast/item_removed001.png", zipFile);
languageLoadingRu = renderer.textureManager.LoadFromPng("resources/loading_land003_ru.png", zipFile);
languageLoadingEn = renderer.textureManager.LoadFromPng("resources/loading_land003_en.png", zipFile);
gameState_.questJournal.onQuestUnlocked = [this](const std::string& id) {
const Quest::QuestState* q = gameState_.questJournal.findQuest(id);
if (q) showToast(toastTextureQuestNew, q->definition.title);
@ -393,16 +400,6 @@ namespace ZL {
uiManager.setSliderValue("musicVolumeSlider", musicFrac);
uiManager.setSliderValue("soundVolumeSlider", soundFrac);
static std::string musicVolumePrefix = "Громкость музыки: ";
static std::string soundVolumePrefix = "Громкость звука: ";
static std::string musicToggleOn = "Музыка: ВКЛ";
static std::string musicToggleOff = "Музыка: ВЫКЛ";
static std::string soundToggleOn = "Звук: ВКЛ";
static std::string soundToggleOff = "Звук: ВЫКЛ";
static std::string fullScreenToggleOn = "Полноэкранный режим: ВКЛ";
static std::string fullScreenToggleOff = "Полноэкранный режим: ВЫКЛ";
if (g_currentLanguage == Language::English)
{
musicVolumePrefix = "Music volume: ";
@ -414,6 +411,17 @@ namespace ZL {
fullScreenToggleOn = "Full Screen: ON";
fullScreenToggleOff = "Full Screen: OFF";
}
else if (g_currentLanguage == Language::Russian)
{
musicVolumePrefix = "Громкость музыки: ";
soundVolumePrefix = "Громкость звука: ";
musicToggleOn = "Музыка: ВКЛ";
musicToggleOff = "Музыка: ВЫКЛ";
soundToggleOn = "Звук: ВКЛ";
soundToggleOff = "Звук: ВЫКЛ";
fullScreenToggleOn = "Полноэкранный режим: ВКЛ";
fullScreenToggleOff = "Полноэкранный режим: ВЫКЛ";
}
uiManager.setText("musicVolumeText",
musicVolumePrefix + std::to_string(audioPlayer_.getMusicVolume()));
@ -439,23 +447,23 @@ namespace ZL {
auto refreshMusicToggle = [this]() {
const bool on = audioPlayer_.isMusicEnabled();
uiManager.setTextButtonText("musicToggleButton", on ? musicToggleOn : musicToggleOff);
uiManager.setTextButtonColor("musicToggleButton", on
/*uiManager.setTextButtonColor("musicToggleButton", on
? std::array<float, 4>{ 0.2f, 0.9f, 0.2f, 1.0f }
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });*/
};
auto refreshSoundToggle = [this]() {
const bool on = audioPlayer_.isSoundEnabled();
uiManager.setTextButtonText("soundToggleButton", on ? soundToggleOn : soundToggleOff);
uiManager.setTextButtonColor("soundToggleButton", on
/*uiManager.setTextButtonColor("soundToggleButton", on
? std::array<float, 4>{ 0.2f, 0.9f, 0.2f, 1.0f }
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });*/
};
auto refreshFullscreenToggle = [this]() {
const bool on = Environment::isFullscreen;
uiManager.setTextButtonText("fullScreenToggleButton", on ? fullScreenToggleOn : fullScreenToggleOff);
uiManager.setTextButtonColor("fullScreenToggleButton", on
/*uiManager.setTextButtonColor("fullScreenToggleButton", on
? std::array<float, 4>{ 0.2f, 0.9f, 0.2f, 1.0f }
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });*/
};
refreshMusicToggle();
@ -466,18 +474,18 @@ namespace ZL {
audioPlayer_.setMusicEnabled(!audioPlayer_.isMusicEnabled());
const bool on = audioPlayer_.isMusicEnabled();
uiManager.setTextButtonText("musicToggleButton", on ? musicToggleOn : musicToggleOff);
uiManager.setTextButtonColor("musicToggleButton", on
/*uiManager.setTextButtonColor("musicToggleButton", on
? std::array<float, 4>{ 0.2f, 0.9f, 0.2f, 1.0f }
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });*/
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
});
uiManager.setTextButtonCallback("soundToggleButton", [this](const std::string&) {
audioPlayer_.setSoundEnabled(!audioPlayer_.isSoundEnabled());
const bool on = audioPlayer_.isSoundEnabled();
uiManager.setTextButtonText("soundToggleButton", on ? soundToggleOn : soundToggleOff);
uiManager.setTextButtonColor("soundToggleButton", on
/*uiManager.setTextButtonColor("soundToggleButton", on
? std::array<float, 4>{ 0.2f, 0.9f, 0.2f, 1.0f }
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });
: std::array<float, 4>{ 0.9f, 0.2f, 0.2f, 1.0f });*/
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
});
uiManager.setTextButtonCallback("fullScreenToggleButton", [this, refreshFullscreenToggle](const std::string&) {
@ -575,9 +583,20 @@ namespace ZL {
int slot = i + 1;
if (getSlotInfoFunc) {
SaveSlotInfo info = getSlotInfoFunc(slot);
std::string emptyText;
if (ZL::g_currentLanguage == ZL::Language::Russian)
{
emptyText = EMPTY_LANGUAGE_RU;
}
else if (ZL::g_currentLanguage == ZL::Language::English)
{
emptyText = EMPTY_LANGUAGE_EN;
}
std::string label = info.empty
? "Empty"
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + "\n" + info.savedAt;
? emptyText
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + " " + info.savedAt;
uiManager.setTextButtonText(kSlotButtons[i], label);
}
uiManager.setTextButtonCallback(kSlotButtons[i], [this, slot](const std::string&) {
@ -605,18 +624,40 @@ namespace ZL {
const char* buttonName = kSlotButtons[i];
if (getSlotInfoFunc) {
SaveSlotInfo info = getSlotInfoFunc(slot);
std::string emptyText;
if (ZL::g_currentLanguage == ZL::Language::Russian)
{
emptyText = EMPTY_LANGUAGE_RU;
}
else if (ZL::g_currentLanguage == ZL::Language::English)
{
emptyText = EMPTY_LANGUAGE_EN;
}
std::string label = info.empty
? "Empty"
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + "\n" + info.savedAt;
? emptyText
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + " " + info.savedAt;
uiManager.setTextButtonText(buttonName, label);
}
uiManager.setTextButtonCallback(buttonName, [this, slot, buttonName](const std::string&) {
if (onSaveGame) onSaveGame(slot);
if (getSlotInfoFunc) {
SaveSlotInfo info = getSlotInfoFunc(slot);
std::string emptyText;
if (ZL::g_currentLanguage == ZL::Language::Russian)
{
emptyText = EMPTY_LANGUAGE_RU;
}
else if (ZL::g_currentLanguage == ZL::Language::English)
{
emptyText = EMPTY_LANGUAGE_EN;
}
std::string label = info.empty
? "Empty"
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + "\n" + info.savedAt;
? emptyText
: localizedLocationName[info.locationName][ZL::g_currentLanguage] + " " + info.savedAt;
uiManager.setTextButtonText(buttonName, label);
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
}

View File

@ -123,6 +123,9 @@ namespace ZL {
std::shared_ptr<Texture> toastTextureItemAdded;
std::shared_ptr<Texture> toastTextureItemRemoved;
std::shared_ptr<Texture> languageLoadingRu;
std::shared_ptr<Texture> languageLoadingEn;
protected:
Renderer& renderer;
@ -316,6 +319,15 @@ namespace ZL {
float chatFboQuadLastProjH_ = -1.0f;
bool chatFboQuadLastPortrait_ = false;
std::string musicVolumePrefix;
std::string soundVolumePrefix;
std::string musicToggleOn;
std::string musicToggleOff;
std::string soundToggleOn;
std::string soundToggleOff;
std::string fullScreenToggleOn;
std::string fullScreenToggleOff;
};
} // namespace ZL

View File

@ -50,19 +50,27 @@ bool TextRenderer::init(Renderer& renderer, const std::string& ttfPath, int pixe
r = &renderer;
static bool shaderAlreadyAdded = false;
if (shaderAlreadyAdded == false)
{
shaderAlreadyAdded = true;
#ifdef EMSCRIPTEN
r->shaderManager.AddShaderFromFiles(shaderName,
"resources/shaders/text2d.vertex",
"resources/shaders/text2d_web.fragment",
zipfilename
);
r->shaderManager.AddShaderFromFiles(shaderName,
"resources/shaders/text2d.vertex",
"resources/shaders/text2d_web.fragment",
zipfilename
);
#else
r->shaderManager.AddShaderFromFiles(shaderName,
"resources/shaders/text2d.vertex",
"resources/shaders/text2d_desktop.fragment",
zipfilename
);
r->shaderManager.AddShaderFromFiles(shaderName,
"resources/shaders/text2d.vertex",
"resources/shaders/text2d_desktop.fragment",
zipfilename
);
#endif
}
ZL::CheckGlError(__FILE__, __LINE__);
if (!loadGlyphs(ttfPath, pixelSize, zipfilename)) return false;
ZL::CheckGlError(__FILE__, __LINE__);