Add Settings, Account, Bug Reports, and Leaderboard

Server:
- New SOR.Support project: SubmitBugReport, GetLeaderboard, GetAccountProfile handlers
- New SOR.Database support schema: BugReport + BugReportResponse entities + SupportDbContext
- EF migration: Migrations/Support/AddSupport
- Admin panel: Bug Reports list + detail pages with reply-to-submitter flow
- Admin NavMenu: Support section with Bug Reports link
- Reply creates chat.Notification (type "admin_response") for in-game mailbox

Client:
- Settings autoload (Settings.gd): music/sfx volume+mute, persisted to user://settings.cfg
- SettingsScreen: sliders + mute CheckButtons wired to Settings autoload
- AccountScreen: profile (display name, OP, rank score) + mailbox (admin_response notifications)
- LeaderboardScreen: paginated ranked player list, caller highlighted in blue
- BugReportDialog: category/title/description/steps form, submits via support.submit_bug_report
- MainScreen: new Leaderboard, Account, Settings, Report a Bug navigation buttons

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-06 20:14:12 -05:00
co-authored by Claude Happy
parent c4ef720570
commit a482cc5319
33 changed files with 2107 additions and 14 deletions
@@ -0,0 +1,143 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://scenes/settings/settings_screen.gd" id="1_set"]
[node name="SettingsScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_set")
[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.094, 0.094, 0.137, 1.0)
[node name="Layout" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 0
[node name="TopBar" type="MarginContainer" parent="Layout"]
layout_mode = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_top = 8
theme_override_constants/margin_bottom = 8
[node name="TopBarInner" type="HBoxContainer" parent="Layout/TopBar"]
layout_mode = 2
custom_minimum_size = Vector2(0, 40)
theme_override_constants/separation = 10
[node name="BackBtn" type="Button" parent="Layout/TopBar/TopBarInner"]
unique_name_in_owner = true
layout_mode = 2
custom_minimum_size = Vector2(40, 40)
text = "←"
theme_override_font_sizes/font_size = 18
[node name="TitleLabel" type="Label" parent="Layout/TopBar/TopBarInner"]
layout_mode = 2
size_flags_horizontal = 3
text = "Settings"
vertical_alignment = 1
theme_override_font_sizes/font_size = 18
[node name="HSep" type="HSeparator" parent="Layout"]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="Layout"]
layout_mode = 2
size_flags_vertical = 3
horizontal_scroll_mode = 0
[node name="Content" type="VBoxContainer" parent="Layout/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="ContentMargin" type="MarginContainer" parent="Layout/ScrollContainer/Content"]
layout_mode = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_bottom = 20
[node name="Sections" type="VBoxContainer" parent="Layout/ScrollContainer/Content/ContentMargin"]
layout_mode = 2
theme_override_constants/separation = 24
[node name="AudioSection" type="VBoxContainer" parent="Layout/ScrollContainer/Content/ContentMargin/Sections"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="AudioLabel" type="Label" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection"]
layout_mode = 2
text = "AUDIO"
modulate = Color(0.6, 0.6, 0.65, 1.0)
theme_override_font_sizes/font_size = 11
[node name="MusicRow" type="HBoxContainer" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="MusicLabel" type="Label" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/MusicRow"]
layout_mode = 2
custom_minimum_size = Vector2(100, 0)
text = "Music"
vertical_alignment = 1
theme_override_font_sizes/font_size = 14
[node name="MusicSlider" type="HSlider" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/MusicRow"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
custom_minimum_size = Vector2(0, 32)
min_value = 0.0
max_value = 1.0
step = 0.01
value = 1.0
[node name="MusicMuteBtn" type="CheckButton" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/MusicRow"]
unique_name_in_owner = true
layout_mode = 2
text = "Mute"
theme_override_font_sizes/font_size = 13
[node name="SfxRow" type="HBoxContainer" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="SfxLabel" type="Label" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/SfxRow"]
layout_mode = 2
custom_minimum_size = Vector2(100, 0)
text = "SFX"
vertical_alignment = 1
theme_override_font_sizes/font_size = 14
[node name="SfxSlider" type="HSlider" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/SfxRow"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
custom_minimum_size = Vector2(0, 32)
min_value = 0.0
max_value = 1.0
step = 0.01
value = 1.0
[node name="SfxMuteBtn" type="CheckButton" parent="Layout/ScrollContainer/Content/ContentMargin/Sections/AudioSection/SfxRow"]
unique_name_in_owner = true
layout_mode = 2
text = "Mute"
theme_override_font_sizes/font_size = 13
@@ -0,0 +1,42 @@
extends Control
## Settings screen — audio volume and mute controls.
## Reads initial values from the Settings autoload and writes back on change.
@onready var back_btn : Button = %BackBtn
@onready var music_slider : HSlider = %MusicSlider
@onready var music_mute_btn : CheckButton = %MusicMuteBtn
@onready var sfx_slider : HSlider = %SfxSlider
@onready var sfx_mute_btn : CheckButton = %SfxMuteBtn
# ── Lifecycle ─────────────────────────────────────────────────────────────────
func _ready() -> void:
# Populate controls from current settings (no signal spam).
music_slider.set_value_no_signal(Settings.music_volume)
music_mute_btn.set_pressed_no_signal(Settings.music_muted)
sfx_slider.set_value_no_signal(Settings.sfx_volume)
sfx_mute_btn.set_pressed_no_signal(Settings.sfx_muted)
_refresh_slider_states()
back_btn.pressed.connect(_on_back)
music_slider.value_changed.connect(func(v): Settings.music_volume = v)
music_mute_btn.toggled.connect(func(on):
Settings.music_muted = on
_refresh_slider_states())
sfx_slider.value_changed.connect(func(v): Settings.sfx_volume = v)
sfx_mute_btn.toggled.connect(func(on):
Settings.sfx_muted = on
_refresh_slider_states())
# ── Helpers ───────────────────────────────────────────────────────────────────
func _refresh_slider_states() -> void:
music_slider.editable = not Settings.music_muted
sfx_slider.editable = not Settings.sfx_muted
music_slider.modulate = Color(1, 1, 1, 0.4 if Settings.music_muted else 1.0)
sfx_slider.modulate = Color(1, 1, 1, 0.4 if Settings.sfx_muted else 1.0)
func _on_back() -> void:
get_tree().change_scene_to_file("res://scenes/main/MainScreen.tscn")