Ejemplo n.º 1
0
        private static void animateColor(object o, ButtonPressedArgs args)
        {
            Actor actor = (Actor)o;

            Color endColor;

            if (toggled)
            {
                endColor = Color.New(0, 0, 255, 255);
            }
            else
            {
                endColor = Color.New(0, 255, 0, 255);
            }

            actor.SaveEasingState();
            actor.EasingDuration  = 500;
            actor.EasingMode      = AnimationMode.Linear;
            actor.BackgroundColor = endColor;
            actor.RestoreEasingState();

            toggled = !toggled;

            args.RetVal = false;
        }
Ejemplo n.º 2
0
        public void LogPlayerInput(object sender, ButtonPressedArgs e)
        {
            var strgs = CollectData();

            AddValue(ref strgs, e.ButtonName);
            WriteLine(strgs);
        }
 protected void HandleRightArrowButtonPressEvent(object o, ButtonPressedArgs args)
 {
     if (args.Event.ClickCount == 1 || args.Event.ClickCount % 2 != 1)
     {
         HandlePostionFromIndex += 1;
     }
     args.RetVal = true;
 }
Ejemplo n.º 4
0
        private static void animateRotation(object o, ButtonPressedArgs args)
        {
            Actor actor = (Actor)o;

            actor.SaveEasingState();
            actor.EasingDuration = 1000;
            actor.SetRotationAngle(RotateAxis.YAxis, 360.0f);
            actor.RestoreEasingState();

            actor.TransitionStopped += onTransitionStopped;

            args.RetVal = false;
        }
 protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
 {
     if (args.Event.Button == 3)
     {
         float x, y;
         args.Event.GetCoords(out x, out y);
         TransformStagePoint(x, y, out x, out y);
         if (y < Height * 0.5f)
         {
             SlideOut();
         }
         args.RetVal = true;
     }
     else
     {
     }
 }
Ejemplo n.º 6
0
        protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
        {
            Global.GrabPointer(this);

            float x1; float y1; float x2;

            args.Event.GetCoords(out x1, out y1);
            button.GetTransformedPosition(out x2, out y1);

            if ((x2 + button.Width) < x1)
            {
                //right side increase
                Value += 0.1f;
            }
            else if (x2 > x1)
            {
                //left side decrease
                Value -= 0.1f;
            }

            args.RetVal = true;
        }
        protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
        {
            Global.GrabPointer (this);

            float x1; float y1; float x2;
            args.Event.GetCoords (out x1, out y1);
            button.GetTransformedPosition (out x2, out y1);

            if ((x2 + button.Width) < x1) {
                //right side increase
                Value += 0.1f;
            } else if (x2 > x1) {
                //left side decrease
                Value -= 0.1f;
            }

            args.RetVal = true;
        }
        protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
        {
            if (args.Event.Button == 3) {
                float x, y;
                args.Event.GetCoords (out x, out y);
                TransformStagePoint (x, y, out x, out y);
                if (y < Height*0.5f)
                    SlideOut ();
                args.RetVal = true;
            } else {

            }
        }
 protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
 {
     State |= 2;
     args.RetVal = !BubbleEvents;
 }
Ejemplo n.º 10
0
 protected virtual void HandleButtonPressEvent(object o, ButtonPressedArgs args)
 {
     State      |= 2;
     args.RetVal = !BubbleEvents;
 }
 protected void HandleRightArrowButtonPressEvent(object o, ButtonPressedArgs args)
 {
     if (args.Event.ClickCount==1 || args.Event.ClickCount%2!=1)
         HandlePostionFromIndex += 1;
     args.RetVal = true;
 }