Make sure that HW reports stays disabled when internet is being
enabled in the options (GDPR compliance - opt-in required from user to send data). Made chat-message visible/invisible same as hw-statistics.
This commit is contained in:
parent
507d5d89e9
commit
968e0be3e4
@ -954,7 +954,7 @@ namespace UserConfigParams
|
||||
"A random number to avoid duplicated reports.") );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_hw_report_enable
|
||||
PARAM_DEFAULT( BoolUserConfigParam( true,
|
||||
PARAM_DEFAULT( BoolUserConfigParam( false,
|
||||
"hw-report-enabled",
|
||||
&m_hw_report_group,
|
||||
"If HW reports are enabled."));
|
||||
|
@ -81,29 +81,35 @@ void OptionsScreenGeneral::init()
|
||||
ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
ribbon->select( "tab_general", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
CheckBoxWidget* news = getWidget<CheckBoxWidget>("enable-internet");
|
||||
assert( news != NULL );
|
||||
news->setState( UserConfigParams::m_internet_status
|
||||
CheckBoxWidget* internet_enabled = getWidget<CheckBoxWidget>("enable-internet");
|
||||
assert( internet_enabled != NULL );
|
||||
internet_enabled->setState( UserConfigParams::m_internet_status
|
||||
==RequestManager::IPERM_ALLOWED );
|
||||
CheckBoxWidget* stats = getWidget<CheckBoxWidget>("enable-hw-report");
|
||||
assert( stats != NULL );
|
||||
LabelWidget *stats_label = getWidget<LabelWidget>("label-hw-report");
|
||||
assert( stats_label );
|
||||
stats->setState(UserConfigParams::m_hw_report_enable);
|
||||
stats->setState(UserConfigParams::m_hw_report_enable);
|
||||
|
||||
getWidget<CheckBoxWidget>("enable-lobby-chat")
|
||||
->setState(UserConfigParams::m_lobby_chat);
|
||||
|
||||
CheckBoxWidget* chat = getWidget<CheckBoxWidget>("enable-lobby-chat");
|
||||
LabelWidget* chat_label = getWidget<LabelWidget>("label-lobby-chat");
|
||||
|
||||
if(news->getState())
|
||||
if(internet_enabled->getState())
|
||||
{
|
||||
stats_label->setVisible(true);
|
||||
stats->setVisible(true);
|
||||
stats->setState(UserConfigParams::m_hw_report_enable);
|
||||
chat_label->setVisible(true);
|
||||
chat->setVisible(true);
|
||||
chat->setState(UserConfigParams::m_lobby_chat);
|
||||
}
|
||||
else
|
||||
{
|
||||
stats_label->setVisible(false);
|
||||
stats->setVisible(false);
|
||||
chat_label->setVisible(false);
|
||||
chat->setVisible(false);
|
||||
}
|
||||
CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty");
|
||||
assert( difficulty != NULL );
|
||||
@ -186,6 +192,9 @@ void OptionsScreenGeneral::eventCallback(Widget* widget, const std::string& name
|
||||
chat_label->setVisible(false);
|
||||
stats->setVisible(false);
|
||||
stats_label->setVisible(false);
|
||||
// Disable this, so that the user has to re-check this if
|
||||
// enabled later (for GDPR compliance).
|
||||
UserConfigParams::m_hw_report_enable = false;
|
||||
PlayerProfile* profile = PlayerManager::getCurrentPlayer();
|
||||
if (profile != NULL && profile->isLoggedIn())
|
||||
profile->requestSignOut();
|
||||
|
Loading…
Reference in New Issue
Block a user