| 1293 | } |
| 1294 | |
| 1295 | void Push2Control::UpdateControlList() |
| 1296 | { |
| 1297 | mSliderControls.clear(); |
| 1298 | mButtonControls.clear(); |
| 1299 | std::vector<IUIControl*> controls; |
| 1300 | if (mScreenDisplayMode == ScreenDisplayMode::kAddModule) |
| 1301 | { |
| 1302 | controls = mSpawnModuleControls; |
| 1303 | } |
| 1304 | else if (mDisplayModule == this) |
| 1305 | { |
| 1306 | controls = mFavoriteControls; |
| 1307 | } |
| 1308 | else if (mDisplayModule != nullptr) |
| 1309 | { |
| 1310 | if (mDisplayModule->HasPush2OverrideControls()) |
| 1311 | mDisplayModule->GetPush2OverrideControls(controls); |
| 1312 | else |
| 1313 | controls = mDisplayModule->GetUIControls(); |
| 1314 | } |
| 1315 | |
| 1316 | for (int i = 0; i < controls.size(); ++i) |
| 1317 | { |
| 1318 | if (controls[i]->IsSliderControl() && controls[i]->GetShouldSaveState()) |
| 1319 | mSliderControls.push_back(controls[i]); |
| 1320 | if (controls[i]->IsButtonControl() && (controls[i]->GetShouldSaveState() || dynamic_cast<ClickButton*>(controls[i]) != nullptr)) |
| 1321 | mButtonControls.push_back(controls[i]); |
| 1322 | } |
| 1323 | mDisplayedControls = controls; |
| 1324 | } |
| 1325 | |
| 1326 | void Push2Control::AddFavoriteControl(IUIControl* control) |
| 1327 | { |
nothing calls this directly
no test coverage detected