/// <summary> /// Draw any feedback that is appropriate to the current drop state. /// </summary> /// <remarks> /// Any drawing is done over the top of the ListView. This operation should disturb /// the Graphic as little as possible. Specifically, do not erase the area into which /// you draw. /// </remarks> /// <param name="g">A Graphic for drawing</param> /// <param name="bounds">The contents bounds of the ListView (not including any header)</param> public override void DrawFeedback(Graphics g, Rectangle bounds) { g.SmoothingMode = ObjectListView.SmoothingMode; switch (DropTargetLocation) { case DropTargetLocation.Background: DrawFeedbackBackgroundTarget(g, bounds); break; case DropTargetLocation.Item: DrawFeedbackItemTarget(g, bounds); break; case DropTargetLocation.AboveItem: DrawFeedbackAboveItemTarget(g, bounds); break; case DropTargetLocation.BelowItem: DrawFeedbackBelowItemTarget(g, bounds); break; } if (Billboard != null) { Billboard.Draw(ListView, g, bounds); } }
public override void Draw(Renderer renderer) { fadeInOut.Update(renderer.Time.PausableDtMs); float alpha = Game.Instance.Renderer.EntityManager["respawn_spot"].GetFloat("alpha"); Vector3 color = Game.Instance.Renderer.EntityManager["respawn_spot"].GetVector3("color"); Billboard billboard = Game.Instance.Renderer.Billboard; billboard.Texture = texture; billboard.Reposition(Position, fadeInOut.Value, 1000, new Vector4(color.X, color.Y, color.Z, alpha)); billboard.Draw(Game.Instance.Renderer.Camera.View, Game.Instance.Renderer.Camera.Projection); }