|
|
|
@ -172,7 +172,10 @@ void Menu::InitializeArtificerEnchantWindow(){ |
|
|
|
|
|
|
|
|
|
artificerEnchantWindow->SetupKeyboardNavigation( |
|
|
|
|
[](MenuType type,Data&returnData){ //On Open
|
|
|
|
|
returnData=""; |
|
|
|
|
auto&items{Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents()}; |
|
|
|
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName(); |
|
|
|
|
else if(items.size()>0)returnData=items[0]; |
|
|
|
|
else returnData="Back"; |
|
|
|
|
}, |
|
|
|
|
{ //Button Key
|
|
|
|
|
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}}, |
|
|
|
@ -180,12 +183,54 @@ void Menu::InitializeArtificerEnchantWindow(){ |
|
|
|
|
Menu::CloseMenu(); |
|
|
|
|
}}}, |
|
|
|
|
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, |
|
|
|
|
{{game->KEY_SHOULDER2,Pressed},{"Scroll Up/Down",[](MenuType type){}}}, |
|
|
|
|
{{game->KEY_SHOULDER,Pressed},{"Scroll Up/Down",[](MenuType type){}}}, |
|
|
|
|
{{game->KEY_FASTSCROLLUP,PressedDAS},{"Scroll",[](MenuType type){ |
|
|
|
|
Menu::menus[type]->GetSelection().lock()->parentComponent.lock()->DecreaseSelectionIndex(3.f); |
|
|
|
|
}}}, |
|
|
|
|
{{game->KEY_FASTSCROLLDOWN,PressedDAS},{"Scroll",[](MenuType type){ |
|
|
|
|
Menu::menus[type]->GetSelection().lock()->parentComponent.lock()->IncreaseSelectionIndex(3.f); |
|
|
|
|
}}}, |
|
|
|
|
{{game->KEY_SCROLLVERT_R,Analog,InputEngageGroup::NOT_VISIBLE},{"Scroll Enchants",[](MenuType type){ |
|
|
|
|
Component<ScrollableWindowComponent>(type,"Enchant Container")->Scroll(game->KEY_SCROLLVERT.Analog()); |
|
|
|
|
}}}, |
|
|
|
|
} |
|
|
|
|
,{ //Button Navigation Rules
|
|
|
|
|
{"Sample Button",{ |
|
|
|
|
.up="", |
|
|
|
|
.down="", |
|
|
|
|
.left="", |
|
|
|
|
.right="",}}, |
|
|
|
|
}); |
|
|
|
|
{"Accessory List",{ |
|
|
|
|
.up=[&](MenuType type,Data&returnData){ |
|
|
|
|
Menu::ScrollUp(type,"Accessory List",returnData,"Back"); |
|
|
|
|
}, |
|
|
|
|
.down=[&](MenuType type,Data&returnData){ |
|
|
|
|
Menu::ScrollDown(type,"Accessory List",returnData,"Back"); |
|
|
|
|
}, |
|
|
|
|
.left="Back", |
|
|
|
|
.right=[&](MenuType type,Data&returnData){ |
|
|
|
|
Menu::menus[type]->GetSelection().lock()->Click(); |
|
|
|
|
returnData="Fragment Enchant Button"; |
|
|
|
|
},}}, |
|
|
|
|
{"Back",{ |
|
|
|
|
.up=[&](MenuType type,Data&returnData){ |
|
|
|
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName(); |
|
|
|
|
else returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents().back().lock()->GetName(); |
|
|
|
|
}, |
|
|
|
|
.down=[&](MenuType type,Data&returnData){ |
|
|
|
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName(); |
|
|
|
|
else returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents().front().lock()->GetName(); |
|
|
|
|
}, |
|
|
|
|
.left="Fragment Enchant Button", |
|
|
|
|
.right="Fragment Enchant Button",}}, |
|
|
|
|
{"Fragment Enchant Button",{ |
|
|
|
|
.up=[&](MenuType type,Data&returnData){ |
|
|
|
|
returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents().back().lock()->GetName(); |
|
|
|
|
}, |
|
|
|
|
.down=[&](MenuType type,Data&returnData){ |
|
|
|
|
returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents().front().lock()->GetName(); |
|
|
|
|
}, |
|
|
|
|
.left=[&](MenuType type,Data&returnData){ |
|
|
|
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName(); |
|
|
|
|
else returnData="Back"; |
|
|
|
|
}, |
|
|
|
|
.right="Back",}}, |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |