| 514 | } |
| 515 | |
| 516 | bool 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 | |
| 526 | void Widget::SetMouseButtonDown( std::optional<sf::Mouse::Button> button ) { |
| 527 | if( button.has_value() ) { |
nothing calls this directly
no outgoing calls
no test coverage detected