================= UI_CheckVid1Data ================= */
| 6396 | ================= |
| 6397 | */ |
| 6398 | void UI_CheckVid1Data(const char *menuTo,const char *warningMenuName) |
| 6399 | { |
| 6400 | menuDef_t *menu; |
| 6401 | itemDef_t *applyChanges; |
| 6402 | |
| 6403 | menu = Menu_GetFocused(); // Get current menu (either video or ingame video, I would assume) |
| 6404 | |
| 6405 | if (!menu) |
| 6406 | { |
| 6407 | Com_Printf(S_COLOR_YELLOW"WARNING: No videoMenu was found. Video data could not be checked\n"); |
| 6408 | return; |
| 6409 | } |
| 6410 | |
| 6411 | applyChanges = (itemDef_s *) Menu_FindItemByName(menu, "applyChanges"); |
| 6412 | |
| 6413 | if (!applyChanges) |
| 6414 | { |
| 6415 | // Menus_CloseAll(); |
| 6416 | Menus_OpenByName(menuTo); |
| 6417 | return; |
| 6418 | } |
| 6419 | |
| 6420 | if ((applyChanges->window.flags & WINDOW_VISIBLE)) // Is the APPLY CHANGES button active? |
| 6421 | { |
| 6422 | // Menus_SaveGoToMenu(menuTo); // Save menu you're going to |
| 6423 | // Menus_HideItems(menu->window.name); // HIDE videMenu in case you have to come back |
| 6424 | Menus_OpenByName(warningMenuName); // Give warning |
| 6425 | } |
| 6426 | else |
| 6427 | { |
| 6428 | // Menus_CloseAll(); |
| 6429 | // Menus_OpenByName(menuTo); |
| 6430 | } |
| 6431 | } |
| 6432 | |
| 6433 | /* |
| 6434 | ================= |
no test coverage detected