2023-02-10 19:48:14 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using Dalamud.Interface.Windowing;
|
2022-10-23 02:38:58 +00:00
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
namespace Pal.Client.Extensions
|
2022-10-23 02:38:58 +00:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
{
|
2023-02-10 19:48:14 +00:00
|
|
|
|
return windowSystem.Windows.OfType<T>().FirstOrDefault();
|
2022-10-23 02:38:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|