Added controller compatibility to Artificer Enchant Window. Removed menu navigation using right analog stick. Release Build 11662.
This commit is contained in:
parent
da5d596a37
commit
36b9a071e3
@ -141,11 +141,9 @@ void Menu::InitializeArtificerDisassembleWindow(){
|
|||||||
artificerDisassembleWindow->SetupKeyboardNavigation(
|
artificerDisassembleWindow->SetupKeyboardNavigation(
|
||||||
[](MenuType type,Data&returnData){ //On Open
|
[](MenuType type,Data&returnData){ //On Open
|
||||||
auto&items{Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents()};
|
auto&items{Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents()};
|
||||||
if(items.size()>0){
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName();
|
||||||
returnData=items[0];
|
else if(items.size()>0)returnData=items[0];
|
||||||
}else{
|
else returnData="Back";
|
||||||
returnData="Back";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ //Button Key
|
{ //Button Key
|
||||||
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
||||||
|
@ -172,7 +172,10 @@ void Menu::InitializeArtificerEnchantWindow(){
|
|||||||
|
|
||||||
artificerEnchantWindow->SetupKeyboardNavigation(
|
artificerEnchantWindow->SetupKeyboardNavigation(
|
||||||
[](MenuType type,Data&returnData){ //On Open
|
[](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
|
{ //Button Key
|
||||||
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
||||||
@ -180,12 +183,54 @@ void Menu::InitializeArtificerEnchantWindow(){
|
|||||||
Menu::CloseMenu();
|
Menu::CloseMenu();
|
||||||
}}},
|
}}},
|
||||||
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
|
{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
|
,{ //Button Navigation Rules
|
||||||
{"Sample Button",{
|
{"Accessory List",{
|
||||||
.up="",
|
.up=[&](MenuType type,Data&returnData){
|
||||||
.down="",
|
Menu::ScrollUp(type,"Accessory List",returnData,"Back");
|
||||||
.left="",
|
},
|
||||||
.right="",}},
|
.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",}},
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
@ -158,11 +158,9 @@ void Menu::InitializeArtificerRefineWindow(){
|
|||||||
artificerRefineWindow->SetupKeyboardNavigation(
|
artificerRefineWindow->SetupKeyboardNavigation(
|
||||||
[](MenuType type,Data&returnData){ //On Open
|
[](MenuType type,Data&returnData){ //On Open
|
||||||
auto&items{Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents()};
|
auto&items{Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetComponents()};
|
||||||
if(items.size()>0){
|
if(Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild())returnData=Component<RowInventoryScrollableWindowComponent>(type,"Accessory List")->GetSelectedChild().value().get().GetName();
|
||||||
returnData=items[0];
|
else if(items.size()>0)returnData=items[0];
|
||||||
}else{
|
else returnData="Back";
|
||||||
returnData="Back";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ //Button Key
|
{ //Button Key
|
||||||
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
||||||
|
@ -100,6 +100,6 @@ void Menu::InitializeArtificerWindow(){
|
|||||||
.down="Leave Button",}},
|
.down="Leave Button",}},
|
||||||
{"Leave Button",{
|
{"Leave Button",{
|
||||||
.up="Help Button",
|
.up="Help Button",
|
||||||
.down="Refine Button",}},
|
.down="Disassemble Button",}},
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -409,8 +409,8 @@ void Menu::KeyboardButtonNavigation(AiL*game,vf2d menuPos){
|
|||||||
}
|
}
|
||||||
if(navigationGroups.count(selectionButtonName)){
|
if(navigationGroups.count(selectionButtonName)){
|
||||||
Navigation nav=navigationGroups[selectionButtonName];
|
Navigation nav=navigationGroups[selectionButtonName];
|
||||||
|
const float scrollVertAnalogDAS{game->KEY_SCROLLVERT_L.AnalogDAS(0.5f)};
|
||||||
if(game->KEY_UP.PressedDAS()||game->KEY_SCROLLUP.AnalogDAS(0.5f)<-0.5f){
|
if(game->KEY_UP.PressedDAS()||scrollVertAnalogDAS<-0.5f){
|
||||||
SoundEffect::PlaySFX("Menu Navigate",SoundEffect::CENTERED);
|
SoundEffect::PlaySFX("Menu Navigate",SoundEffect::CENTERED);
|
||||||
SetMouseNavigation(false);
|
SetMouseNavigation(false);
|
||||||
if(std::holds_alternative<std::string>(nav.up)&&std::get<std::string>(nav.up).length()>0)SetSelection(std::string_view(std::get<std::string>(nav.up)));
|
if(std::holds_alternative<std::string>(nav.up)&&std::get<std::string>(nav.up).length()>0)SetSelection(std::string_view(std::get<std::string>(nav.up)));
|
||||||
@ -422,7 +422,7 @@ void Menu::KeyboardButtonNavigation(AiL*game,vf2d menuPos){
|
|||||||
SetSelection(returnData);
|
SetSelection(returnData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(game->KEY_DOWN.PressedDAS()||game->KEY_SCROLLDOWN.AnalogDAS(0.5f)>0.5f){
|
if(game->KEY_DOWN.PressedDAS()||scrollVertAnalogDAS>0.5f){
|
||||||
SoundEffect::PlaySFX("Menu Navigate",SoundEffect::CENTERED);
|
SoundEffect::PlaySFX("Menu Navigate",SoundEffect::CENTERED);
|
||||||
SetMouseNavigation(false);
|
SetMouseNavigation(false);
|
||||||
if(std::holds_alternative<std::string>(nav.down)&&std::get<std::string>(nav.down).length()>0)SetSelection(std::string_view(std::get<std::string>(nav.down)));
|
if(std::holds_alternative<std::string>(nav.down)&&std::get<std::string>(nav.down).length()>0)SetSelection(std::string_view(std::get<std::string>(nav.down)));
|
||||||
|
@ -73,7 +73,7 @@ enum MenuType{
|
|||||||
ARTIFICER_REFINE, //100% Controller Compatibility
|
ARTIFICER_REFINE, //100% Controller Compatibility
|
||||||
ARTIFICER_REFINE_RESULT,
|
ARTIFICER_REFINE_RESULT,
|
||||||
ARTIFICER_DISASSEMBLE, //100% Controller Compatibility
|
ARTIFICER_DISASSEMBLE, //100% Controller Compatibility
|
||||||
ARTIFICER_ENCHANT,
|
ARTIFICER_ENCHANT, //100% Controller Compatibility
|
||||||
ARTIFICER_ENCHANT_CONFIRM,
|
ARTIFICER_ENCHANT_CONFIRM,
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 11653
|
#define VERSION_BUILD 11662
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user