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_PREFIX GroupUserConfigParam m_network_group
|
||||||
PARAM_DEFAULT(GroupUserConfigParam("Network", "Network Settings"));
|
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_PREFIX BoolUserConfigParam m_log_packets
|
||||||
PARAM_DEFAULT(BoolUserConfigParam(false, "log-network-packets",
|
PARAM_DEFAULT(BoolUserConfigParam(false, "log-network-packets",
|
||||||
&m_network_group, "If all network packets should be logged"));
|
&m_network_group, "If all network packets should be logged"));
|
||||||
|
@ -68,7 +68,7 @@ void OnlineScreen::loadedFromFile()
|
|||||||
{
|
{
|
||||||
m_enable_splitscreen = getWidget<CheckBoxWidget>("enable-splitscreen");
|
m_enable_splitscreen = getWidget<CheckBoxWidget>("enable-splitscreen");
|
||||||
assert(m_enable_splitscreen);
|
assert(m_enable_splitscreen);
|
||||||
m_enable_splitscreen->setState(false);
|
m_enable_splitscreen->setState(UserConfigParams::m_enable_network_splitscreen);
|
||||||
} // loadedFromFile
|
} // loadedFromFile
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -178,6 +178,7 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
// Let lobby add the players
|
// Let lobby add the players
|
||||||
NetworkConfig::get()->cleanNetworkPlayers();
|
NetworkConfig::get()->cleanNetworkPlayers();
|
||||||
}
|
}
|
||||||
|
UserConfigParams::m_enable_network_splitscreen = splitscreen->getState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user