MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / setPosition

Method setPosition

Source/GUI/Button.cpp:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void Button::setPosition(const sf::Vector2f& position)
47 {
48 m_quad.setPosition(position);
49
50 m_text.setPosition(position);
51 m_text.move(m_quad.getSize().x / 2 - m_text.getLocalBounds().width / 2,
52 m_quad.getSize().y / 2 - m_text.getLocalBounds().height / 2);
53 }
54
55 const sf::Vector2f Button::getSize() const
56 {

Callers

nothing calls this directly

Calls 1

getSizeMethod · 0.45

Tested by

no test coverage detected