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

Method Cursor

src/Core/System/Cursor.cpp:31–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 Cursor::Cursor(System::Window& window, Triggers::TriggerManager& triggers)
32 : m_window(window)
33 , m_cursorTriggers(triggers.createTriggerGroup("Event", "Cursor"))
34 {
35 m_constraint = Constraints::Default;
36 m_constraintCondition = []() { return true; };
37
38 m_buttonState[sf::Mouse::Button::Left]
39 = sf::Mouse::isButtonPressed(sf::Mouse::Button::Left);
40 m_buttonState[sf::Mouse::Button::Middle]
41 = sf::Mouse::isButtonPressed(sf::Mouse::Button::Middle);
42 m_buttonState[sf::Mouse::Button::Right]
43 = sf::Mouse::isButtonPressed(sf::Mouse::Button::Right);
44
45 m_cursorTriggers->add("Move");
46 m_cursorTriggers->add("Press");
47 m_cursorTriggers->add("Release");
48 m_cursorTriggers->add("Hold");
49
50 m_saveOldPos = sf::Mouse::getPosition();
51 }
52
53 int Cursor::getConstrainedX() const
54 {

Callers

nothing calls this directly

Calls 2

createTriggerGroupMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected