コード例 #1
0
 public AnimationContainer()
 {
     InternalChildren = new Drawable[]
     {
         new FillFlowContainer
         {
             RelativeSizeAxes = Axes.Both,
             Direction        = FillDirection.Vertical,
             Spacing          = new Vector2(0, 5),
             Children         = new Drawable[]
             {
                 content = new WrappingTimeContainer
                 {
                     Anchor           = Anchor.TopCentre,
                     Origin           = Anchor.TopCentre,
                     RelativeSizeAxes = Axes.Both,
                     FillMode         = FillMode.Fit,
                     Masking          = true
                 },
                 new FillFlowContainer
                 {
                     Anchor       = Anchor.TopCentre,
                     Origin       = Anchor.TopCentre,
                     AutoSizeAxes = Axes.Both,
                     Direction    = FillDirection.Horizontal,
                     Spacing      = new Vector2(5, 0),
                     Children     = new[]
                     {
                         minTimeText = new SpriteText {
                             Colour = Color4.Blue
                         },
                         currentTimeText = new SpriteText(),
                         maxTimeText     = new SpriteText {
                             Colour = Color4.Blue
                         },
                     }
                 }
             }
         }
     };
 }
コード例 #2
0
 public AnimationContainer(int startTime = 0)
 {
     Anchor           = Anchor.Centre;
     Origin           = Anchor.Centre;
     RelativeSizeAxes = Axes.Both;
     InternalChild    = wrapping = new WrappingTimeContainer(startTime)
     {
         RelativeSizeAxes = Axes.Both,
         Children         = new Drawable[]
         {
             new Container
             {
                 FillMode         = FillMode.Fit,
                 RelativeSizeAxes = Axes.Both,
                 Anchor           = Anchor.Centre,
                 Origin           = Anchor.Centre,
                 Size             = new Vector2(0.6f),
                 Children         = new Drawable[]
                 {
                     new Box
                     {
                         RelativeSizeAxes = Axes.Both,
                         Colour           = Color4.DarkGray,
                     },
                     content = new Container
                     {
                         RelativeSizeAxes = Axes.Both,
                         Masking          = true,
                     },
                 }
             },
             transforms = new FillFlowContainer <DrawableTransform>
             {
                 Anchor           = Anchor.CentreLeft,
                 Origin           = Anchor.CentreLeft,
                 Spacing          = Vector2.One,
                 RelativeSizeAxes = Axes.X,
                 AutoSizeAxes     = Axes.Y,
                 Width            = 0.2f,
             },
             new Container
             {
                 Anchor           = Anchor.TopCentre,
                 Origin           = Anchor.TopCentre,
                 RelativeSizeAxes = Axes.Both,
                 Size             = new Vector2(0.8f, 0.1f),
                 Children         = new Drawable[]
                 {
                     minTimeText = new SpriteText
                     {
                         Anchor = Anchor.BottomLeft,
                         Origin = Anchor.TopLeft,
                     },
                     currentTimeText = new SpriteText
                     {
                         RelativePositionAxes = Axes.X,
                         Anchor = Anchor.BottomLeft,
                         Origin = Anchor.BottomCentre,
                         Y      = -10,
                     },
                     maxTimeText = new SpriteText
                     {
                         Anchor = Anchor.BottomRight,
                         Origin = Anchor.TopRight,
                     },
                     seekingTick = new Tick(0, false),
                     new Tick(0),
                     new Tick(1),
                     new Tick(2),
                     new Tick(3),
                     new Tick(4),
                 }
             }
         }
     };
 }