diff --git a/Adventures in Lestoria/LevelCompleteWindow.cpp b/Adventures in Lestoria/LevelCompleteWindow.cpp index 7321c957..e7f77601 100644 --- a/Adventures in Lestoria/LevelCompleteWindow.cpp +++ b/Adventures in Lestoria/LevelCompleteWindow.cpp @@ -160,7 +160,10 @@ void Menu::InitializeLevelCompleteWindow(){ return ""; }}}, {game->KEY_SCROLL,{"View Items",[](MenuType type){}}}, - {game->KEY_START,{"Continue",[](MenuType type){ + {game->KEY_SELECT,{"Go to Overworld",[](MenuType type){ + Component(type,"Overworld Button")->Click(); + }}}, + {game->KEY_START,{"Go to Camp",[](MenuType type){ Component(type,"Next Button")->Click(); }}}, } @@ -211,7 +214,7 @@ void Menu::InitializeLevelCompleteWindow(){ } } DefaultBehavior{ //When nothing is found... - returnData="Next Button"; + returnData="Overworld Button"; } }, .down=[](MenuType type,Data&returnData){ @@ -263,7 +266,7 @@ void Menu::InitializeLevelCompleteWindow(){ } } DefaultBehavior{ //When nothing is found... - returnData="Next Button"; + returnData="Overworld Button"; } }, .left=[](MenuType type,Data&returnData){ @@ -299,11 +302,11 @@ void Menu::InitializeLevelCompleteWindow(){ DetectInventory(InventoryScrollableWindowComponent,type,"Monster Loot Window") { //This means we have to wrap around. We have access to itemsList if we needed to point to a specific item in the inventory. //By returning here, you are processing returnData yourself. Otherwise manipulate newRowIndex to point to an item in the itemsList when wrapping. - returnData="Next Button"; + returnData="Overworld Button"; return; } DefaultBehavior{ //When nothing is found... - returnData="Next Button"; + returnData="Overworld Button"; } }, .right=[](MenuType type,Data&returnData){ @@ -342,11 +345,11 @@ void Menu::InitializeLevelCompleteWindow(){ DetectInventory(InventoryScrollableWindowComponent,type,"Monster Loot Window") { //This means we have to wrap around. We have access to itemsList if we needed to point to a specific item in the inventory. //By returning here, you are processing returnData yourself. Otherwise manipulate newRowIndex to point to an item in the itemsList when wrapping. - returnData="Next Button"; + returnData="Overworld Button"; return; } DefaultBehavior{ //When nothing is found... - returnData="Next Button"; + returnData="Overworld Button"; } },}}, {"Stage Loot Window",{ @@ -533,7 +536,7 @@ void Menu::InitializeLevelCompleteWindow(){ returnData="Next Button"; } },}}, - {"Next Button",{ + {"Overworld Button",{ .up=[](MenuType type,Data&returnData){ auto monsterLoot=Component(type,"Monster Loot Window"); auto stageLoot=Component(type,"Stage Loot Window"); @@ -548,6 +551,42 @@ void Menu::InitializeLevelCompleteWindow(){ returnData="Next Button"; } }, + .down=[](MenuType type,Data&returnData){ + returnData="Next Button"; + }, + .left=[](MenuType type,Data&returnData){ + auto monsterLoot=Component(type,"Monster Loot Window"); + auto stageLoot=Component(type,"Stage Loot Window"); + if(monsterLoot->GetComponents().size()>0){ + int invWidth=monsterLoot->GetInventoryWidth(); + returnData=monsterLoot->GetComponents()[std::clamp(invWidth-1,0,int(monsterLoot->GetComponents().size()-1))]; + }else + if(stageLoot->GetComponents().size()>0){ + int invWidth=stageLoot->GetInventoryWidth(); + returnData=stageLoot->GetComponents()[std::clamp(invWidth-1,0,int(stageLoot->GetComponents().size()-1))]; + }else{ + returnData="Next Button"; + } + }, + .right=[](MenuType type,Data&returnData){ + auto monsterLoot=Component(type,"Monster Loot Window"); + auto stageLoot=Component(type,"Stage Loot Window"); + if(monsterLoot->GetComponents().size()>0){ + returnData=monsterLoot->GetComponents()[0]; + }else + if(stageLoot->GetComponents().size()>0){ + returnData=stageLoot->GetComponents()[0]; + }else{ + returnData="Next Button"; + } + },}}, + {"Next Button",{ + .up=[](MenuType type,Data&returnData){ + returnData="Overworld Button"; + }, + .down=[](MenuType type,Data&returnData){ + returnData="Overworld Button"; + }, .left=[](MenuType type,Data&returnData){ auto monsterLoot=Component(type,"Monster Loot Window"); auto stageLoot=Component(type,"Stage Loot Window"); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 868f521c..56d38bf4 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 4 #define VERSION_PATCH 4 -#define VERSION_BUILD 7887 +#define VERSION_BUILD 7889 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index ce6ce0a3..33df6b95 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