MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Key

Method Key

engine/Poseidon/Input/InputCode.hpp:30–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 constexpr explicit InputCode(uint32_t packed) : raw(packed) {}
29
30 static constexpr InputCode Key(SDL_Scancode sc) { return InputCode(static_cast<uint32_t>(InputDevice::Keyboard) | static_cast<uint32_t>(sc)); }
31 static constexpr InputCode MouseButton(int btn) { return InputCode(static_cast<uint32_t>(InputDevice::Mouse) | static_cast<uint32_t>(btn)); }
32 static constexpr InputCode GamepadBtn(int btn) { return InputCode(static_cast<uint32_t>(InputDevice::GamepadButton) | static_cast<uint32_t>(btn)); }
33 static constexpr InputCode GamepadAx(int axis) { return InputCode(static_cast<uint32_t>(InputDevice::GamepadAxis) | static_cast<uint32_t>(axis)); }

Callers

nothing calls this directly

Calls 1

InputCodeClass · 0.85

Tested by

no test coverage detected