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

Method initfollowerMenuGUICursor

src/interface/interface.cpp:1529–1558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1527}
1528
1529void 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
1560void FollowerRadialMenu::closeFollowerMenuGUI(bool clearRecentEntity)
1561{

Callers 4

handleActionsMethod · 0.80
actPlayerFunction · 0.80
net.cppFile · 0.80
castSpellFunction · 0.80

Calls 9

closeAllGUIsMethod · 0.80
openStatusScreenMethod · 0.80
warpMouseMethod · 0.80
camera_x1Method · 0.80
camera_widthMethod · 0.80
camera_y1Method · 0.80
camera_heightMethod · 0.80
setMouseMethod · 0.80
getMouseMethod · 0.80

Tested by

no test coverage detected