void Render() { Window.Clear(LetterBoxColor.SFMLColor); Surface.FillColor = Color; Surface.Fill(Color); Draw.GameTarget = Surface; Draw.SpriteBatch.Begin(); // Spritebatch test? if (DrawInactiveScenes) { foreach (Scene scene in Scenes.Reverse()) { if (Scene != scene) { scenesToRender.Add(scene); } if (!scene.DrawScenesBelow) { scenesToRender = new List <Scene>(); if (Scene != scene) { scenesToRender.Add(scene); } } } for (int i = 0; i < scenesToRender.Count; i++) { scenesToRender[i].RenderInternal(); } scenesToRender = new List <Scene>(); } if (Scene != null) { Scene.RenderInternal(); } Draw.SpriteBatch.End(); // Spritebatch test? Draw.ResetTarget(); foreach (var surface in Surfaces) { Draw.Graphic(surface); } Surface.DrawToWindow(this); if (Debugger != null) { Debugger.Render(); } Window.Display(); }
internal void Render() { game.countRendering = false; var tempTarget = Draw.Target; Draw.SetTarget(renderSurface); Draw.Graphic(textPerformance, x, y); if (dismissFor > 0) { Draw.Graphic(textFramesLeft, x, y); } if (Visible) { Draw.Graphic(imgOverlay, x, y); Draw.Graphic(imgOtter, x, y); Draw.Graphic(imgError, x, y); if (countDownTimer > 0) { Draw.Graphic(textCountdown, x, y); } else { Draw.Graphic(imgScrollBarBg, x, y); Draw.Graphic(imgScrollBar, x, y); Draw.Graphic(textInput, x, y); Draw.Graphic(textInputHelp, x, y); Draw.Graphic(textPastCommands, x, y); Draw.Graphic(textCommandsBuffered, x, y); } } else { if (liveConsoleLines > 0) { Draw.Graphic(textPastCommandsLive, x, y); } } if (currentState == stateCamera) { Draw.Graphic(textCamera, x, y); } Draw.SetTarget(tempTarget); renderSurface.DrawToWindow(game); game.countRendering = true; }