Name popups *Popup and give scripts, scenes and classes matching names

Every popup is now called *Popup instead of *Window in its file, root node,
node name, class and variable, and PopupWindow becomes BasePopup. Player is
PlayerRow, SongListObject is SongRow and Character is CharacterCard. Script
files are snake_case and scene files PascalCase, each matching its class or
root node, and LightGrayTheme.tres is light_gray_theme.tres.
This commit is contained in:
Sansan committed 2026-10-06 11:22:39 +02:00
1 parent b7d67b573e
commit 390da577d7
78 files changed
+281 -258

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
class_name QRPopup
extends BasePopup
@onready
var qr_panel: Panel = $QRPanel
@onready
var qr_code_rect: QRCodeRect = $QRPanel/QRCodeRect
@onready
var url_label: Label = $QRPanel/URLLabel
func _ready() -> void:
qr_code_rect.light_module_color = Color.WHITE
qr_code_rect.dark_module_color = Color.BLACK
qr_code_rect.quiet_zone_size = 4
# Generate QR code for the search URL
var url: String = Settings.default_path + "/search"
qr_code_rect.data = url
url_label.text = qr_code_rect.data
GameLog.debug("QR code generated for: ", url)
func open() -> void:
super()
# Regenerate QR code in case settings changed
var url: String = Settings.default_path + "/search"
qr_code_rect.data = url
url_label.text = qr_code_rect.data