From a1be7768604f0c0830bb90241d8d1c3772db4833 Mon Sep 17 00:00:00 2001 From: Ivan Martell Date: Thu, 1 Aug 2024 19:45:53 +0900 Subject: [PATCH] Made overlay more responsive --- LittleWarGameClient/GameForm.Designer.cs | 3 +-- LittleWarGameClient/OverlayForm.Designer.cs | 1 - LittleWarGameClient/OverlayForm.cs | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/LittleWarGameClient/GameForm.Designer.cs b/LittleWarGameClient/GameForm.Designer.cs index 74bb624..697c54a 100644 --- a/LittleWarGameClient/GameForm.Designer.cs +++ b/LittleWarGameClient/GameForm.Designer.cs @@ -100,7 +100,6 @@ private void InitializeComponent() // // loadingTimer // - loadingTimer.Enabled = false; loadingTimer.Interval = 1000; loadingTimer.Tick += loadingTimer_Tick; // @@ -149,6 +148,6 @@ private void InitializeComponent() private PictureBox mainImage; private TextBox loadingText; private System.Windows.Forms.Timer loadingTimer; - private CefSharp.WinForms.ChromiumWebBrowser webBrowser; + internal CefSharp.WinForms.ChromiumWebBrowser webBrowser; } } diff --git a/LittleWarGameClient/OverlayForm.Designer.cs b/LittleWarGameClient/OverlayForm.Designer.cs index 8721790..51da5d3 100644 --- a/LittleWarGameClient/OverlayForm.Designer.cs +++ b/LittleWarGameClient/OverlayForm.Designer.cs @@ -34,7 +34,6 @@ private void InitializeComponent() // // textTimer // - textTimer.Enabled = false; textTimer.Interval = 1000; textTimer.Tick += textTimer_Tick; // diff --git a/LittleWarGameClient/OverlayForm.cs b/LittleWarGameClient/OverlayForm.cs index 33bd683..0efe889 100644 --- a/LittleWarGameClient/OverlayForm.cs +++ b/LittleWarGameClient/OverlayForm.cs @@ -86,8 +86,8 @@ private void OnGameOverlayActivated(bool overlayActivated) InvokeUI(() => { IsActivated = true; - GameForm.Instance.Visible = false; TransparencyKey = Color.Fuchsia; + GameForm.Instance.ActiveControl = null; }); } else @@ -95,8 +95,8 @@ private void OnGameOverlayActivated(bool overlayActivated) InvokeUI(() => { IsActivated = false; - GameForm.Instance.Visible = true; TransparencyKey = Color.Black; + GameForm.Instance.ActiveControl = GameForm.Instance.webBrowser; }); } }