MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetModifierMask

Method GetModifierMask

src/game/client/components/binds.cpp:71–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71int CBinds::GetModifierMask(IInput *pInput)
72{
73 int Mask = 0;
74 static const auto s_aModifierKeys = {
75 KEY_LSHIFT,
76 KEY_RSHIFT,
77 KEY_LCTRL,
78 KEY_RCTRL,
79 KEY_LALT,
80 KEY_RALT,
81 KEY_LGUI,
82 KEY_RGUI,
83 };
84 for(const auto Key : s_aModifierKeys)
85 {
86 if(pInput->KeyIsPressed(Key))
87 {
88 Mask |= GetModifierMaskOfKey(Key);
89 }
90 }
91
92 return Mask;
93}
94
95int CBinds::GetModifierMaskOfKey(int Key)
96{

Callers

nothing calls this directly

Calls 1

KeyIsPressedMethod · 0.80

Tested by

no test coverage detected