| 229 | } |
| 230 | |
| 231 | void PopupMenu::checkItem(S32 pos, bool checked) |
| 232 | { |
| 233 | if (mMenuItems.empty() || mMenuItems.size() < pos || pos < 0) |
| 234 | return; |
| 235 | |
| 236 | if (checked && mMenuItems[pos].mCheckGroup != -1 && mRadioSelection) |
| 237 | { |
| 238 | // first, uncheck everything in the group: |
| 239 | for (U32 i = 0; i < mMenuItems.size(); i++) |
| 240 | if (mMenuItems[i].mCheckGroup == mMenuItems[pos].mCheckGroup && mMenuItems[i].mIsChecked) |
| 241 | mMenuItems[i].mIsChecked = false; |
| 242 | } |
| 243 | |
| 244 | mMenuItems[pos].mIsChecked = checked; |
| 245 | } |
| 246 | |
| 247 | void PopupMenu::checkRadioItem(S32 firstPos, S32 lastPos, S32 checkPos) |
| 248 | { |
no test coverage detected