MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / setButtonState

Method setButtonState

src/Abyss/Common/MouseState.cpp:17–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15[[nodiscard]] bool MouseState::isVisible() const { return _visible; }
16
17void MouseState::setButtonState(Enums::MouseButton button, const bool pressed) {
18 _button = static_cast<Enums::MouseButton>(
19 (pressed ? static_cast<uint8_t>(_button) | static_cast<uint8_t>(button) : static_cast<uint8_t>(_button) & ~static_cast<uint8_t>(button)));
20}
21
22void MouseState::setPosition(const int x, const int y) {
23 _x = x;

Callers 2

processEventsMethod · 0.80
processSceneChangeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected