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

Method drawFollowerMenu

src/interface/interface.cpp:2161–4037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2159}
2160
2161void FollowerRadialMenu::drawFollowerMenu()
2162{
2163 auto player = players[gui_player];
2164 if ( !player->isLocalPlayer() )
2165 {
2166 closeFollowerMenuGUI();
2167 return;
2168 }
2169
2170 Input& input = Input::inputs[gui_player];
2171
2172 if ( selectMoveTo )
2173 {
2174 if ( input.binaryToggle("MenuCancel") )
2175 {
2176 input.consumeBinaryToggle("MenuCancel");
2177 input.consumeBindingsSharedWithBinding("MenuCancel");
2178 closeFollowerMenuGUI();
2179 Player::soundCancel();
2180 }
2181 if ( !followerToCommand )
2182 {
2183 selectMoveTo = false;
2184 closeFollowerMenuGUI();
2185 }
2186 else if ( followerFrame )
2187 {
2188 followerFrame->setDisabled(true);
2189 }
2190
2191 if ( followerToCommand )
2192 {
2193 if ( followerToCommand->monsterAllyIndex < 0 && followerToCommand->getStats() &&
2194 (!followerToCommand->getStats()->getEffectActive(EFF_COMMAND)
2195 || followerToCommand->getStats()->getEffectActive(EFF_COMMAND) - 1 != gui_player) )
2196 {
2197 selectMoveTo = false;
2198 closeFollowerMenuGUI();
2199 }
2200 }
2201 return;
2202 }
2203
2204 if ( !followerFrame )
2205 {
2206 return;
2207 }
2208
2209 followerFrame->setSize(SDL_Rect{ players[gui_player]->camera_virtualx1(),
2210 players[gui_player]->camera_virtualy1(),
2211 players[gui_player]->camera_virtualWidth(),
2212 players[gui_player]->camera_virtualHeight() });
2213
2214 int disableOption = 0;
2215 bool keepWheelOpen = false;
2216
2217 Sint32 omousex = inputs.getMouse(gui_player, Inputs::OX);
2218 Sint32 omousey = inputs.getMouse(gui_player, Inputs::OY);

Callers 1

drawStatusNewFunction · 0.80

Calls 15

getFPSScaleFunction · 0.85
statGetCHRFunction · 0.85
statGetPERFunction · 0.85
playSoundFunction · 0.85
itemTypeIsInstrumentFunction · 0.85
sendAllyCommandClientFunction · 0.85
getMonsterLocalizedNameFunction · 0.85
ttfPrintTextFunction · 0.85
drawLineFunction · 0.85
drawArcInvertedYFunction · 0.85
commandCanBeSentToAllFunction · 0.85

Tested by

no test coverage detected