MCPcopy Create free account
hub / github.com/TurningWheel/Barony / closeFollowerMenuGUI

Method closeFollowerMenuGUI

src/interface/interface.cpp:1560–1609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1558}
1559
1560void FollowerRadialMenu::closeFollowerMenuGUI(bool clearRecentEntity)
1561{
1562 followerToCommand = nullptr;
1563 menuX = -1;
1564 menuY = -1;
1565 moveToX = -1;
1566 moveToY = -1;
1567 if ( clearRecentEntity )
1568 {
1569 recentEntity = nullptr;
1570 }
1571 menuToggleClick = false;
1572 holdWheel = false;
1573 if ( accessedMenuFromPartySheet )
1574 {
1575 if ( optionSelected == ALLY_CMD_MOVETO_CONFIRM || optionSelected == ALLY_CMD_ATTACK_CONFIRM )
1576 {
1577 initfollowerMenuGUICursor(true);
1578 }
1579 accessedMenuFromPartySheet = false;
1580 if ( optionSelected != ALLY_CMD_CANCEL && optionSelected != -1 )
1581 {
1582 //inputs.setMouse(player, Inputs::X, partySheetMouseX);
1583 //inputs.setMouse(player, Inputs::Y, partySheetMouseY);
1584 //mousex = partySheetMouseX;
1585 //mousey = partySheetMouseY;
1586 //SDL_SetRelativeMouseMode(SDL_FALSE);
1587 //SDL_WarpMouseInWindow(screen, mousex, mousey);
1588
1589 // to verify for splitscreen
1590 Uint32 flags = (Inputs::SET_MOUSE | Inputs::SET_CONTROLLER | Inputs::UNSET_RELATIVE_MOUSE);
1591 inputs.warpMouse(gui_player, partySheetMouseX, partySheetMouseY, flags);
1592
1593 }
1594 }
1595 optionSelected = -1;
1596 if ( followerFrame )
1597 {
1598 followerFrame->setDisabled(true);
1599 for ( auto f : followerFrame->getFrames() )
1600 {
1601 f->removeSelf();
1602 }
1603 }
1604 animTitle = 0.0;
1605 animWheel = 0.0;
1606 openedThisTick = 0;
1607 animInvalidAction = 0.0;
1608 animInvalidActionTicks = 0;
1609}
1610
1611bool FollowerRadialMenu::followerMenuIsOpen()
1612{

Callers 9

actMonsterFunction · 0.80
gameLogicFunction · 0.80
doConsoleCommandsFunction · 0.80
doNewGameFunction · 0.80
changeLevelFunction · 0.80
net.cppFile · 0.80
openStatusScreenMethod · 0.80
closeAllGUIsMethod · 0.80
openGUIMethod · 0.80

Calls 3

warpMouseMethod · 0.80
removeSelfMethod · 0.80
setDisabledMethod · 0.45

Tested by

no test coverage detected