Rebinding controls updates the input helper display. Release Build 7202.
This commit is contained in:
parent
e67c233aaa
commit
fe648f8fbf
@ -3163,6 +3163,9 @@ void AiL::GetAnyKeyRelease(Key key){
|
|||||||
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
|
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
|
||||||
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key});
|
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key});
|
||||||
Menu::alreadyClicked=true;
|
Menu::alreadyClicked=true;
|
||||||
|
for(auto&[menuType,menu]:Menu::menus){
|
||||||
|
menu->helpDisplay.Initialize(menu->inputGroups);
|
||||||
|
}
|
||||||
Menu::CloseMenu();
|
Menu::CloseMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3207,6 +3210,9 @@ void AiL::GetAnyMouseRelease(int32_t mouseButton){
|
|||||||
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
|
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
|
||||||
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->AddKeybind(Input{MOUSE,mouseButton});
|
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->AddKeybind(Input{MOUSE,mouseButton});
|
||||||
Menu::alreadyClicked=true;
|
Menu::alreadyClicked=true;
|
||||||
|
for(auto&[menuType,menu]:Menu::menus){
|
||||||
|
menu->helpDisplay.Initialize(menu->inputGroups);
|
||||||
|
}
|
||||||
Menu::CloseMenu();
|
Menu::CloseMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,6 +47,7 @@ INCLUDE_WINDOW_SIZE
|
|||||||
InputHelper::InputHelper(){}
|
InputHelper::InputHelper(){}
|
||||||
|
|
||||||
void InputHelper::Initialize(MenuInputGroups&inputGroups){
|
void InputHelper::Initialize(MenuInputGroups&inputGroups){
|
||||||
|
this->inputGroups.clear();
|
||||||
for(auto&data:inputGroups){
|
for(auto&data:inputGroups){
|
||||||
if(data.first.GetLabelVisible()){ //If the label is not visible, we don't care to include it in our list.
|
if(data.first.GetLabelVisible()){ //If the label is not visible, we don't care to include it in our list.
|
||||||
this->inputGroups[data.first.GetGroup()]=data.second.first;
|
this->inputGroups[data.first.GetGroup()]=data.second.first;
|
||||||
|
|||||||
@ -654,6 +654,9 @@ void InputListener::Update(){
|
|||||||
GPButtons releasedButton=olc::GPButtons(button);
|
GPButtons releasedButton=olc::GPButtons(button);
|
||||||
if(gamepad->getButton(releasedButton).bReleased){
|
if(gamepad->getButton(releasedButton).bReleased){
|
||||||
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{CONTROLLER,int(button)});
|
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{CONTROLLER,int(button)});
|
||||||
|
for(auto&[menuType,menu]:Menu::menus){
|
||||||
|
menu->helpDisplay.Initialize(menu->inputGroups);
|
||||||
|
}
|
||||||
Menu::alreadyClicked=true;
|
Menu::alreadyClicked=true;
|
||||||
Menu::CloseMenu();
|
Menu::CloseMenu();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -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 7198
|
#define VERSION_BUILD 7202
|
||||||
|
|
||||||
#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