MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / Update

Method Update

Shadows/SampleFramework11/TextGUI.cpp:46–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void TextGUI::Update(const KeyboardState& kbState, const MouseState& mouseState)
47{
48 changed = false;
49
50 if(kbState.RisingEdge(toggleKey))
51 {
52 if(kbState.IsKeyDown(KeyboardState::RightShift))
53 {
54 INT32 value_ = value;
55 value_ -= 1;
56 if(value_ == -1)
57 value_ = numValues - 1;
58 value = value_;
59 }
60 else
61 value = (value + 1) % numValues;
62 changed = true;
63 }
64}
65
66void TextGUI::Render(SpriteRenderer& renderer, SpriteFont& defaultFont)
67{

Callers

nothing calls this directly

Calls 2

RisingEdgeMethod · 0.80
IsKeyDownMethod · 0.80

Tested by

no test coverage detected