Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions OverlayPlugin.Common/IOverlayPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public interface IOverlayPreset
string Url { get; }
int[] Size { get; }
bool Locked { get; }
bool IsOverlayPreset { get; }
bool IsSharedPreset { get; }
List<string> Supports { get; }
}
}
Expand Down
4 changes: 4 additions & 0 deletions OverlayPlugin.Core/Controls/NewOverlayDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ private Dictionary<string, OverlayPreset> PreparePresetCombo(ComboBox cbPreset)

foreach (var item in registry.OverlayPresets)
{
if (!item.IsOverlayPreset)
continue;
cbPreset.Items.Add(item);
}

Expand Down Expand Up @@ -265,6 +267,8 @@ class OverlayPreset : IOverlayPreset
[JsonIgnore]
public int[] Size { get; set; }
public bool Locked { get; set; }
public bool IsOverlayPreset { get; set; } = true;
public bool IsSharedPreset { get; set; } = true;
public List<string> Supports { get; set; }

[JsonExtensionData]
Expand Down
2 changes: 2 additions & 0 deletions OverlayPlugin.Core/Controls/WSConfigPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ private void RebuildOverlayOptions()

foreach (var preset in _registry.OverlayPresets)
{
if (!preset.IsSharedPreset)
continue;
cbOverlay.Items.Add(new
{
label = preset.Name,
Expand Down
4 changes: 3 additions & 1 deletion OverlayPlugin.Core/EventSources/CactbotEventSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -739,13 +739,15 @@ private void StopFileWatcher()
watchers = null;
}

struct OverlayPreset : IOverlayPreset
class OverlayPreset : IOverlayPreset
{
public string Name { get; set; }
public string Type { get { return "MiniParse"; } }
public string Url { get; set; }
public int[] Size { get; set; }
public bool Locked { get; set; }
public bool IsOverlayPreset { get; set; } = true;
public bool IsSharedPreset { get; set; } = true;
public List<string> Supports { get { return new List<string> { "modern" }; } }
}

Expand Down