46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using VDash.Overlay.Actions;
|
|
using VDash.WindowSelectors;
|
|
|
|
namespace VDash.Overlay.Config
|
|
{
|
|
public class WindowOverlayConfig : IOverlayConfig
|
|
{
|
|
public event EventHandler WidthUpdated;
|
|
public WindowOverlayConfig(string name, string key, IWindowSelector selector, bool updateDashboardName, bool destroyOnNoWindowFound)
|
|
{
|
|
Name = name;
|
|
Key = key;
|
|
Selector = selector;
|
|
UpdateDashboardName = updateDashboardName;
|
|
DestroyOnNoWindowFound = destroyOnNoWindowFound;
|
|
}
|
|
public WindowOverlayConfig() { }
|
|
|
|
public string Name { get; set; }
|
|
public string Key { get; set; }
|
|
|
|
public ObservableCollection<IWindowAction> OverlayShownActions { get; private set; } = new ObservableCollection<IWindowAction>();
|
|
public ObservableCollection<IWindowAction> OverlayHiddenActions { get; private set; } = new ObservableCollection<IWindowAction>();
|
|
|
|
public IWindowSelector Selector {get; set; }
|
|
public bool UpdateDashboardName { get; set; } = false;
|
|
public bool DestroyOnNoWindowFound { get; set; } = false;
|
|
float m_Width = 2.5f;
|
|
public float OverlayWidth
|
|
{
|
|
get { return m_Width; }
|
|
set
|
|
{
|
|
m_Width = value;
|
|
WidthUpdated?.Invoke(this, null);
|
|
}
|
|
}
|
|
}
|
|
}
|