internal void ApplyWindowParams(WindowParameters parameters) { if (InvokeRequired) { Invoke(new Action(() => { ApplyWndParams(parameters); })); } else { ApplyWndParams(parameters); } }
private void ApplyWndParams(WindowParameters parameters) { if (parameters.Width == 0) { parameters.Width = 800; } if (parameters.Height == 0) { parameters.Height = 600; } wndParams = parameters; Text = WindowParameters.Title; ClientSize = new Size(WindowParameters.Width, WindowParameters.Height); }
} // Hidden constructor /// <summary> /// Creates new <see cref="GameWindow"/> instance with specified window parameters /// </summary> /// <param name="parameters">Window parameters for window</param> public GameWindow(WindowParameters parameters) { ApplyWindowParams(parameters); ResizeRedraw = true; Current = this; }