public void Set() { if (GameManager.Instance.GManager.GRef.Attacher == null) { return; } UIScale = D3Window.ActualHeight / 1200d; Root.Width = D3Window.ActualWidth / UIScale; Root.RenderTransform = new ScaleTransform(UIScale, UIScale, 0, 0); if (MainBar != null) { Int32Rect P = PInvokers.GetClientRect(D3Window.Process.MainWindowHandle); Size = new Size(Enigma.D3.Engine.Current.VideoPreferences.x0C_DisplayMode.x20_Width, Enigma.D3.Engine.Current.VideoPreferences.x0C_DisplayMode.x24_Height); MainBar.Width = (P.Width / UIScale); ItemOverlay.Width = (P.Width / UIScale); if (Search <LargeMap>("LargeMap") != null) { Search <LargeMap>("LargeMap").Width = (P.Width / UIScale); } } }
public void OnSizeChanged() { if ((Process == null)) { return; } if (Config._.FKConfig.General.FKSettings.UseAlternativeOverlay) { IsOverlayVisible(); } Int32Rect clientRect = PInvokers.GetClientRect(ParentHandle); if (!clientRect.Equals(ParentSize)) { Window.Width = clientRect.Width; Window.Height = clientRect.Height; Left = clientRect.X; Top = clientRect.Y; ParentSize = clientRect; } if (ParentSize == default(Int32Rect)) { ParentSize = clientRect; Process Process = PInvokers.CurrentWindow(); if (Process == null) { return; } ParentHandle = Process.MainWindowHandle; } }