public void Render(float partialStep) { t.ResetTransformation(); string cursorText = "+"; FontRenderer f = FontRenderer.Instance; t.StartDrawingAlphaTexturedQuads("ascii"); Vector2 textSize = f.TextSize(cursorText); Vector2 Location = Input.Instance.InterpolatedMouseLocation(partialStep); f.RenderTextShadow(cursorText, Location.X - textSize.X / 2f, Location.Y - textSize.Y / 2f); t.Draw(); }
private void Rebuild() { // rebuild VertexBuffer.Dispose(ref bufferText); if (string.IsNullOrEmpty(text)) { return; } f.BeginBatch(); if (!EnableShadow) { f.RenderText(text, Position.X, Position.Y); } else { f.RenderTextShadow(Color, text, Position.X, Position.Y); } f.StopBatch(); bufferText = t.GetVertexBuffer(); }