using System; using System.Collections.Generic; using System.Linq; using Cthangover.Core.Games; using Cthangover.Core.Mods; using Cthangover.Core.Settings; using Cthangover.Core.UI.Menu; using Cthangover.Core.UI.Theming; using Cthangover.Mods.Interface.Menu; using Cthangover.Mods.Interface.Theming; using Godot; namespace Cthangover.BaseMenu { /// /// "Play": every game collection as a card — cover, name, description, /// readiness (what is missing and what can be installed), saves and the /// last play date — with New game / Continue / Saves / Install / Configure. /// Data comes from against all installed mods, so /// it works from the front-end where only the menu is loaded. The window is /// the menu shell (, scene game_picker.tscn); /// its footer says whether the games' mods are still compiled in the /// background () or a start is quick. /// public partial class GamePickerPanel : Control { private const float HintRefreshSeconds = 0.5f; private VBoxContainer _list; private Label _hint; private readonly HashSet _sessionInstalled = new(StringComparer.OrdinalIgnoreCase); /// Raised when the player opens a game's saves; the menu shows its save browser. public event Action SavesRequested; public event Action Closed; public override void _Ready() { MenuWindowShell.Style(this, Close); GetNode