* Ignores any mouse clicks that aren't on a row. * @param action Pointer to an action. * @param state State that the action handlers belong to. */
| 1024 | * @param state State that the action handlers belong to. |
| 1025 | */ |
| 1026 | void TextList::mouseClick(Action *action, State *state) |
| 1027 | { |
| 1028 | if (_selectable) |
| 1029 | { |
| 1030 | if (_selRow < _rows.size()) |
| 1031 | { |
| 1032 | InteractiveSurface::mouseClick(action, state); |
| 1033 | if (_comboBox && action->getDetails()->button.button == SDL_BUTTON_LEFT) |
| 1034 | { |
| 1035 | _comboBox->setSelected(_selRow); |
| 1036 | _comboBox->toggle(); |
| 1037 | } |
| 1038 | } |
| 1039 | } |
| 1040 | else |
| 1041 | { |
| 1042 | InteractiveSurface::mouseClick(action, state); |
| 1043 | } |
| 1044 | } |
| 1045 | |
| 1046 | /** |
| 1047 | * Selects the row the mouse is over. |
nothing calls this directly
no test coverage detected