forked from Mirrors/openclonk
Don't force league settings on scenario parameters if league is enabled during single player scenario selection (#1120).
parent
3c731729b4
commit
f815613ce8
|
@ -132,7 +132,7 @@ void C4GameOptionsList::OptionScenarioParameter::Update()
|
|||
int32_t val=0;
|
||||
// display forced league value?
|
||||
bool fLeagueReadOnly = false;
|
||||
if (::Config.Network.LeagueServerSignUp && !fReadOnly) val = ParameterDef->GetLeagueValue();
|
||||
if (::Config.Network.LeagueServerSignUp && !fReadOnly && !pForDlg->IsPreGameSingle()) val = ParameterDef->GetLeagueValue();
|
||||
if (val)
|
||||
fLeagueReadOnly = true;
|
||||
else
|
||||
|
|
|
@ -156,7 +156,8 @@ private:
|
|||
public:
|
||||
enum C4GameOptionsListSource
|
||||
{
|
||||
GOLS_PreGame,
|
||||
GOLS_PreGameSingle,
|
||||
GOLS_PreGameNetwork,
|
||||
GOLS_Lobby,
|
||||
GOLS_Runtime
|
||||
};
|
||||
|
@ -187,7 +188,8 @@ public:
|
|||
// config
|
||||
bool IsRuntime() const { return source==GOLS_Runtime; }
|
||||
bool IsTabular() const { return IsRuntime() || IsPreGame(); } // low lobby space doesn't allow tabular layout
|
||||
bool IsPreGame() const { return source==GOLS_PreGame; }
|
||||
bool IsPreGame() const { return source==GOLS_PreGameSingle || source==GOLS_PreGameNetwork; }
|
||||
bool IsPreGameSingle() const { return source==GOLS_PreGameSingle; }
|
||||
|
||||
C4ScenarioParameters *GetParameters() { return params; } // used by children
|
||||
};
|
||||
|
|
|
@ -1479,7 +1479,7 @@ C4StartupScenSelDlg::C4StartupScenSelDlg(bool fNetwork) : C4StartupDlg(LoadResSt
|
|||
|
||||
// bottom of right side of book: Custom options on selection
|
||||
// Arbitrary height and invisible by default. Height will be adjusted when options are created.
|
||||
pSelectionOptions = new C4GameOptionsList(C4Rect(bounds.x, bounds.y+bounds.Hgt-10, bounds.Wdt, 10), false, C4GameOptionsList::GOLS_PreGame);
|
||||
pSelectionOptions = new C4GameOptionsList(C4Rect(bounds.x, bounds.y+bounds.Hgt-10, bounds.Wdt, 10), false, fNetwork ? C4GameOptionsList::GOLS_PreGameNetwork : C4GameOptionsList::GOLS_PreGameSingle);
|
||||
pSelectionOptions->SetDecoration(false, &C4Startup::Get()->Graphics.sfctBookScroll, true);
|
||||
pSelectionOptions->SetVisibility(false);
|
||||
pSheetBook->AddElement(pSelectionOptions);
|
||||
|
|
Loading…
Reference in New Issue