equal
deleted
inserted
replaced
91 |
91 |
92 QString widthStr = QString::number(screenSize.width()); |
92 QString widthStr = QString::number(screenSize.width()); |
93 QString heightStr = QString::number(screenSize.height()); |
93 QString heightStr = QString::number(screenSize.height()); |
94 QString wWidth = value("video/windowedWidth", widthStr).toString(); |
94 QString wWidth = value("video/windowedWidth", widthStr).toString(); |
95 QString wHeight = value("video/windowedHeight", heightStr).toString(); |
95 QString wHeight = value("video/windowedHeight", heightStr).toString(); |
|
96 pIsEngineWindowMaximized = value("video/windowedMaximized", false).toBool(); |
96 // If left blank reset the resolution to the default |
97 // If left blank reset the resolution to the default |
97 wWidth = (wWidth == "" ? widthStr : wWidth); |
98 wWidth = (wWidth == "" ? widthStr : wWidth); |
98 wHeight = (wHeight == "" ? heightStr : wHeight); |
99 wHeight = (wHeight == "" ? heightStr : wHeight); |
99 Form->ui.pageOptions->windowWidthEdit->setValue(wWidth.toInt()); |
100 Form->ui.pageOptions->windowWidthEdit->setValue(wWidth.toInt()); |
100 Form->ui.pageOptions->windowHeightEdit->setValue(wHeight.toInt()); |
101 Form->ui.pageOptions->windowHeightEdit->setValue(wHeight.toInt()); |
245 void GameUIConfig::SaveOptions() |
246 void GameUIConfig::SaveOptions() |
246 { |
247 { |
247 setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText()); |
248 setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText()); |
248 setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->value()); |
249 setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->value()); |
249 setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->value()); |
250 setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->value()); |
|
251 setValue("video/windowedMaximized", vid_Maximized()); |
250 setValue("video/fullscreen", vid_Fullscreen()); |
252 setValue("video/fullscreen", vid_Fullscreen()); |
251 |
253 |
252 setValue("video/quality", Form->ui.pageOptions->SLQuality->value()); |
254 setValue("video/quality", Form->ui.pageOptions->SLQuality->value()); |
253 setValue("video/zoom", Form->ui.pageOptions->SLZoom->value()); |
255 setValue("video/zoom", Form->ui.pageOptions->SLZoom->value()); |
254 setValue("video/stereo", stereoMode()); |
256 setValue("video/stereo", stereoMode()); |
380 std::pair<QRect, QRect> result = vid_ResolutionPair(); |
382 std::pair<QRect, QRect> result = vid_ResolutionPair(); |
381 if(Form->ui.pageOptions->CBFullscreen->isChecked()) |
383 if(Form->ui.pageOptions->CBFullscreen->isChecked()) |
382 return result.first; |
384 return result.first; |
383 else |
385 else |
384 return result.second; |
386 return result.second; |
|
387 } |
|
388 |
|
389 bool GameUIConfig::vid_Maximized() |
|
390 { |
|
391 return pIsEngineWindowMaximized; |
|
392 } |
|
393 |
|
394 void GameUIConfig::vid_SetMaximized(bool isMaximized) |
|
395 { |
|
396 pIsEngineWindowMaximized = isMaximized; |
385 } |
397 } |
386 |
398 |
387 bool GameUIConfig::vid_Fullscreen() |
399 bool GameUIConfig::vid_Fullscreen() |
388 { |
400 { |
389 return Form->ui.pageOptions->CBFullscreen->isChecked(); |
401 return Form->ui.pageOptions->CBFullscreen->isChecked(); |