public override void Render() { switch (Mode) { case IndicatorMode.Indicator2D: Drawer2D.DrawAlignedText(DwarfGame.SpriteBatch, Text, PlayState.GUI.DefaultFont, Tint, Drawer2D.Alignment.Center, new Rectangle((int)Position.X, (int)Position.Y, 32, 32)); break; case IndicatorMode.Indicator3D: Drawer2D.DrawText(Text, Position, Tint, Color.Transparent); break; } }
public void DebugDraw() { foreach (var pair in Hashes) { foreach (var cell in pair.Value.HashMap) { if (cell.Value != null) { Drawer2D.DrawText(cell.Value.Count + "", cell.Key.ToVector3() + Vector3.One * 0.5f, Color.White, Color.Black); } } } }
public override void Render3D(DwarfGame game, DwarfTime time) { NamedImageFrame frame = new NamedImageFrame("newgui/pointers", 32, 6, 0); foreach (var body in World.UserInterface.BodySelector.CurrentBodies) { if (body.Tags.Contains("Resource")) { Drawer2D.DrawText(body.Name, body.Position, Color.White, Color.Black); BoundingBox bounds = body.BoundingBox; Drawer3D.DrawBox(bounds, Color.Orange, 0.02f, false); Drawer2D.DrawSprite(frame, body.Position + Vector3.One * 0.5f, Vector2.One * 0.5f, Vector2.Zero, new Color(255, 255, 255, 100)); } } }
public override void Render(DwarfGame game, GraphicsDevice graphics, DwarfTime time) { // Draw a bounding box around the currently selected bodies. foreach (Body body in Player.BodySelector.CurrentBodies) { if (body.Tags.Contains("Resource")) { Drawer2D.DrawText(body.Name, body.Position, Color.White, Color.Black); BoundingBox bounds = body.BoundingBox; bounds.Min += Vector3.Up * 0.5f; bounds.Max += Vector3.Up * 0.5f; bounds = bounds.Expand(0.25f); Drawer3D.DrawBox(bounds, Color.Orange, 0.02f, false); } } }
public override void Render(DwarfGame game, GraphicsDevice graphics, DwarfTime time) { NamedImageFrame frame = new NamedImageFrame("newgui/pointers", 32, 6, 0); // Draw a bounding box around the currently selected bodies. foreach (Body body in Player.BodySelector.CurrentBodies) { if (body.Tags.Contains("Resource")) { Drawer2D.DrawText(body.Name, body.Position, Color.White, Color.Black); BoundingBox bounds = body.BoundingBox; bounds.Min += Vector3.Up * 0.5f; bounds.Max += Vector3.Up * 0.5f; bounds = bounds.Expand(0.25f); Drawer3D.DrawBox(bounds, Color.Orange, 0.02f, false); Drawer2D.DrawSprite(frame, bounds.Center(), Vector2.One, Vector2.Zero, new Color(255, 255, 255, 100)); } } }
public override void Render() { Drawer2D.DrawText(Text, Position, Tint, Color.Transparent); }