public static void Add(Gfx g, int Timer, Color c) { if (FadeAnimations.ContainsKey(c)) { FadeAnimations[c].Add(g, Timer); } else { FadeAnimations.Add(c, new Dictionary <Gfx, int>()); FadeAnimations[c].Add(g, Timer); FadeAnimationTimers.Add(c, Timer); } }
public static bool IsDragging(Gfx g) { if (JustLeftClicked(g)) { DraggedTarget = g; } if (DraggedTarget == g && !User.Pressing(MouseButtons.LeftMouseButton)) { DraggedTarget = new Gfx2D(); } if (DraggedTarget == g) { return(true); } else { return(false); } }
public Button(Gfx g, Action a) { ButtonGraphic = g; ButtonClickAction = a; }
public static bool JustLeftClicked(Gfx g) { return(g.ContainsCursor() && User.JustLeftClicked()); }