MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / MouseButtonToString

Function MouseButtonToString

src/Core/System/Cursor.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 }
17
18 std::string MouseButtonToString(const sf::Mouse::Button button)
19 {
20 if (button == sf::Mouse::Button::Left)
21 return "left";
22 if (button == sf::Mouse::Button::Middle)
23 return "middle";
24 if (button == sf::Mouse::Button::Right)
25 return "right";
26 const int enumValue
27 = static_cast<std::underlying_type_t<sf::Mouse::Button>>(button);
28 throw Exceptions::InvalidMouseButtonEnumValue(enumValue, EXC_INFO);
29 }
30
31 Cursor::Cursor(System::Window& window, Triggers::TriggerManager& triggers)
32 : m_window(window)

Callers 1

updateMethod · 0.85

Calls 1

Tested by

no test coverage detected