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:
@@ -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")
|
||||
Reference in New Issue
Block a user