PalacePal/Pal.Client/WindowSystemExtensions.cs
2022-10-30 11:02:49 +01:00

15 lines
359 B
C#

using Dalamud.Interface.Windowing;
using System.Linq;
namespace Pal.Client
{
internal static class WindowSystemExtensions
{
public static T? GetWindow<T>(this WindowSystem windowSystem)
where T : Window
{
return windowSystem.Windows.Select(w => w as T).FirstOrDefault(w => w != null);
}
}
}