From dda9f34277dd165c3a812510aef576376fcdbe8b Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Thu, 28 May 2026 14:43:05 +0300 Subject: [PATCH] Working on inventory --- resources/config2/items.json | 14 +- resources/w/ui/hud_step0.json | 1 + resources/w/ui/hud_step1.json | 46 +++- resources/w/ui/img/Close001_State=Default.png | 3 + .../w/ui/img/Close001_State=Selected.png | 3 + resources/w/ui/img/Close001_State=Tap.png | 3 + resources/w/ui/img/Inventory001.png | 3 + .../w/ui/img/inv/InventoryAllButton001.png | 3 + resources/w/ui/img/inv/ItemBook001.png | 3 + resources/w/ui/img/inv/ItemCoursework001.png | 3 + resources/w/ui/img/inv/ItemJournal001.png | 3 + resources/w/ui/img/inv/ItemKnife001.png | 3 + resources/w/ui/img/inv/ItemNote001.png | 3 + resources/w/ui/img/inv/ItemPhone001.png | 3 + resources/w/ui/img/inv/ItemReportCard001.png | 3 + resources/w/ui/img/inv/ItemSelBook001.png | 3 + .../w/ui/img/inv/ItemSelCoursework001.png | 3 + resources/w/ui/img/inv/ItemSelJournal001.png | 3 + resources/w/ui/img/inv/ItemSelKnife001.png | 3 + resources/w/ui/img/inv/ItemSelNote001.png | 3 + resources/w/ui/img/inv/ItemSelPhone001.png | 3 + .../w/ui/img/inv/ItemSelReportCard001.png | 3 + resources/w/ui/screen_inventory.json | 201 ++++++++++++++++++ src/MenuManager.cpp | 19 +- src/MenuManager.h | 1 + 25 files changed, 329 insertions(+), 10 deletions(-) create mode 100644 resources/w/ui/img/Close001_State=Default.png create mode 100644 resources/w/ui/img/Close001_State=Selected.png create mode 100644 resources/w/ui/img/Close001_State=Tap.png create mode 100644 resources/w/ui/img/Inventory001.png create mode 100644 resources/w/ui/img/inv/InventoryAllButton001.png create mode 100644 resources/w/ui/img/inv/ItemBook001.png create mode 100644 resources/w/ui/img/inv/ItemCoursework001.png create mode 100644 resources/w/ui/img/inv/ItemJournal001.png create mode 100644 resources/w/ui/img/inv/ItemKnife001.png create mode 100644 resources/w/ui/img/inv/ItemNote001.png create mode 100644 resources/w/ui/img/inv/ItemPhone001.png create mode 100644 resources/w/ui/img/inv/ItemReportCard001.png create mode 100644 resources/w/ui/img/inv/ItemSelBook001.png create mode 100644 resources/w/ui/img/inv/ItemSelCoursework001.png create mode 100644 resources/w/ui/img/inv/ItemSelJournal001.png create mode 100644 resources/w/ui/img/inv/ItemSelKnife001.png create mode 100644 resources/w/ui/img/inv/ItemSelNote001.png create mode 100644 resources/w/ui/img/inv/ItemSelPhone001.png create mode 100644 resources/w/ui/img/inv/ItemSelReportCard001.png create mode 100644 resources/w/ui/screen_inventory.json diff --git a/resources/config2/items.json b/resources/config2/items.json index f9e226f..49ee77b 100644 --- a/resources/config2/items.json +++ b/resources/config2/items.json @@ -4,43 +4,43 @@ "id": "phone", "name": "Телефон", "description": "Я не могу себе представить жизнь без своего телефона.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemPhone001.png" }, { "id": "journal", "name": "Журнал", "description": "Это мой журнал куда я вношу свои заметки.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemJournal001.png" }, { "id": "knife", "name": "Серебряный нож", "description": "Этот серебряный нож я одолжил у Айпери, и я должен его вернуть.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemKnife001.png" }, { "id": "book", "name": "Книга", "description": "Это книга о манасчи Жусупе Мамае.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemBook001.png" }, { "id": "note_spell", "name": "Записка", "description": "Тут написано \"Прочитай вслух когда настанет ночь, сквозь двери сможешь ты пройти.\" и текст заклинания.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemNote001.png" }, { "id": "report_card", "name": "Зачетка Бегимай", "description": "Это зачетная книжка Бегимай. Сюда нужно поставить оценку за курсовую работу.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemSelReportCard001.png" }, { "id": "coursework", "name": "Курсовая Бегимай", "description": "Это курсовая работа Бегимай, из-за которой она выбросилась из окна.", - "icon": "resources/fire2.png" + "icon": "resources/w/ui/img/inv/ItemCoursework001.png" } ] } diff --git a/resources/w/ui/hud_step0.json b/resources/w/ui/hud_step0.json index b4cff76..ca625b8 100644 --- a/resources/w/ui/hud_step0.json +++ b/resources/w/ui/hud_step0.json @@ -37,6 +37,7 @@ "name": "hint2", "width": 24, "height": 118, + "y" : 20, "horizontal_gravity": "center", "texture": "resources/w/ui/img/hint_arrow_down.png" } diff --git a/resources/w/ui/hud_step1.json b/resources/w/ui/hud_step1.json index 3890ef7..d5ef955 100644 --- a/resources/w/ui/hud_step1.json +++ b/resources/w/ui/hud_step1.json @@ -30,6 +30,50 @@ "fadeIn": { "durationMs": 600 } } ] - }] + }, + { + "type": "Button", + "name": "settingsButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -60, + "y": -60, + "width": 352, + "height": 352, + "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": "Button", + "name": "inventoryButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": 160, + "y": -48, + "width": 326, + "height": 326, + "clickZoneWidth": 151, + "clickZoneHeight": 151, + "textures": { + "normal": "resources/w/ui/img/Inventory001_State=Default001.png", + "hover": "resources/w/ui/img/Inventory001_State=Selected001.png", + "pressed": "resources/w/ui/img/Inventory001_State=Tap001.png" + } + }, + { + "type": "StaticImage", + "name": "location", + "width": 380, + "height": 64, + "y" : 30, + "horizontal_gravity": "center", + "vertical_align": "top", + "texture": "resources/w/ui/img/Location_dorm.png" + }] } } diff --git a/resources/w/ui/img/Close001_State=Default.png b/resources/w/ui/img/Close001_State=Default.png new file mode 100644 index 0000000..ebdd8db --- /dev/null +++ b/resources/w/ui/img/Close001_State=Default.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6460ad5b37a647a16041f0e13d99ba51cae53c867e70f4ee6b7e6ac24d0d3a2 +size 135218 diff --git a/resources/w/ui/img/Close001_State=Selected.png b/resources/w/ui/img/Close001_State=Selected.png new file mode 100644 index 0000000..e7c5736 --- /dev/null +++ b/resources/w/ui/img/Close001_State=Selected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec0bbead87818ae8eb46415b278504b23e6ccd123b19522b4a71227e05a305c9 +size 209422 diff --git a/resources/w/ui/img/Close001_State=Tap.png b/resources/w/ui/img/Close001_State=Tap.png new file mode 100644 index 0000000..707fc28 --- /dev/null +++ b/resources/w/ui/img/Close001_State=Tap.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82c1cb96cd18c232896f0193bd57bfded0cd0f8e5cc7fea3cfd6b931edb0c501 +size 113740 diff --git a/resources/w/ui/img/Inventory001.png b/resources/w/ui/img/Inventory001.png new file mode 100644 index 0000000..c2b1e02 --- /dev/null +++ b/resources/w/ui/img/Inventory001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f9354f6def01e5b9be74b4e7ec53287390eda92cd0130793b941f8e5e7bd7a0 +size 270815 diff --git a/resources/w/ui/img/inv/InventoryAllButton001.png b/resources/w/ui/img/inv/InventoryAllButton001.png new file mode 100644 index 0000000..eb4c700 --- /dev/null +++ b/resources/w/ui/img/inv/InventoryAllButton001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ede536ddc25bae16253ea7f71b97fca914cd337225702996e8b12e48b14dd6ef +size 119858 diff --git a/resources/w/ui/img/inv/ItemBook001.png b/resources/w/ui/img/inv/ItemBook001.png new file mode 100644 index 0000000..194926f --- /dev/null +++ b/resources/w/ui/img/inv/ItemBook001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f96f5901359a94cb6feb6568e983e2ba69f143ea9952a5d2561963b73e87a62e +size 94354 diff --git a/resources/w/ui/img/inv/ItemCoursework001.png b/resources/w/ui/img/inv/ItemCoursework001.png new file mode 100644 index 0000000..ab3c451 --- /dev/null +++ b/resources/w/ui/img/inv/ItemCoursework001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cc0a5c37f6a315aa9e11a4820147b7f14f30950b4b9b62d3fe8db2e3d135185 +size 68009 diff --git a/resources/w/ui/img/inv/ItemJournal001.png b/resources/w/ui/img/inv/ItemJournal001.png new file mode 100644 index 0000000..ea864fb --- /dev/null +++ b/resources/w/ui/img/inv/ItemJournal001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd4b52745f71106871f687a8d7f47567c202e6daf8e3e9eb2fe1ea7adca14b39 +size 115674 diff --git a/resources/w/ui/img/inv/ItemKnife001.png b/resources/w/ui/img/inv/ItemKnife001.png new file mode 100644 index 0000000..4fbe809 --- /dev/null +++ b/resources/w/ui/img/inv/ItemKnife001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40f179515fc48dd8be4573d4bcd9c145862047879969c5d11e91afd7f0aee73b +size 207684 diff --git a/resources/w/ui/img/inv/ItemNote001.png b/resources/w/ui/img/inv/ItemNote001.png new file mode 100644 index 0000000..64e012c --- /dev/null +++ b/resources/w/ui/img/inv/ItemNote001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51644f5574a065cc81b0968eeb5a4f7ed3b0d6610a0ed58cf8f4cf0abaa920be +size 145481 diff --git a/resources/w/ui/img/inv/ItemPhone001.png b/resources/w/ui/img/inv/ItemPhone001.png new file mode 100644 index 0000000..a9a332d --- /dev/null +++ b/resources/w/ui/img/inv/ItemPhone001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf94a593244aece4a28905a7e5cb35080e6aade35b5266b4fbe003a8927ce2d6 +size 163271 diff --git a/resources/w/ui/img/inv/ItemReportCard001.png b/resources/w/ui/img/inv/ItemReportCard001.png new file mode 100644 index 0000000..593150d --- /dev/null +++ b/resources/w/ui/img/inv/ItemReportCard001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3fbdb3fbd1399b335cb373204df516b4b72b3a80fa7a65b2df925a1f77a2f37 +size 97652 diff --git a/resources/w/ui/img/inv/ItemSelBook001.png b/resources/w/ui/img/inv/ItemSelBook001.png new file mode 100644 index 0000000..0d8447c --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelBook001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1953f588bd237ecc8db5e861d308d53a3fd7708f97180c89d8097778ce3970e0 +size 379365 diff --git a/resources/w/ui/img/inv/ItemSelCoursework001.png b/resources/w/ui/img/inv/ItemSelCoursework001.png new file mode 100644 index 0000000..c3e5777 --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelCoursework001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a819d712a506bf1bdb0a8e4b21a8ad06369ddf2900f30d0ccde1cfa2c0f6841 +size 359564 diff --git a/resources/w/ui/img/inv/ItemSelJournal001.png b/resources/w/ui/img/inv/ItemSelJournal001.png new file mode 100644 index 0000000..f39f658 --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelJournal001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9366465e099b8d0d12e91ce3c3abace0315fae58e2d8b0ac652644630c9d0789 +size 403311 diff --git a/resources/w/ui/img/inv/ItemSelKnife001.png b/resources/w/ui/img/inv/ItemSelKnife001.png new file mode 100644 index 0000000..00b3749 --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelKnife001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f394c2ba98205cf3e0bbf6026cb7964ac1888efdd3ab8e29a096a869d3ab7764 +size 507476 diff --git a/resources/w/ui/img/inv/ItemSelNote001.png b/resources/w/ui/img/inv/ItemSelNote001.png new file mode 100644 index 0000000..c14a651 --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelNote001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2a1e2f56ab7225758c2fdfc46b4b37bbab2c041b7186436e0e0ba0cd6b14d5b +size 430997 diff --git a/resources/w/ui/img/inv/ItemSelPhone001.png b/resources/w/ui/img/inv/ItemSelPhone001.png new file mode 100644 index 0000000..38e822e --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelPhone001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47bddd0afb49035efb62c462dcfa347684c61f07d10e2a296f26c47de729710d +size 471150 diff --git a/resources/w/ui/img/inv/ItemSelReportCard001.png b/resources/w/ui/img/inv/ItemSelReportCard001.png new file mode 100644 index 0000000..7b8d5ff --- /dev/null +++ b/resources/w/ui/img/inv/ItemSelReportCard001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47ab00999e68aa655f1ba879d488af05af59646220ad2fa186551c276fe170e7 +size 383366 diff --git a/resources/w/ui/screen_inventory.json b/resources/w/ui/screen_inventory.json new file mode 100644 index 0000000..ff96819 --- /dev/null +++ b/resources/w/ui/screen_inventory.json @@ -0,0 +1,201 @@ +{ + "root": { + "type": "FrameLayout", + "name": "hud_root", + "width": "match_parent", + "height": "match_parent", + "vertical_align": "center", + "horizontal_align": "center", + "children": [ + { + "type": "StaticImage", + "name": "background", + "width": 1266, + "height": 585, + "horizontal_gravity": "center", + "vertical_gravity": "center", + "texture": "resources/w/ui/img/Inventory001.png" + }, + { + "type": "StaticImage", + "name": "allItems", + "width": 110, + "height": 67, + "x" : -570, + "y" : 200, + "horizontal_gravity": "center", + "vertical_gravity": "center", + "texture": "resources/w/ui/img/inv/InventoryAllButton001.png" + }, + { + "type": "Button", + "name": "inventoryExitButton", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 90, + "height": 90, + "x" : 580, + "y" : 240, + "textures": { + "normal": "resources/w/ui/img/Close001_State=Default.png", + "hover": "resources/w/ui/img/Close001_State=Selected.png", + "pressed": "resources/w/ui/img/Close001_State=Tap.png" + } + }, + { + "type": "Button", + "name": "item1Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "x" : -580, + "y" : 90, + "textures": { + "normal": "resources/w/ui/img/inv/ItemSelPhone001.png", + "hover": "resources/w/ui/img/inv/ItemSelPhone001.png", + "pressed": "resources/w/ui/img/inv/ItemSelPhone001.png" + } + }, + { + "type": "Button", + "name": "item2Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "Button", + "name": "item3Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "Button", + "name": "item4Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "Button", + "name": "item5Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "Button", + "name": "item6Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "Button", + "name": "item7Button", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 137, + "height": 137, + "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" + } + }, + { + "type": "StaticImage", + "name": "selectedItemPic", + "width": 137, + "height": 137, + "x" : -260, + "y" : 90, + "horizontal_gravity": "center", + "vertical_gravity": "center", + "texture": "resources/w/ui/img/inv/ItemSelReportCard001.png" + }, + { + "type": "TextView", + "name": "selectedText", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "x" : 250, + "y" : 40, + "width": 900, + "height": 137, + "text": "Серебряный нож.", + "fontSize": 24, + "fontPath": "resources/fonts/DroidSans.ttf", + "centered": false, + "topAligned": true, + "wrap": true, + "paddingX": 0.0, + "paddingY": 0.0, + "color": [0.318, 0.635, 1.0, 1.0] + }, + { + "type": "TextView", + "name": "selectedDescription", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "x" : 150, + "y" : -100, + "width": 900, + "height": 137, + "text": "А все бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут бегут а мы идем.", + "fontSize": 24, + "fontPath": "resources/fonts/DroidSans.ttf", + "centered": false, + "topAligned": true, + "wrap": true, + "paddingX": 0.0, + "paddingY": 0.0, + "color": [1.0, 1.0, 1.0, 1.0] + } + ] + } +} \ No newline at end of file diff --git a/src/MenuManager.cpp b/src/MenuManager.cpp index b52beae..7c51e74 100644 --- a/src/MenuManager.cpp +++ b/src/MenuManager.cpp @@ -45,6 +45,7 @@ namespace ZL { phoneScreenRoot = loadUiFromFile("resources/w/ui/screen_phone.json", renderer, zipFile); journalScreenRoot= loadUiFromFile("resources/w/ui/screen_journal.json", renderer, zipFile); inventoryRoot = loadUiFromFile("resources/config2/ui_inventory.json", renderer, zipFile); + newInventoryRoot = loadUiFromFile("resources/w/ui/screen_inventory.json", renderer, zipFile); questJournalRoot = loadUiFromFile("resources/config2/ui_quest_journal.json", renderer, zipFile); questJournal.loadFromFile("resources/quests/quests.json", zipFile); @@ -55,18 +56,28 @@ namespace ZL { void MenuManager::enterGameplay() { state = GameState::Gameplay; uiManager.replaceRoot(hudRoot); - + /* uiManager.setTextButtonCallback("inventory_button", [this](const std::string&) { openInventory(); }); uiManager.setTextButtonCallback("quest_journal_button", [this](const std::string&) { openQuestJournal(); + });*/ + + uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { + openInventory(); }); + //openInventory() } void MenuManager::openInventory() { state = GameState::Inventory; + uiManager.pushMenuFromSavedRoot(newInventoryRoot); + uiManager.setButtonCallback("inventoryExitButton", [this](const std::string&) { + closeInventory(); + }); + /* uiManager.pushMenuFromSavedRoot(inventoryRoot); uiManager.setTextButtonCallback("close_inventory_button", [this](const std::string&) { @@ -84,7 +95,7 @@ namespace ZL { itemText += std::to_string(i + 1) + ". " + items[i].name + "\n"; } } - uiManager.setText("inventory_items_text", itemText); + uiManager.setText("inventory_items_text", itemText);*/ } void MenuManager::closeInventory() { @@ -209,6 +220,10 @@ namespace ZL { if (state == GameState::Gameplay && nextRoot) { uiManager.replaceRoot(nextRoot); + + uiManager.setButtonCallback("inventoryButton", [this](const std::string&) { + openInventory(); + }); } } diff --git a/src/MenuManager.h b/src/MenuManager.h index 826a6b6..2f9fa20 100644 --- a/src/MenuManager.h +++ b/src/MenuManager.h @@ -88,6 +88,7 @@ namespace ZL { std::shared_ptr phoneScreenRoot; std::shared_ptr journalScreenRoot; std::shared_ptr inventoryRoot; + std::shared_ptr newInventoryRoot; std::shared_ptr questJournalRoot; int selectedQuestIndex = -1;