| 1527 | } |
| 1528 | |
| 1529 | void FollowerRadialMenu::initfollowerMenuGUICursor(bool openInventory) |
| 1530 | { |
| 1531 | bool oldshootmode = players[gui_player]->shootmode; |
| 1532 | if ( openInventory ) |
| 1533 | { |
| 1534 | //players[gui_player]->openStatusScreen(GUI_MODE_INVENTORY, INVENTORY_MODE_ITEM); |
| 1535 | players[gui_player]->closeAllGUIs(DONT_CHANGE_SHOOTMODE, CLOSEGUI_DONT_CLOSE_FOLLOWERGUI); |
| 1536 | players[gui_player]->openStatusScreen(GUI_MODE_FOLLOWERMENU, INVENTORY_MODE_ITEM); |
| 1537 | } |
| 1538 | |
| 1539 | if ( !oldshootmode ) |
| 1540 | { |
| 1541 | Uint32 flags = (Inputs::SET_MOUSE | Inputs::SET_CONTROLLER | Inputs::UNSET_RELATIVE_MOUSE); |
| 1542 | inputs.warpMouse(gui_player, |
| 1543 | players[gui_player]->camera_x1() + (players[gui_player]->camera_width() / 2), |
| 1544 | players[gui_player]->camera_y1() + (players[gui_player]->camera_height() / 2), flags); |
| 1545 | } |
| 1546 | |
| 1547 | inputs.setMouse(gui_player, Inputs::OX, inputs.getMouse(gui_player, Inputs::X)); |
| 1548 | inputs.setMouse(gui_player, Inputs::OY, inputs.getMouse(gui_player, Inputs::Y)); |
| 1549 | |
| 1550 | if ( menuX == -1 ) |
| 1551 | { |
| 1552 | menuX = inputs.getMouse(gui_player, Inputs::X); |
| 1553 | } |
| 1554 | if ( menuY == -1 ) |
| 1555 | { |
| 1556 | menuY = inputs.getMouse(gui_player, Inputs::Y); |
| 1557 | } |
| 1558 | } |
| 1559 | |
| 1560 | void FollowerRadialMenu::closeFollowerMenuGUI(bool clearRecentEntity) |
| 1561 | { |
no test coverage detected