| 56 | } |
| 57 | |
| 58 | bool 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 | |
| 105 | void GuiFastSelect::update(int deltaTime) |
| 106 | { |
nothing calls this directly
no test coverage detected