Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -880,20 +880,23 @@ static void DestroyOptionsLayout() {

static void showAdvancedOptions()
{
WinAdvancedDisplay->winHide(FALSE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(FALSE);
}

static void acceptAdvancedOptions()
{
WinAdvancedDisplay->winHide(TRUE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);
}

static void cancelAdvancedOptions()
{
//restore the detail selection back to initial state
GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel());

WinAdvancedDisplay->winHide(TRUE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);
}

// TheSuperHackers @tweak Now prints additional version information in the version label.
Expand Down Expand Up @@ -1028,7 +1031,9 @@ void OptionsMenuInit( WindowLayout *layout, void *userData )
sliderParticleCapID = TheNameKeyGenerator->nameToKey( "OptionsMenu.wnd:ParticleCapSlider" );
sliderParticleCap = TheWindowManager->winGetWindowFromId( nullptr, sliderParticleCapID );

WinAdvancedDisplay->winHide(TRUE);
// TheSuperHackers @bugfix The advanced display window may be missing from custom or modded layouts.
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);

Color color = GameMakeColor(255,255,255,255);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,20 +940,23 @@ static void DestroyOptionsLayout() {

static void showAdvancedOptions()
{
WinAdvancedDisplay->winHide(FALSE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(FALSE);
}

static void acceptAdvancedOptions()
{
WinAdvancedDisplay->winHide(TRUE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);
}

static void cancelAdvancedOptions()
{
//restore the detail selection back to initial state
GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel());

WinAdvancedDisplay->winHide(TRUE);
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);
}

// TheSuperHackers @tweak Now prints additional version information in the version label.
Expand Down Expand Up @@ -1092,7 +1095,9 @@ void OptionsMenuInit( WindowLayout *layout, void *userData )
checkPropsID = TheNameKeyGenerator->nameToKey( "OptionsMenu.wnd:CheckShowProps" );
checkProps = TheWindowManager->winGetWindowFromId( nullptr, checkPropsID);

sliderParticleCapID = TheNameKeyGenerator->nameToKey( "OptionsMenu.wnd:ParticleCapSlider" );
// TheSuperHackers @bugfix The advanced display window may be missing from custom or modded layouts.
if (WinAdvancedDisplay)
WinAdvancedDisplay->winHide(TRUE);
sliderParticleCap = TheWindowManager->winGetWindowFromId( nullptr, sliderParticleCapID );

WinAdvancedDisplay->winHide(TRUE);
Expand Down
Loading