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

Method IsKeyPressed

engine/Poseidon/Input/InputSubsystem.cpp:624–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622
623bool InputSubsystem::IsKeyPressed(SDL_Scancode sc) const
624{
625 int idx = static_cast<int>(sc);
626 if (idx < 0 || idx >= SDL_SCANCODE_COUNT)
627 return false;
628 return GInput.keyboard.keysToDo[idx];
629}
630
631float InputSubsystem::GetKeyValue(SDL_Scancode sc) const
632{
633 int idx = static_cast<int>(sc);

Callers 7

SimulateMethod · 0.80
KeyPressedMethod · 0.80
BreakIntroFunction · 0.80
OnSimulateMethod · 0.80
OnSimulateMethod · 0.80
OnSimulateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected