| 56 | } |
| 57 | |
| 58 | void Viewport::HandleAbsolutePositionChange() { |
| 59 | auto position = Widget::GetAbsolutePosition(); |
| 60 | |
| 61 | m_children_viewport->SetDestinationOrigin( |
| 62 | sf::Vector2f( |
| 63 | std::floor( position.x + .5f ), |
| 64 | std::floor( position.y + .5f ) |
| 65 | ) |
| 66 | ); |
| 67 | |
| 68 | // Send AbsolutePositionChange notifications to children so they can |
| 69 | // perform necessary actions e.g. Canvas. |
| 70 | Container::HandleAbsolutePositionChange(); |
| 71 | } |
| 72 | |
| 73 | void Viewport::HandleEvent( const sf::Event& event ) { |
| 74 | // Ignore event when widget is not visible. |
nothing calls this directly
no test coverage detected