implement privacy settings

This commit is contained in:
betalars 2025-06-04 15:25:23 +02:00
parent c1a6cc81c2
commit d4ababc262
4 changed files with 81 additions and 42 deletions

View File

@ -0,0 +1,50 @@
extends VBoxContainer
signal leave_stage
var has_stage:bool = false:
set(stage):
has_stage = stage
if is_node_ready():
if has_stage:
steam_optout.grab_focus()
var current_music_decay:float = 0
@onready var steam_optout: CheckBox = %OptOutSteam
@onready var obscurify_logs: CheckBox = %ObscurifyLogs
func _process(delta: float) -> void:
if current_music_decay > 0:
current_music_decay -= delta
if current_music_decay < 0:
%MusicMixer.play("blend_out")
func _ready() -> void:
update_ui_from_state()
%ResetStats.pressed.connect(reset_all_stats)
%ResetButton.pressed.connect(_on_reset_button_pressed)
%SaveButton.pressed.connect(_on_exit_button_pressed)
func _on_reset_button_pressed():
steam_optout.button_pressed = false
obscurify_logs.button_pressed = true
func update_ui_from_state():
steam_optout.button_pressed = State.disconnect_steam
obscurify_logs.button_pressed = State.obscure_logs
func _on_exit_button_pressed() -> void:
leave_stage.emit()
State.save_settings()
State.leave_stage(self)
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_cancel") and has_stage:
State.leave_stage(self)
func reset_all_stats():
Steam.resetAllStats(true)

View File

@ -0,0 +1 @@
uid://vhppt23pmi6w

View File

