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; }
/// <summary> /// Draws simple Text. Should only be used for debugging as this creates Text Graphics each time it's called! /// </summary> /// <param name="str">The string to display.</param> /// <param name="size">The size of the Text.</param> /// <param name="x">The X position to render the Text from.</param> /// <param name="y">The Y position to render the Text from.</param> public static void Text(string str, int size, float x = 0, float y = 0) { Draw.Graphic(new OtterText.Text(str, size), x, y); }