MCPcopy Create free account
hub / github.com/TankOs/SFGUI / IsMouseButtonDown

Method IsMouseButtonDown

src/SFGUI/Widget.cpp:516–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516bool Widget::IsMouseButtonDown( std::optional<sf::Mouse::Button> button ) const {
517 // Check if any button is down if requested.
518 if( !button.has_value() ) {
519 return m_mouse_button_down != sf::Mouse::ButtonCount;
520 }
521
522 // Check if requested button is down.
523 return static_cast<sf::Mouse::Button>(m_mouse_button_down) == button;
524}
525
526void Widget::SetMouseButtonDown( std::optional<sf::Mouse::Button> button ) {
527 if( button.has_value() ) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected