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

Method initCalloutMenuGUICursor

src/interface/interface.cpp:28896–28925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28894}
28895
28896void CalloutRadialMenu::initCalloutMenuGUICursor(bool openInventory)
28897{
28898 bool oldshootmode = players[gui_player]->shootmode;
28899 if ( openInventory )
28900 {
28901 //players[gui_player]->openStatusScreen(GUI_MODE_INVENTORY, INVENTORY_MODE_ITEM);
28902 players[gui_player]->closeAllGUIs(DONT_CHANGE_SHOOTMODE, CLOSEGUI_DONT_CLOSE_CALLOUTGUI);
28903 players[gui_player]->openStatusScreen(GUI_MODE_CALLOUT, INVENTORY_MODE_ITEM);
28904 }
28905
28906 if ( !oldshootmode )
28907 {
28908 Uint32 flags = (Inputs::SET_MOUSE | Inputs::SET_CONTROLLER | Inputs::UNSET_RELATIVE_MOUSE);
28909 inputs.warpMouse(gui_player,
28910 players[gui_player]->camera_x1() + (players[gui_player]->camera_width() / 2),
28911 players[gui_player]->camera_y1() + (players[gui_player]->camera_height() / 2), flags);
28912 }
28913
28914 inputs.setMouse(gui_player, Inputs::OX, inputs.getMouse(gui_player, Inputs::X));
28915 inputs.setMouse(gui_player, Inputs::OY, inputs.getMouse(gui_player, Inputs::Y));
28916
28917 if ( menuX == -1 )
28918 {
28919 menuX = inputs.getMouse(gui_player, Inputs::X);
28920 }
28921 if ( menuY == -1 )
28922 {
28923 menuY = inputs.getMouse(gui_player, Inputs::Y);
28924 }
28925}
28926
28927bool CalloutRadialMenu::calloutGUIHasBeenCreated() const
28928{

Callers 2

handleActionsMethod · 0.80
actPlayerFunction · 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