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

Function buttonItemfxSelectorOnHighlight

src/interface/interface.cpp:14292–14308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14290}
14291
14292void buttonItemfxSelectorOnHighlight(const int player, Button* button)
14293{
14294 if ( button->isHighlighted() )
14295 {
14296 players[player]->GUI.setHoveringOverModuleButton(Player::GUI_t::MODULE_ITEMEFFECTGUI);
14297 if ( players[player]->GUI.activeModule != Player::GUI_t::MODULE_ITEMEFFECTGUI )
14298 {
14299 players[player]->GUI.activateModule(Player::GUI_t::MODULE_ITEMEFFECTGUI);
14300 }
14301 SDL_Rect pos = button->getAbsoluteSize();
14302 // make sure to adjust absolute size to camera viewport
14303 pos.x -= players[player]->camera_virtualx1();
14304 pos.y -= players[player]->camera_virtualy1();
14305 players[player]->hud.setCursorDisabled(false);
14306 players[player]->hud.updateCursorAnimation(pos.x - 1, pos.y - 1, pos.w, pos.h, inputs.getVirtualMouse(player)->draw_cursor);
14307 }
14308}
14309
14310void GenericGUIMenu::TinkerGUI_t::updateTinkerMenu()
14311{

Callers 1

updateItemEffectMenuMethod · 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