Literally spent the entire day on this. 8 hours to find the code you were talking about. I learned a #$%^ ton along the way.
https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Battlescape/ActionMenuState.cpp#L249 * Closes the window on right-click.
* @param action Pointer to an action.
*/
void ActionMenuState::handle(Action *action)
{
State::handle(action);
if (action->getDetails()->type == SDL_MOUSEBUTTONDOWN && _game->isRightClick(action))
{
_game->popState();
}
else if (action->getDetails()->type == SDL_KEYDOWN &&
(action->getDetails()->key.keysym.sym == Options::keyCancel ||
action->getDetails()->key.keysym.sym == Options::keyBattleUseLeftHand ||
action->getDetails()->key.keysym.sym == Options::keyBattleUseRightHand))
{
_game->popState();
Heres what I'm thinking. When the togglemenu is up, there are only 4 things that will close the toggle menu aka popstate, if i am understanding the term.
1. right clicking
2. pressing the cancel key
3. pressing use lefthanditem (heres the problem)
4. pressing use righthanditem
If I PROPERLY remove :
action->getDetails()->key.keysym.sym == Options::keyBattleUseLeftHand ||
action->getDetails()->key.keysym.sym == Options::keyBattleUseRightHand
then right clicking and cancel(escape) will be the only ways to get out of the menu, allowing me to continue smashing q and e to my hearts content. I dont wanna celebrate because I am still setting up visual studio and cant test, but I feel like I got it. Thank you either way!