MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / input

Method input

Source/Input/Function_Toggle_Key.cpp:33–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31{ }
32
33void Toggle_Bool::input()
34{
35 if (m_toggleDelay.asMilliseconds() <
36 m_toggleTimer.getElapsedTime().asMilliseconds())
37 {
38 if (sf::Keyboard::isKeyPressed(m_toggleKey))
39 {
40 *m_pValue = !*m_pValue;
41 m_toggleTimer.restart();
42 }
43 }
44}
45

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected