Allow remembering network splitscreen option when opening STK
This commit is contained in:
parent
07f6282142
commit
d1ab5f8aaf
@ -812,6 +812,10 @@ namespace UserConfigParams
|
||||
|
||||
PARAM_PREFIX GroupUserConfigParam m_network_group
|
||||
PARAM_DEFAULT(GroupUserConfigParam("Network", "Network Settings"));
|
||||
PARAM_PREFIX BoolUserConfigParam m_enable_network_splitscreen
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false, "enable-network-splitscreen",
|
||||
&m_network_group, "The default value of enable splitscreen checkbox "
|
||||
"in online screen."));
|
||||
PARAM_PREFIX BoolUserConfigParam m_log_packets
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false, "log-network-packets",
|
||||
&m_network_group, "If all network packets should be logged"));
|
||||
|
@ -68,7 +68,7 @@ void OnlineScreen::loadedFromFile()
|
||||
{
|
||||
m_enable_splitscreen = getWidget<CheckBoxWidget>("enable-splitscreen");
|
||||
assert(m_enable_splitscreen);
|
||||
m_enable_splitscreen->setState(false);
|
||||
m_enable_splitscreen->setState(UserConfigParams::m_enable_network_splitscreen);
|
||||
} // loadedFromFile
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -178,6 +178,7 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
// Let lobby add the players
|
||||
NetworkConfig::get()->cleanNetworkPlayers();
|
||||
}
|
||||
UserConfigParams::m_enable_network_splitscreen = splitscreen->getState();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user