| 184 | |
| 185 | template <typename T> |
| 186 | bool TextListComponent<T>::input(InputConfig* config, Input input) |
| 187 | { |
| 188 | if(mRowVector.size() > 0) |
| 189 | { |
| 190 | if(input.value != 0) |
| 191 | { |
| 192 | if(config->isMappedTo("down", input)) |
| 193 | { |
| 194 | setScrollDir(1); |
| 195 | scroll(); |
| 196 | return true; |
| 197 | } |
| 198 | |
| 199 | if(config->isMappedTo("up", input)) |
| 200 | { |
| 201 | setScrollDir(-1); |
| 202 | scroll(); |
| 203 | return true; |
| 204 | } |
| 205 | if(config->isMappedTo("pagedown", input)) |
| 206 | { |
| 207 | setScrollDir(10); |
| 208 | scroll(); |
| 209 | return true; |
| 210 | } |
| 211 | |
| 212 | if(config->isMappedTo("pageup", input)) |
| 213 | { |
| 214 | setScrollDir(-10); |
| 215 | scroll(); |
| 216 | return true; |
| 217 | } |
| 218 | }else{ |
| 219 | if(config->isMappedTo("down", input) || config->isMappedTo("up", input) || config->isMappedTo("pagedown", input) || config->isMappedTo("pageup", input)) |
| 220 | { |
| 221 | stopScrolling(); |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | return GuiComponent::input(config, input); |
| 227 | } |
| 228 | |
| 229 | template <typename T> |
| 230 | void TextListComponent<T>::setScrollDir(int val) |
nothing calls this directly
no test coverage detected