Rework popups and fix blurry text and player list layout

Popups:
- All nine popups now extend a shared PopupWindow class with open(),
  close() and toggle(), instead of each copying its own close-on-click
  code. Popups that need cleanup override close().
- A click outside a popup closed it and also pressed whatever was
  underneath, e.g. Reset playlist. The closing click is now consumed.
- Popups used Godot's see-through default panel, so the song list and
  titles showed through. They now use an opaque popup theme, and a
  backdrop dims the window behind them.
- The main window root now fills the screen, so the backdrop covers it.

Text and images:
- Many labels and buttons forced nearest filtering, which made text and
  icons jagged when the window is not 1920x1080. They now use the
  default smooth filtering. Only the pixel-art "no character" picture
  keeps nearest filtering when the winner window enlarges it.

Player list:
- A long player name pushed that row's character and buttons to the
  right. Names now take the free space and shorten with an ellipsis, so
  all rows line up and use the full width of the panel.
This commit is contained in:
Sansan committed 2026-10-05 21:40:40 +02:00
1 parent 7beaa7ee5c
commit 65b73e3570
27 files changed
+304 -149

No files matched your search

+9 -24
View File
@@ -16,6 +16,7 @@
[ext_resource type="PackedScene" uid="uid://btupbowehiyyu" path="res://QRWindow.tscn" id="15_qr_window"]
[ext_resource type="PackedScene" uid="uid://cp54idaudb8dp" path="res://AboutWindow.tscn" id="16_about_window"]
[ext_resource type="PackedScene" uid="uid://cxlsmxnrp0agh" path="res://WinnerWindow.tscn" id="17_winner_window"]
[ext_resource type="Theme" path="res://popup_theme.tres" id="popup_theme"]
[sub_resource type="LabelSettings" id="LabelSettings_ychxr"]
font_size = 25
@@ -69,7 +70,11 @@ events = [SubResource("InputEventKey_ujjlu")]
[node name="Control" type="Control" unique_id=407149696]
layout_mode = 3
anchors_preset = 0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_eu0t5")
[node name="TopPanelContainer" type="PanelContainer" parent="." unique_id=663404711]
@@ -78,7 +83,6 @@ offset_right = 1920.0
offset_bottom = 56.0
[node name="Title" type="Label" parent="." unique_id=1187907861]
texture_filter = 1
layout_mode = 0
offset_left = 64.0
offset_top = 12.0
@@ -120,14 +124,12 @@ follow_focus = true
script = ExtResource("7_dj026")
[node name="MusicList" type="VBoxContainer" parent="MusicListPanel/ScrollContainer" unique_id=373398568]
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 10
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=498283761]
texture_filter = 1
layout_mode = 0
offset_left = 1216.0
offset_top = 128.0
@@ -138,7 +140,6 @@ vertical_scroll_mode = 3
script = ExtResource("2_gxtxm")
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer" unique_id=1215162949]
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
@@ -151,7 +152,6 @@ offset_right = 1152.0
offset_bottom = 384.0
[node name="SoundtrackLabel" type="Label" parent="VBoxContainer" unique_id=173147793]
texture_filter = 1
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
label_settings = SubResource("LabelSettings_qspbu")
@@ -159,7 +159,6 @@ horizontal_alignment = 1
autowrap_mode = 2
[node name="SongLabel" type="Label" parent="VBoxContainer" unique_id=1687490027]
texture_filter = 1
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
label_settings = SubResource("LabelSettings_3m52w")
@@ -195,7 +194,6 @@ custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
[node name="Label" type="Label" parent="Players/VBoxContainer/HBoxContainer" unique_id=1331357386]
texture_filter = 1
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
size_flags_horizontal = 3
@@ -205,7 +203,6 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="AddPlayersButton" type="TextureButton" parent="Players/VBoxContainer/HBoxContainer" unique_id=634410148]
texture_filter = 1
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
size_flags_horizontal = 8
@@ -232,7 +229,6 @@ placeholder_text = "Player name"
script = ExtResource("7_qsdfy")
[node name="AddPlayerButton" type="Button" parent="Players/VBoxContainer/AddPlayerContainer" unique_id=245001313]
texture_filter = 1
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
text = "Add"
@@ -246,13 +242,14 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_k1ygi")
[node name="ScrollContainer" type="ScrollContainer" parent="Players/VBoxContainer" unique_id=1000000001]
layout_mode = 2
size_flags_vertical = 15
horizontal_scroll_mode = 0
[node name="PlayersListVBoxContainer" type="VBoxContainer" parent="Players/VBoxContainer/ScrollContainer" unique_id=1000000002]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 15
[node name="ResetPlaylistButton" type="Button" parent="." unique_id=1754155620]
texture_filter = 1
layout_mode = 0
offset_left = 1360.0
offset_top = 64.0
@@ -263,7 +260,6 @@ action_mode = 0
text = "Reset playlist"
[node name="ResetPointsButton" type="Button" parent="." unique_id=942880776]
texture_filter = 1
layout_mode = 0
offset_left = 1488.0
offset_top = 64.0
@@ -274,7 +270,6 @@ action_mode = 0
text = "Reset points"
[node name="SyncButton" type="Button" parent="." unique_id=1228313556]
texture_filter = 1
layout_mode = 0
offset_left = 1616.0
offset_top = 64.0
@@ -285,7 +280,6 @@ action_mode = 0
text = "Sync soundtracks"
[node name="SoundTestButton" type="Button" parent="." unique_id=1332971879]
texture_filter = 1
layout_mode = 0
offset_left = 1776.0
offset_top = 64.0
@@ -296,7 +290,6 @@ action_mode = 0
text = "Sound test"
[node name="ShowAnswerButton" type="Button" parent="." unique_id=415388039]
texture_filter = 1
layout_mode = 0
offset_left = 65.0
offset_top = 944.0
@@ -308,7 +301,6 @@ shortcut = SubResource("Shortcut_a7fvb")
text = "Show answer"
[node name="NextButton" type="Button" parent="." unique_id=1744703488]
texture_filter = 1
layout_mode = 0
offset_left = 193.0
offset_top = 944.0
@@ -321,7 +313,6 @@ shortcut = SubResource("Shortcut_d6fml")
text = "Randomize new track"
[node name="SearchButton" type="Button" parent="." unique_id=1782453581]
texture_filter = 1
layout_mode = 0
offset_left = 1354.0
offset_top = 8.0
@@ -333,7 +324,6 @@ shortcut = SubResource("Shortcut_fbju4")
text = "Search"
[node name="SettingsButton" type="Button" parent="." unique_id=1193400323]
texture_filter = 1
layout_mode = 0
offset_left = 1442.0
offset_top = 8.0
@@ -344,7 +334,6 @@ action_mode = 0
text = "Settings"
[node name="StatisticsButton" type="Button" parent="." unique_id=2045021269]
texture_filter = 1
layout_mode = 0
offset_left = 1530.0
offset_top = 8.0
@@ -355,7 +344,6 @@ action_mode = 0
text = "Statistics"
[node name="ShortcutsButton" type="Button" parent="." unique_id=2066498226]
texture_filter = 1
layout_mode = 0
offset_left = 1626.0
offset_top = 8.0
@@ -366,7 +354,6 @@ action_mode = 0
text = "Shortcuts"
[node name="AboutButton" type="Button" parent="." unique_id=1057035253]
texture_filter = 1
layout_mode = 0
offset_left = 1722.0
offset_top = 8.0
@@ -377,7 +364,6 @@ action_mode = 0
text = "About"
[node name="QRButton" type="Button" parent="." unique_id=2021908559]
texture_filter = 1
layout_mode = 0
offset_left = 1802.0
offset_top = 8.0
@@ -440,12 +426,12 @@ offset_right = 1262.0
offset_bottom = 860.0
[node name="StatisticsPopupPanel" type="PopupPanel" parent="." unique_id=298311407]
theme = ExtResource("popup_theme")
oversampling_override = 1.0
initial_position = 2
size = Vector2i(450, 100)
[node name="Label" type="Label" parent="StatisticsPopupPanel" unique_id=548316493]
texture_filter = 1
offset_left = 4.0
offset_top = 4.0
offset_right = 446.0
@@ -454,7 +440,6 @@ text = "Statistics"
horizontal_alignment = 1
[node name="StatisticsLabel" type="Label" parent="StatisticsPopupPanel" unique_id=58226477]
texture_filter = 1
offset_left = 4.0
offset_top = 4.0
offset_right = 446.0