MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / input

Method input

src/components/GuiFastSelect.cpp:58–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool GuiFastSelect::input(InputConfig* config, Input input)
59{
60 if(config->isMappedTo("up", input) && input.value != 0)
61 {
62 mScrollOffset = -1;
63 scroll();
64 return true;
65 }
66
67 if(config->isMappedTo("down", input) && input.value != 0)
68 {
69 mScrollOffset = 1;
70 scroll();
71 return true;
72 }
73
74 if(config->isMappedTo("left", input) && input.value != 0)
75 {
76 mParent->setPreviousSortIndex();
77 mScrollSound->play();
78 return true;
79 }
80 else if(config->isMappedTo("right", input) && input.value != 0)
81 {
82 mParent->setNextSortIndex();
83 mScrollSound->play();
84 return true;
85 }
86
87 if((config->isMappedTo("up", input) || config->isMappedTo("down", input)) && input.value == 0)
88 {
89 mScrolling = false;
90 mScrollTimer = 0;
91 mScrollOffset = 0;
92 return true;
93 }
94
95 if(config->isMappedTo("select", input) && input.value == 0)
96 {
97 setListPos();
98 delete this;
99 return true;
100 }
101
102 return false;
103}
104
105void GuiFastSelect::update(int deltaTime)
106{

Callers

nothing calls this directly

Calls 4

isMappedToMethod · 0.80
setPreviousSortIndexMethod · 0.80
setNextSortIndexMethod · 0.80
playMethod · 0.45

Tested by

no test coverage detected