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

Method Button

Source/GUI/Button.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace GUI
7{
8 Button::Button(const std::string& text,
9 std::function<void(void)> function)
10 : m_function (function)
11 {
12 m_quad.setSize({BASE_WIDTH, BASE_HEIGHT});
13 m_quad.setTexture(&Component::guiTexture);
14 m_quad.setOutlineColor(sf::Color::Black);
15 m_quad.setOutlineThickness(4);
16
17 initText(m_text, 24, text);
18 }
19
20 void Button::input(const sf::Event& e)
21 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected