Implemented controller navigation for Input Keybind window. Fix inputs being completely eaten up by controller inputs when reassigning to keys. Release Build 7432.
This commit is contained in:
parent
66b0648a59
commit
397d8abc0a
@ -139,6 +139,117 @@ void Menu::InitializeKeyboardInputWindow(){
|
|||||||
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
|
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
|
||||||
}
|
}
|
||||||
,{ //Button Navigation Rules
|
,{ //Button Navigation Rules
|
||||||
|
{"Input_0_0 Input Displayer",{
|
||||||
|
.up="Confirm Button",
|
||||||
|
.down="Input_1_0 Input Displayer",
|
||||||
|
.left="Input_0_1 Input Displayer",
|
||||||
|
.right="Input_0_1 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_0_1 Input Displayer",{
|
||||||
|
.up="Confirm Button",
|
||||||
|
.down="Input_1_1 Input Displayer",
|
||||||
|
.left="Input_0_0 Input Displayer",
|
||||||
|
.right="Input_0_0 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_1_0 Input Displayer",{
|
||||||
|
.up="Input_0_0 Input Displayer",
|
||||||
|
.down="Input_2_0 Input Displayer",
|
||||||
|
.left="Input_1_1 Input Displayer",
|
||||||
|
.right="Input_1_1 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_1_1 Input Displayer",{
|
||||||
|
.up="Input_0_1 Input Displayer",
|
||||||
|
.down="Input_2_1 Input Displayer",
|
||||||
|
.left="Input_1_0 Input Displayer",
|
||||||
|
.right="Input_1_0 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_2_0 Input Displayer",{
|
||||||
|
.up="Input_1_0 Input Displayer",
|
||||||
|
.down="Input_3_0 Input Displayer",
|
||||||
|
.left="Input_2_1 Input Displayer",
|
||||||
|
.right="Input_2_1 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_2_1 Input Displayer",{
|
||||||
|
.up="Input_1_1 Input Displayer",
|
||||||
|
.down="Input_3_1 Input Displayer",
|
||||||
|
.left="Input_2_0 Input Displayer",
|
||||||
|
.right="Input_2_0 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_3_0 Input Displayer",{
|
||||||
|
.up="Input_2_0 Input Displayer",
|
||||||
|
.down="Input_4_0 Input Displayer",
|
||||||
|
.left="Input_3_1 Input Displayer",
|
||||||
|
.right="Input_3_1 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_3_1 Input Displayer",{
|
||||||
|
.up="Input_2_1 Input Displayer",
|
||||||
|
.down="Input_0_1 Gameplay Input Displayer",
|
||||||
|
.left="Input_3_0 Input Displayer",
|
||||||
|
.right="Input_3_0 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_4_0 Input Displayer",{
|
||||||
|
.up="Input_3_0 Input Displayer",
|
||||||
|
.down="Input_0_0 Gameplay Input Displayer",
|
||||||
|
.left="Input_3_1 Input Displayer",
|
||||||
|
.right="Input_3_1 Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_0_0 Gameplay Input Displayer",{
|
||||||
|
.up="Input_4_0 Input Displayer",
|
||||||
|
.down="Input_1_0 Gameplay Input Displayer",
|
||||||
|
.left="Input_0_1 Gameplay Input Displayer",
|
||||||
|
.right="Input_0_1 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_0_1 Gameplay Input Displayer",{
|
||||||
|
.up="Input_3_1 Input Displayer",
|
||||||
|
.down="Input_1_1 Gameplay Input Displayer",
|
||||||
|
.left="Input_0_0 Gameplay Input Displayer",
|
||||||
|
.right="Input_0_0 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_1_0 Gameplay Input Displayer",{
|
||||||
|
.up="Input_0_0 Gameplay Input Displayer",
|
||||||
|
.down="Input_2_0 Gameplay Input Displayer",
|
||||||
|
.left="Input_1_1 Gameplay Input Displayer",
|
||||||
|
.right="Input_1_1 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_1_1 Gameplay Input Displayer",{
|
||||||
|
.up="Input_0_1 Gameplay Input Displayer",
|
||||||
|
.down="Input_2_1 Gameplay Input Displayer",
|
||||||
|
.left="Input_1_0 Gameplay Input Displayer",
|
||||||
|
.right="Input_1_0 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_2_0 Gameplay Input Displayer",{
|
||||||
|
.up="Input_1_0 Gameplay Input Displayer",
|
||||||
|
.down="Input_3_0 Gameplay Input Displayer",
|
||||||
|
.left="Input_2_1 Gameplay Input Displayer",
|
||||||
|
.right="Input_2_1 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_2_1 Gameplay Input Displayer",{
|
||||||
|
.up="Input_1_1 Gameplay Input Displayer",
|
||||||
|
.down="Input_3_1 Gameplay Input Displayer",
|
||||||
|
.left="Input_2_0 Gameplay Input Displayer",
|
||||||
|
.right="Input_2_0 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_3_0 Gameplay Input Displayer",{
|
||||||
|
.up="Input_2_0 Gameplay Input Displayer",
|
||||||
|
.down="Input_4_0 Gameplay Input Displayer",
|
||||||
|
.left="Input_3_1 Gameplay Input Displayer",
|
||||||
|
.right="Input_3_1 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_3_1 Gameplay Input Displayer",{
|
||||||
|
.up="Input_2_1 Gameplay Input Displayer",
|
||||||
|
.down="Confirm Button",
|
||||||
|
.left="Input_3_0 Gameplay Input Displayer",
|
||||||
|
.right="Input_3_0 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Input_4_0 Gameplay Input Displayer",{
|
||||||
|
.up="Input_3_0 Gameplay Input Displayer",
|
||||||
|
.down="Confirm Button",
|
||||||
|
.left="Input_3_1 Gameplay Input Displayer",
|
||||||
|
.right="Input_3_1 Gameplay Input Displayer",
|
||||||
|
}},
|
||||||
|
{"Confirm Button",{
|
||||||
|
.up="Input_4_0 Gameplay Input Displayer",
|
||||||
|
.down="Input_0_0 Input Displayer",
|
||||||
|
}},
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -686,8 +686,17 @@ void InputListener::Update(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
Menu::alreadyClicked=true;
|
for(GamePad*gamepad:GamePad::getGamepads()){
|
||||||
Menu::CloseMenu();
|
for(size_t button=0;bool hasButton:gamepad->availableButtons){
|
||||||
|
GPButtons releasedButton=olc::GPButtons(button);
|
||||||
|
if(gamepad->getButton(releasedButton).bReleased){
|
||||||
|
Menu::alreadyClicked=true;
|
||||||
|
Menu::CloseMenu();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
button++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
@ -41,7 +41,7 @@ enum MenuType{
|
|||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
/*DO NOT REMOVE!!*/ENUM_START,///////////////////////////////
|
/*DO NOT REMOVE!!*/ENUM_START,///////////////////////////////
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// 73% Controller Compatibility. (100 total items, 4 items per menu * 25 menus)
|
// 96% Controller Compatibility. (100 total items, 4 items per menu * 25 menus)
|
||||||
INVENTORY_CONSUMABLES, //100% Controller Compatibility
|
INVENTORY_CONSUMABLES, //100% Controller Compatibility
|
||||||
CLASS_INFO, //100% Controller Compatibility
|
CLASS_INFO, //100% Controller Compatibility
|
||||||
CLASS_SELECTION, //100% Controller Compatibility
|
CLASS_SELECTION, //100% Controller Compatibility
|
||||||
@ -64,8 +64,8 @@ enum MenuType{
|
|||||||
USER_ID, //100% Controller Compatibility
|
USER_ID, //100% Controller Compatibility
|
||||||
SETTINGS, //100% Controller Compatibility
|
SETTINGS, //100% Controller Compatibility
|
||||||
SHERMAN, //100% Controller Compatibility
|
SHERMAN, //100% Controller Compatibility
|
||||||
INPUT_KEY_DISPLAY, //25% Controller Compatibility
|
INPUT_KEY_DISPLAY, //100% Controller Compatibility
|
||||||
NEW_INPUT, //75% Controller Compatibility
|
NEW_INPUT, //100% Controller Compatibility
|
||||||
PAUSE, //0% Controller Compatibility
|
PAUSE, //0% Controller Compatibility
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 7420
|
#define VERSION_BUILD 7432
|
||||||
|
|
||||||
#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