2022-10-23 02:38:58 +00:00
|
|
|
|
using Dalamud.Interface.Windowing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Pal.Client
|
|
|
|
|
{
|
|
|
|
|
internal static class WindowSystemExtensions
|
|
|
|
|
{
|
2022-10-30 10:02:49 +00:00
|
|
|
|
public static T? GetWindow<T>(this WindowSystem windowSystem)
|
2022-10-23 02:38:58 +00:00
|
|
|
|
where T : Window
|
|
|
|
|
{
|
|
|
|
|
return windowSystem.Windows.Select(w => w as T).FirstOrDefault(w => w != null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|