| 1558 | } |
| 1559 | |
| 1560 | void 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 | |
| 1611 | bool FollowerRadialMenu::followerMenuIsOpen() |
| 1612 | { |
no test coverage detected