| 11144 | } |
| 11145 | |
| 11146 | void openConfirmResolutionWindow() |
| 11147 | { |
| 11148 | inputs.mouseClearLeft(clientnum); |
| 11149 | keystatus[SDLK_RETURN] = 0; |
| 11150 | inputs.controllerClearInput(clientnum, INJOY_MENU_NEXT); |
| 11151 | playSound(139, 64); |
| 11152 | |
| 11153 | //Create confirmation window |
| 11154 | subwindow = 1; |
| 11155 | subx1 = xres / 2 - 128; |
| 11156 | subx2 = xres / 2 + 128; |
| 11157 | suby1 = yres / 2 - 40; |
| 11158 | suby2 = yres / 2 + 40; |
| 11159 | strcpy(subtext, "Testing resolution.\nWill revert in 10 seconds."); |
| 11160 | |
| 11161 | //Accept button |
| 11162 | button_t* button = newButton(); |
| 11163 | strcpy(button->label, "Accept"); |
| 11164 | button->x = subx1 + 8; |
| 11165 | button->y = suby2 - 28; |
| 11166 | button->sizex = strlen("Accept") * 12 + 8; |
| 11167 | button->sizey = 20; |
| 11168 | button->action = &buttonAcceptResolution; |
| 11169 | button->visible = 1; |
| 11170 | button->focused = 1; |
| 11171 | button->key = SDLK_RETURN; |
| 11172 | button->joykey = joyimpulses[INJOY_MENU_NEXT]; |
| 11173 | |
| 11174 | //Revert button |
| 11175 | button = newButton(); |
| 11176 | strcpy(button->label, "Revert"); |
| 11177 | button->x = subx2 - strlen("Revert") * 12 - 16; |
| 11178 | button->y = suby2 - 28; |
| 11179 | button->sizex = strlen("Revert") * 12 + 8; |
| 11180 | button->sizey = 20; |
| 11181 | button->action = &buttonRevertResolution; |
| 11182 | button->visible = 1; |
| 11183 | button->focused = 1; |
| 11184 | button->key = SDLK_ESCAPE; |
| 11185 | button->joykey = joyimpulses[INJOY_MENU_CANCEL]; |
| 11186 | revertResolutionButton = button; |
| 11187 | |
| 11188 | resolutionConfirmationTimer = SDL_GetTicks(); |
| 11189 | confirmResolutionWindow = true; |
| 11190 | } |
| 11191 | |
| 11192 | void buttonAcceptResolution(button_t* my) |
| 11193 | { |
no test coverage detected