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

Function buttonAlchemyUpdateSelectorOnHighlight

src/interface/interface.cpp:16924–16940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16922}
16923
16924void buttonAlchemyUpdateSelectorOnHighlight(const int player, Button* button)
16925{
16926 if ( button->isHighlighted() )
16927 {
16928 players[player]->GUI.setHoveringOverModuleButton(Player::GUI_t::MODULE_ALCHEMY);
16929 if ( players[player]->GUI.activeModule != Player::GUI_t::MODULE_ALCHEMY )
16930 {
16931 players[player]->GUI.activateModule(Player::GUI_t::MODULE_ALCHEMY);
16932 }
16933 SDL_Rect pos = button->getAbsoluteSize();
16934 // make sure to adjust absolute size to camera viewport
16935 pos.x -= players[player]->camera_virtualx1();
16936 pos.y -= players[player]->camera_virtualy1();
16937 players[player]->hud.setCursorDisabled(false);
16938 players[player]->hud.updateCursorAnimation(pos.x - 1, pos.y - 1, pos.w, pos.h, inputs.getVirtualMouse(player)->draw_cursor);
16939 }
16940}
16941
16942bool playerKnowsRecipe(const int player, ItemType basePotion, ItemType secondaryPotion, ItemType result)
16943{

Callers 2

updateAlchemyMenuMethod · 0.85
updateRecipePanelMethod · 0.85

Calls 8

isHighlightedMethod · 0.80
activateModuleMethod · 0.80
camera_virtualx1Method · 0.80
camera_virtualy1Method · 0.80
setCursorDisabledMethod · 0.80
getVirtualMouseMethod · 0.80
getAbsoluteSizeMethod · 0.45

Tested by

no test coverage detected