Exemplo n.º 1
0
        public override void Reset()
        {
            base.Reset();

            Add(makeBox(Anchor.TopLeft));
            Add(makeBox(Anchor.TopRight));
            Add(makeBox(Anchor.BottomLeft));
            Add(makeBox(Anchor.BottomRight));
            Add(movingBox = makeBox(Anchor.Centre));

            movingBox.Transforms.Add(new TransformPosition
            {
                StartValue = Vector2.Zero,
                EndValue   = new Vector2(0, 100),
                StartTime  = start_time,
                EndTime    = start_time + duration,
                LoopCount  = -1,
                LoopDelay  = duration * 3
            });
            movingBox.Transforms.Add(new TransformPosition
            {
                StartValue = new Vector2(0, 100),
                EndValue   = new Vector2(100, 100),
                StartTime  = start_time + duration,
                EndTime    = start_time + duration * 2,
                LoopCount  = -1,
                LoopDelay  = duration * 3
            });
            movingBox.Transforms.Add(new TransformPosition
            {
                StartValue = new Vector2(100, 100),
                EndValue   = new Vector2(100, 0),
                StartTime  = start_time + duration * 2,
                EndTime    = start_time + duration * 3,
                LoopCount  = -1,
                LoopDelay  = duration * 3
            });
            movingBox.Transforms.Add(new TransformPosition
            {
                StartValue = new Vector2(100, 0),
                EndValue   = Vector2.Zero,
                StartTime  = start_time + duration * 3,
                EndTime    = start_time + duration * 4,
                LoopCount  = -1,
                LoopDelay  = duration * 3
            });

            Add(new ContextMenuContainer());
        }
Exemplo n.º 2
0
 public TestCaseContextMenu()
 {
     Add(new ContextMenuContainer
     {
         RelativeSizeAxes = Axes.Both,
         Children         = new[]
         {
             makeBox(Anchor.TopLeft),
             makeBox(Anchor.TopRight),
             makeBox(Anchor.BottomLeft),
             makeBox(Anchor.BottomRight),
             movingBox = makeBox(Anchor.Centre),
         }
     });
 }