diff --git a/resources/w/ui/img/inv/ItemBook002.pdn b/resources/w/ui/img/inv/ItemBook002.pdn deleted file mode 100644 index 9ae5ed6..0000000 Binary files a/resources/w/ui/img/inv/ItemBook002.pdn and /dev/null differ diff --git a/resources/w/ui/img/inv/ItemCoursework002.pdn b/resources/w/ui/img/inv/ItemCoursework002.pdn deleted file mode 100644 index defde3c..0000000 Binary files a/resources/w/ui/img/inv/ItemCoursework002.pdn and /dev/null differ diff --git a/resources/w/ui/img/inv/ItemJournal002.pdn b/resources/w/ui/img/inv/ItemJournal002.pdn deleted file mode 100644 index d1aa059..0000000 Binary files a/resources/w/ui/img/inv/ItemJournal002.pdn and /dev/null differ diff --git a/resources/w/ui/img/inv/ItemKnife002.pdn b/resources/w/ui/img/inv/ItemKnife002.pdn deleted file mode 100644 index a3c5aa4..0000000 Binary files a/resources/w/ui/img/inv/ItemKnife002.pdn and /dev/null differ diff --git a/resources/w/ui/img/inv/ItemNote002.pdn b/resources/w/ui/img/inv/ItemNote002.pdn deleted file mode 100644 index 7a4c410..0000000 Binary files a/resources/w/ui/img/inv/ItemNote002.pdn and /dev/null differ diff --git a/resources/w/ui/img/inv/ItemReportCard002.pdn b/resources/w/ui/img/inv/ItemReportCard002.pdn deleted file mode 100644 index 95b8b37..0000000 Binary files a/resources/w/ui/img/inv/ItemReportCard002.pdn and /dev/null differ diff --git a/resources/w/ui/img/journal/PortraitQuestJournalItemBkg002.png b/resources/w/ui/img/journal/PortraitQuestJournalItemBkg002.png index 69056bc..80a3c26 100644 --- a/resources/w/ui/img/journal/PortraitQuestJournalItemBkg002.png +++ b/resources/w/ui/img/journal/PortraitQuestJournalItemBkg002.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8ce0d4a178a5ca96eaef1a874a8e02d8fc299093c4c1fa9317dab00665abc2 -size 635991 +oid sha256:daf193614b584b7ce16cefb54ed82b538801d457ec74eeee47302f3cf96b2182 +size 635792 diff --git a/resources/w/ui/portrait_screen_inventory.json b/resources/w/ui/portrait_screen_inventory.json index 15e7f0a..f519de2 100644 --- a/resources/w/ui/portrait_screen_inventory.json +++ b/resources/w/ui/portrait_screen_inventory.json @@ -188,7 +188,7 @@ "vertical_gravity": "top", "width": 274, "height": 274, - "x": -200, + "x": 200, "y": 650, "textures": { "normal": "resources/w/ui/img/inv/ItemBook002.png", diff --git a/resources/w/ui/portrait_screen_journal_item.json b/resources/w/ui/portrait_screen_journal_item.json index b87494d..e130be5 100644 --- a/resources/w/ui/portrait_screen_journal_item.json +++ b/resources/w/ui/portrait_screen_journal_item.json @@ -92,7 +92,7 @@ "vertical_align": "bottom", "name": "objective1nameLayout", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "x": 56, "y": 370, @@ -103,7 +103,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "paddingY": -20, - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "Цель 1 Цель 1 Цель 1 Цель 1", "fontSize": 32, @@ -139,7 +139,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "vertical_align": "bottom", - "width": 540.0, + "width": 510.0, "height": 80.0, "x": 56, "y": 450, @@ -150,7 +150,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "Цель 2", "fontSize": 32, @@ -187,7 +187,7 @@ "vertical_align": "bottom", "name": "objective3nameLayout", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "x": 56, "y": 530, @@ -197,7 +197,7 @@ "name": "objective3name", "horizontal_gravity": "center", "vertical_gravity": "top", - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "Цель 3", "fontSize": 32, @@ -218,7 +218,7 @@ "type": "TextView", "name": "quest_description", "x": 4.0, - "y": 480.0, + "y": 510.0, "width": 580.0, "height": 400.0, "horizontal_gravity": "center", diff --git a/resources/w/ui/screen_main_menu.json b/resources/w/ui/screen_main_menu.json index 3fbf1be..34293f8 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.2", + "text": "v. 1.0.3", "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 45a6d60..d13ee1f 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.2", + "text": "v. 1.0.3", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui_en/img/journal/PortraitQuestJournalItemBkg002.png b/resources/w/ui_en/img/journal/PortraitQuestJournalItemBkg002.png index 8648f00..70029f2 100644 --- a/resources/w/ui_en/img/journal/PortraitQuestJournalItemBkg002.png +++ b/resources/w/ui_en/img/journal/PortraitQuestJournalItemBkg002.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0356c42a5e1468dbde8d2da4db941266d253ec7a2249873121c78cebcb616c88 -size 628325 +oid sha256:cc372a9c98513675ab2db1185195a273cf0e364d50164e5de6e5f52f628b3eb2 +size 628234 diff --git a/resources/w/ui_en/portrait_screen_inventory.json b/resources/w/ui_en/portrait_screen_inventory.json index 0de48d7..9bf7ce7 100644 --- a/resources/w/ui_en/portrait_screen_inventory.json +++ b/resources/w/ui_en/portrait_screen_inventory.json @@ -188,7 +188,7 @@ "vertical_gravity": "top", "width": 274, "height": 274, - "x": -200, + "x": 200, "y": 650, "textures": { "normal": "resources/w/ui/img/inv/ItemBook002.png", diff --git a/resources/w/ui_en/portrait_screen_journal_item.json b/resources/w/ui_en/portrait_screen_journal_item.json index 4cffc33..7c1fe30 100644 --- a/resources/w/ui_en/portrait_screen_journal_item.json +++ b/resources/w/ui_en/portrait_screen_journal_item.json @@ -92,7 +92,7 @@ "vertical_align": "bottom", "name": "objective1nameLayout", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "x": 56, "y": 370, @@ -103,7 +103,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "paddingY": -20, - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "", "fontSize": 32, @@ -139,7 +139,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "vertical_align": "bottom", - "width": 540.0, + "width": 510.0, "height": 80.0, "x": 56, "y": 450, @@ -150,7 +150,7 @@ "horizontal_gravity": "center", "vertical_gravity": "top", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "", "fontSize": 32, @@ -187,7 +187,7 @@ "vertical_align": "bottom", "name": "objective3nameLayout", "paddingY": 0, - "width": 540.0, + "width": 510.0, "height": 60.0, "x": 56, "y": 530, @@ -197,7 +197,7 @@ "name": "objective3name", "horizontal_gravity": "center", "vertical_gravity": "top", - "width": 540.0, + "width": 510.0, "height": 60.0, "text": "", "fontSize": 32, @@ -218,7 +218,7 @@ "type": "TextView", "name": "quest_description", "x": 4.0, - "y": 480.0, + "y": 510.0, "width": 580.0, "height": 400.0, "horizontal_gravity": "center", diff --git a/resources/w/ui_en/screen_main_menu.json b/resources/w/ui_en/screen_main_menu.json index 47d49a3..1f33e53 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.2", + "text": "v. 1.0.3", "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 05d74f9..6181a14 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.2", + "text": "v. 1.0.3", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/src/MenuManager.cpp b/src/MenuManager.cpp index 1bcb259..c8a7e3a 100644 --- a/src/MenuManager.cpp +++ b/src/MenuManager.cpp @@ -903,9 +903,14 @@ namespace FRG { uiManager.setButtonCallback("inventoryMain", [this](const std::string&) {}); const auto& items = inventory->getItems(); + /*logger() << "Item count: " << items.size() << std::endl; + for (int x = 0; x < items.size(); x++) + { + std::cout << "item " << x << ": " << items[x].id << std::endl; + }*/ const int maxSlots = 9; for (int i = 0; i < maxSlots; ++i) { - const std::string btnName = "item" + std::to_string(i + 1) + "Button"; + std::string btnName = "item" + std::to_string(i + 1) + "Button"; if (i < static_cast(items.size())) { uiManager.setNodeVisible(btnName, true); auto btn = uiManager.findButton(btnName); @@ -913,8 +918,12 @@ namespace FRG { auto tex = renderer.textureManager.LoadFromPng(items[i].icon, CONST_ZIP_FILE, true); btn->texNormal = btn->texHover = btn->texPressed = tex; } + //logger() << "Set button ballback to button: " << btnName << std::endl; uiManager.setButtonCallback(btnName, [this, i](const std::string&) { + //logger() << "Callback called for button number " << i << std::endl; selectInventoryItem(i); + //logger() << "Callback called for button number " << i << " END" << std::endl; + audioPlayer_.playSoundAsync("audio/sound_bag001.ogg"); }); } else { diff --git a/src/UiManager.cpp b/src/UiManager.cpp index 9d9fd80..d204f86 100644 --- a/src/UiManager.cpp +++ b/src/UiManager.cpp @@ -1253,7 +1253,7 @@ namespace FRG { bool UiManager::setButtonCallback(const std::string& name, std::function cb) { auto b = findButton(name); if (!b) { - std::cerr << "UiManager: setButtonCallback failed, button not found: " << name << std::endl; + logger() << "UiManager: setButtonCallback failed, button not found: " << name << std::endl; return false; } b->onClick = std::move(cb); @@ -1850,11 +1850,13 @@ namespace FRG { for (auto it = allInteractives.rbegin(); it != allInteractives.rend(); ++it) { if (std::holds_alternative>(*it)) { auto& b = std::get>(*it); + //logger() << "onTouchDown found the button: " << b->name << std::endl; if (b->state != ButtonState::Disabled && b->getClickZoneRect().containsConsideringBorder((float)x, (float)y, b->border)) { b->state = ButtonState::Pressed; pressedButtons[fingerId] = b; if (b->onPress) b->onPress(b->name); + //logger() << "onTouchDown pressed the button: " << b->name << std::endl; break; } } else {