MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / txtDisplayHeightChange

Method txtDisplayHeightChange

src/Menu/OptionsVideoState.cpp:415–436  ·  view source on GitHub ↗

* Changes the Display Height option. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

413 * @param action Pointer to an action.
414 */
415void OptionsVideoState::txtDisplayHeightChange(Action *)
416{
417 std::wstringstream ss;
418 int height = 0;
419 ss << std::dec << _txtDisplayHeight->getText();
420 ss >> std::dec >> height;
421 Options::newDisplayHeight = height;
422 // Update resolution mode
423 if (_res != (SDL_Rect**)-1 && _res != (SDL_Rect**)0)
424 {
425 int i;
426 _resCurrent = -1;
427 for (i = 0; _res[i]; ++i)
428 {
429 if (_resCurrent == -1 &&
430 ((_res[i]->w == Options::newDisplayWidth && _res[i]->h <= Options::newDisplayHeight) || _res[i]->w < Options::newDisplayWidth))
431 {
432 _resCurrent = i;
433 }
434 }
435 }
436}
437
438/**
439 * Changes the Language option.

Callers

nothing calls this directly

Calls 1

getTextMethod · 0.45

Tested by

no test coverage detected