Skip to content

Commit 39e0f2f

Browse files
authored
enhancement: configurable dimmed background for EventWindow
1 parent a0b9159 commit 39e0f2f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Framework/Intersect.Framework.Core/Configuration/ClientConfiguration.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public static ClientConfiguration LoadAndSave(string? filePath = default) =>
9090

9191
public static List<string> DefaultTypewriterSounds => ["octave-beep-tapped.wav"];
9292

93+
private const bool DefaultDimmedEventWindowBackground = true;
94+
9395
#endregion
9496

9597
#region Static Properties and Methods
@@ -258,6 +260,11 @@ public void Validate()
258260

259261
public List<string> TypewriterSounds { get; set; } = DefaultTypewriterSounds;
260262

263+
/// <summary>
264+
/// Adds dimmed background to EventWindow.
265+
/// </summary>
266+
public bool DimmedEventWindowBackground { get; set; } = DefaultDimmedEventWindowBackground;
267+
261268
#region Hidden Properties
262269

263270
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]

Intersect.Client.Core/Interface/Game/EventWindow.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ private EventWindow(Canvas gameCanvas, Dialog dialog) : base(gameCanvas, nameof(
163163
this
164164
);
165165

166-
MakeModal(dim: true);
166+
var dimmedBackground = ClientConfiguration.Instance.DimmedEventWindowBackground;
167+
MakeModal(dim: dimmedBackground);
167168
BringToFront();
168169
Interface.InputBlockingComponents.Add(this);
169170
ApplicationContext.CurrentContext.Logger?.LogTrace("Event window opened");

0 commit comments

Comments
 (0)