Change overlay draw conditions
authorLiza Carvelli <liza@carvel.li>
Tue, 30 Jul 2024 02:47:06 +0000 (04:47 +0200)
committerLiza Carvelli <liza@carvel.li>
Tue, 30 Jul 2024 02:47:06 +0000 (04:47 +0200)
Questionable/Windows/DebugOverlay.cs

index 5d60f4a75abf6b442350f5c464bcad3fe323e3a0..20b572fe24a04d1e44b1f1e890e684fadcaf17f0 100644 (file)
@@ -48,12 +48,7 @@ internal sealed class DebugOverlay : Window
 
     public ushort? HighlightedQuest { get; set; }
 
-    public override bool DrawConditions()
-    {
-        return _configuration.Advanced.DebugOverlay && _clientState is
-                   { IsLoggedIn: true, LocalPlayer: not null, IsPvPExcludingDen: false } &&
-               !_condition[ConditionFlag.OccupiedInCutSceneEvent];
-    }
+    public override bool DrawConditions() => _configuration.Advanced.DebugOverlay;
 
     public override void PreDraw()
     {
@@ -62,6 +57,12 @@ internal sealed class DebugOverlay : Window
 
     public override void Draw()
     {
+        if (_condition[ConditionFlag.OccupiedInCutSceneEvent])
+            return;
+
+        if (_clientState is not { IsLoggedIn: true, LocalPlayer: not null, IsPvPExcludingDen: false })
+            return;
+
         DrawCurrentQuest();
         DrawHighlightedQuest();
     }