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-06 08:32:56 +02:00
1 parent 6288739de0
commit c7d49bc5cc
27 files changed
+304 -149

No files matched your search

+8 -10
View File
@@ -1,4 +1,4 @@
extends Control
extends PopupWindow
@onready
var character_panel: Panel = %CharacterPanel
@@ -46,22 +46,20 @@ func show_grid(player_name: String) -> void:
print("show_grid")
title_label.text = "Select character for " + player_name
close_timer.stop()
self.visible = true
open()
can_select_character = true
Settings.character_select_open = true
func close() -> void:
super()
Settings.character_select_open = false
func _on_character_selected(texture: ImageTexture) -> void:
print("_on_character_selected")
# Not close(): character_select_open stays true until close_timer fires, so the click
# that picked the character does not also select a song behind it
self.visible = false
if can_select_character:
new_new_character_selected.emit(texture)
close_timer.start()
can_select_character = false
func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), character_panel.size).has_point(evLocal.position):
self.visible = false
Settings.character_select_open = false