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

Method HandleAbsolutePositionChange

src/SFGUI/Viewport.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void 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
73void Viewport::HandleEvent( const sf::Event& event ) {
74 // Ignore event when widget is not visible.

Callers

nothing calls this directly

Calls 1

SetDestinationOriginMethod · 0.80

Tested by

no test coverage detected