Character select
- A card only picks its character when it is clicked. Before, every card
watched every click, so clicking below the panel could pick a card
scrolled out of view there.
- Six columns of fixed-size cards that scroll for any number of
characters, with a gap between the cards and the scrollbar.
- Pictures are read as PNG, JPG or WebP by their first bytes, so JPGs no
longer print an error. Names are split into words ("Paper Mario") and
the card under the mouse is highlighted.
Shortcuts
- Alt+Z restarts the song; it was listed as "Reset".
- Grouped by what the keys do, in sentence case, and the panel fits the
list. A test checks that every button shortcut is listed.
Log
- Scrolls to the newest row, alternates row colours and says "Nothing
has happened yet" when empty.
QR
- A title, and the code is set up in one place.
27 lines
687 B
GDScript
27 lines
687 B
GDScript
class_name QRPopup
|
|
extends BasePopup
|
|
## Shows a QR code with the address of the search page on the MusicServer, so players
|
|
## can search for soundtracks on their phones.
|
|
|
|
@onready var qr_panel: Panel = $QRPanel
|
|
@onready var qr_code_rect: QRCodeRect = %QRCodeRect
|
|
@onready var url_label: Label = %URLLabel
|
|
|
|
|
|
func _ready() -> void:
|
|
_show_search_url()
|
|
|
|
|
|
func open() -> void:
|
|
super()
|
|
# Another server may have been picked in the settings since last time
|
|
_show_search_url()
|
|
|
|
|
|
func _show_search_url() -> void:
|
|
var url: String = Settings.default_path + "/search"
|
|
if qr_code_rect.data != url:
|
|
qr_code_rect.data = url
|
|
GameLog.debug("QR code generated for: ", url)
|
|
url_label.text = url
|