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

Function buttonFeatherUpdateSelectorOnHighlight

src/interface/interface.cpp:21647–21663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21645}
21646
21647void buttonFeatherUpdateSelectorOnHighlight(const int player, Button* button)
21648{
21649 if ( button->isHighlighted() )
21650 {
21651 players[player]->GUI.setHoveringOverModuleButton(Player::GUI_t::MODULE_FEATHER);
21652 if ( players[player]->GUI.activeModule != Player::GUI_t::MODULE_FEATHER )
21653 {
21654 players[player]->GUI.activateModule(Player::GUI_t::MODULE_FEATHER);
21655 }
21656 SDL_Rect pos = button->getAbsoluteSize();
21657 // make sure to adjust absolute size to camera viewport
21658 pos.x -= players[player]->camera_virtualx1();
21659 pos.y -= players[player]->camera_virtualy1();
21660 players[player]->hud.setCursorDisabled(false);
21661 players[player]->hud.updateCursorAnimation(pos.x - 1, pos.y - 1, pos.w, pos.h, inputs.getVirtualMouse(player)->draw_cursor);
21662 }
21663}
21664
21665void sliderFeatherUpdateSelectorOnHighlight(const int player, Slider* slider)
21666{

Callers 1

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