@ -1,4 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://u0bwjr5l6nkh"] [gd_scene load_steps=4 format=3 uid="uid://u0bwjr5l6nkh"]
[ext_resource type="Script" uid="uid://vhppt23pmi6w" path="res://logic-scenes/main menu/privacy_settings.gd" id="1_evre2"]
[sub_resource type="InputEventAction" id="InputEventAction_gy6yb"] [sub_resource type="InputEventAction" id="InputEventAction_gy6yb"]
action = &"ui_cancel" action = &"ui_cancel"
@ -7,9 +9,10 @@ pressed = true
[sub_resource type="Shortcut" id="Shortcut_0peu0"] [sub_resource type="Shortcut" id="Shortcut_0peu0"]
events = [SubResource("InputEventAction_gy6yb")] events = [SubResource("InputEventAction_gy6yb")]
[node name="Audio and Language" type="VBoxContainer"] [node name="PrivacyAndDataProtection" type="VBoxContainer"]
offset_right = 1086.0 offset_right = 1086.0
offset_bottom = 860.0 offset_bottom = 860.0
script = ExtResource("1_evre2")
metadata/_tab_index = 1 metadata/_tab_index = 1
[node name="Label" type="Label" parent="."] [node name="Label" type="Label" parent="."]
@ -19,10 +22,9 @@ text = "Privacy and Data Protection"
[node name="Label2" type="Label" parent="."] [node name="Label2" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
text = "\"Frame of Mind - a game of thoughts.\" is a game discussing mental health. We expect some users may want more privacy while playing the game. text = "\"Frame of Mind - a game of thoughts.\" is a game discussing mental health. If you are concerned about your privacy while playing the game, this is what you need to know:
This guide that will help you understand what data is generated and procecced and what to do about it. In a nutshell: We protect your data by storing as little of it as strictly necessary, by not collecting any data on our own and by helping you opt out of Steam collecting usage data.
We protect your data by storing as little of it as strictly nessecary, by not collecting any data on our own and by helping you opt out of Steam collecting usage data. If you think an important security feature is missing, we ask you to submit a bug report or better even, contribute it yourself."
If you think an important secirity feature is missing, we ask you to submit a bug report or better even, contribute it yourself."
autowrap_mode = 2 autowrap_mode = 2
[node name="Label3" type="Label" parent="."] [node name="Label3" type="Label" parent="."]
@ -33,31 +35,33 @@ autowrap_mode = 2
[node name="Label4" type="Label" parent="."] [node name="Label4" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
text = "This game uses plain-text files to store your progress. To make sure Steam has no access to that data, you can disable Cloud Saves in the properties of this game in your library. We encourage you to sync and back up saves on your own." text = "This game uses plain-text files to store your progress. If you don't want Steam accessing that data, you can disable Cloud Saves in the properties of this game in your library. We encourage you to sync and back up saves on your own."
autowrap_mode = 2 autowrap_mode = 2
[node name="Label5" type="Label" parent="."] [node name="Label5" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
theme_type_variation = &"HeaderMedium" theme_type_variation = &"HeaderMedium"
text = "Playtime and Accievements" text = "Playtime and Achievements"
autowrap_mode = 2 autowrap_mode = 2
[node name="Label6" type="Label" parent="."] [node name="Label6" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
text = "To track your playtime and award Steam Acceivements, this game sends data to your Steam Clinet while you are playing. You may opt out. text = "To track your playtime and award Steam Achievements, this game sends data to your Steam Client while you are playing. You can opt out using the checkbox below. Doing so breaks Achievements and Playtime Stats.
You can also hide this game in your library or mark it as private so your friends won't see you playing it. These privacy options are also provided in the game properties." You can hide this game in your library or mark it as private so your friends won't see you playing it. These privacy options can be found in the game properties on Steam.
Please note that this won't prevent Valve from tracking your activity. Please note that we do look at Steam Statistics to understand how our game is doing."
autowrap_mode = 2 autowrap_mode = 2
[node name="Button3" type="Button" parent="."] [node name="OptOutSteam" type="CheckBox" parent="."]
layout_mode = 2
text = "reset acheivements"
[node name="MuteSoundtrack2" type="CheckBox" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
tooltip_text = "All Game Music is safe to stream." tooltip_text = "All Game Music is safe to stream."
text = "disable sharing play data with Steam" text = "disable sharing play data with Steam"
[node name="ResetStats" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 2
text = "reset Statistics and Achievements (cannot be undone!)"
[node name="Label7" type="Label" parent="."] [node name="Label7" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
theme_type_variation = &"HeaderMedium" theme_type_variation = &"HeaderMedium"
@ -66,14 +70,14 @@ autowrap_mode = 2
[node name="Label8" type="Label" parent="."] [node name="Label8" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
text = "Log Files store usage patterns and diagnostic data locally in plain text on your device. To protect your privacy, some information in these logs is obscurified. When reporting a bug, you can choose to include a log to help us figure out what went wrong. Opting out of obscurification can make some specific bugs easier to diagnose." text = "Log Files store usage patterns and diagnostic data locally in plain text on your device. To protect your privacy, some information in these logs is obscured. When reporting a bug, you can choose to include a log to help us figure out what went wrong. Choosing not to obscurify can will make debugging some issues a bit easier."
autowrap_mode = 2 autowrap_mode = 2
[node name="MuteSFX2" type="CheckBox" parent="."] [node name="ObscurifyLogs" type="CheckBox" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
button_pressed = true button_pressed = true
text = "obscurify log files" text = "obscure log files"
[node name="confirm_buttons" type="HSplitContainer" parent="."] [node name="confirm_buttons" type="HSplitContainer" parent="."]
layout_mode = 2 layout_mode = 2
@ -90,26 +94,3 @@ unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
shortcut = SubResource("Shortcut_0peu0") shortcut = SubResource("Shortcut_0peu0")
text = "save and exit" text = "save and exit"
[node name="Popup" type="Popup" parent="."]
size = Vector2i(710, 139)
[node name="VSplitContainer" type="VSplitContainer" parent="Popup"]
offset_right = 40.0
offset_bottom = 40.0
[node name="Label" type="Label" parent="Popup/VSplitContainer"]
layout_mode = 2
text = "Do you really want to erase all play data?
This action cannot be undone!"
[node name="HSplitContainer" type="HSplitContainer" parent="Popup/VSplitContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="Popup/VSplitContainer/HSplitContainer"]
layout_mode = 2
text = "Yes, delete everything!"
[node name="Button2" type="Button" parent="Popup/VSplitContainer/HSplitContainer"]
layout_mode = 2
text = "No"

View File

@ -104,7 +104,14 @@ var current_main_theme:Theme = preload("res://logic-scenes/themes/handwriting.th
if stereo != force_stereo: if stereo != force_stereo:
force_stereo = stereo force_stereo = stereo
settings_changed.emit() settings_changed.emit()
@export var disconnect_steam:bool = false @export var disconnect_steam:bool = false:
set(disconnect):
if disconnect and not disconnect_steam:
Steam.steamShutdown()
Steamworks.has_initialized = false
elif not disconnect and disconnect_steam:
Steamworks._ready()
disconnect_steam = disconnect
@export var obscure_logs:bool = true @export var obscure_logs:bool = true