Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
            }
        }
Пример #3
0
 public Button(Gfx g, Action a)
 {
     ButtonGraphic     = g;
     ButtonClickAction = a;
 }
Пример #4
0
 public static bool JustLeftClicked(Gfx g)
 {
     return(g.ContainsCursor() && User.JustLeftClicked());
 }