public virtual void Draw() { if (!CanDoUpdates()) { return; } PreDrawCallback?.Invoke(this, new EventArgs()); UpdateTexture(); if (DashboardOverlay != null && DashboardOverlay.IsVisible()) { DashboardOverlay.SetTexture(ref _textureData); DashboardOverlay.Show(); } if (InGameOverlay != null && InGameOverlay.IsVisible()) { InGameOverlay.SetTexture(ref _textureData); InGameOverlay.Show(); } PostDrawCallback?.Invoke(this, new EventArgs()); }
public virtual void Draw() { if (!CanDoUpdates()) { return; } PreDrawCallback?.Invoke(this, new EventArgs()); var newbitmap = _browser.ScreenshotAsync().Result; if (newbitmap != null) { if (_bitmap != null) { _bitmap.Dispose(); } _bitmap = newbitmap; _browserDidUpdate = true; } UpdateTexture(); if (_bitmap != null) { if (DashboardOverlay != null && DashboardOverlay.IsVisible()) { DashboardOverlay.SetTexture(ref _textureData); DashboardOverlay.Show(); } if (InGameOverlay != null && InGameOverlay.IsVisible()) { InGameOverlay.SetTexture(ref _textureData); InGameOverlay.Show(); } } PostDrawCallback?.Invoke(this, new EventArgs()); }