public override void Render(RenderInfo info) { if (info == null) { return; } info.Camera = Editing.Camera; if (layers[currentLayer].Layer is EntityLayer) { DrawEntities(info, layers[currentLayer].Layer as EntityLayer); } font.DrawString(info, layers[currentLayer].Name, new Vector2(10, PhantomGame.Game.Resolution.Height - 30), Color.White); base.Render(info); }
public void RenderAt(RenderInfo info, Vector2 position, float scale, float orientation) { //if (Rect != null) // Rect.RenderFrame(info, 0, position + HalfSize * scale / this.relativeSize, new Vector2(HalfSize.X * 2, HalfSize.Y * 2 - 2) * scale / this.relativeSize, 0, Color.Yellow); for (int i = 0; i < text.Count; i++) { Vector2 p = position + text[i].Position.RotateBy(orientation) * scale; Color c = text[i].Color; if (i == hoveringLink) { c = colors[Math.Min(2, colors.Length - 1)]; } font.DrawString(info, text[i].Text, p, c, scale, orientation); if (text[i].Reference.Length > 0) { Rect.RenderFrame(info, 0, p + new Vector2(text[i].Size.X * 0.5f, text[i].Size.Y * 0.9f) * scale, new Vector2(text[i].Size.X * scale, 2), 0, c); } } }