| 163 | } |
| 164 | |
| 165 | bool ComponentListComponent::input(InputConfig* config, Input input) |
| 166 | { |
| 167 | if(cursorValid() && getCell(mCursor.x(), mCursor.y())->component->input(config, input)) |
| 168 | return true; |
| 169 | |
| 170 | if(!input.value) |
| 171 | return false; |
| 172 | |
| 173 | if(config->isMappedTo("down", input)) |
| 174 | { |
| 175 | moveCursor(Eigen::Vector2i(0, 1)); |
| 176 | return true; |
| 177 | } |
| 178 | if(config->isMappedTo("up", input)) |
| 179 | { |
| 180 | moveCursor(Eigen::Vector2i(0, -1)); |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | return false; |
| 185 | } |
| 186 | |
| 187 | void ComponentListComponent::resetCursor() |
| 188 | { |
nothing calls this directly
no test coverage detected