|
|
|
@ -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<MenuComponent>(type,"Overworld Button")->Click(); |
|
|
|
|
}}}, |
|
|
|
|
{game->KEY_START,{"Go to Camp",[](MenuType type){ |
|
|
|
|
Component<MenuComponent>(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<InventoryScrollableWindowComponent>(type,"Monster Loot Window"); |
|
|
|
|
auto stageLoot=Component<InventoryScrollableWindowComponent>(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<InventoryScrollableWindowComponent>(type,"Monster Loot Window"); |
|
|
|
|
auto stageLoot=Component<InventoryScrollableWindowComponent>(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<InventoryScrollableWindowComponent>(type,"Monster Loot Window"); |
|
|
|
|
auto stageLoot=Component<InventoryScrollableWindowComponent>(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<InventoryScrollableWindowComponent>(type,"Monster Loot Window"); |
|
|
|
|
auto stageLoot=Component<InventoryScrollableWindowComponent>(type,"Stage Loot Window"); |
|
|
|
|