Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Certus.Core.GameWindow"/> class.
        /// </summary>
        /// <param name="width">The width in pixels of the window, excluding borders.</param>
        /// <param name="height">The height in pixels of the window, excluding borders.</param>
        internal GameWindow(int width, int height)
        {
            this.m_Form = new GameForm(this);
            this.m_Renderer = new Renderer(width, height);

            this.Title = Assembly.GetEntryAssembly().GetName().Name;
            this.BackgroundColor = Color.White;
            this.Icon = Icon.ExtractAssociatedIcon(Assembly.GetEntryAssembly().Location);
            this.Size = new Size(width, height);

            this.m_Form.MinimumSize = this.m_Form.Size;
        }
Example #2
0
 /// <summary>
 /// Renders the game's current state onto the window.
 /// </summary>
 /// <param name="renderer">The <see cref="Certus.Core.Renderer"/> which renders graphics and text onto the window.</param>
 protected virtual void Render(Renderer renderer)
 {
     this.m_Window.Redraw();
 }