mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 17:13:20 +08:00
Make scrollabletimeline use gridcontainer
This commit is contained in:
parent
0b7432d3db
commit
870ce8868c
@ -34,7 +34,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(1000, 100)
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Size = new Vector2(0.8f, 100)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,16 +33,17 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.FromHex("111")
|
Colour = OsuColour.FromHex("111")
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Content = new[]
|
||||||
Children = new Drawable[]
|
{
|
||||||
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X,
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
@ -70,8 +71,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X,
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
@ -93,7 +94,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Height = 0.5f,
|
Height = 0.5f,
|
||||||
Icon = FontAwesome.fa_search_plus,
|
Icon = FontAwesome.fa_search_plus,
|
||||||
Action = () => timelineContainer.Zoom++
|
// Action = () => timelineContainer.Zoom++
|
||||||
},
|
},
|
||||||
new TimelineButton
|
new TimelineButton
|
||||||
{
|
{
|
||||||
@ -102,13 +103,20 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Height = 0.5f,
|
Height = 0.5f,
|
||||||
Icon = FontAwesome.fa_search_minus,
|
Icon = FontAwesome.fa_search_minus,
|
||||||
Action = () => timelineContainer.Zoom--
|
// Action = () => timelineContainer.Zoom--
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timelineContainer = new ScrollingTimelineContainer { RelativeSizeAxes = Axes.Y }
|
timelineContainer = new ScrollingTimelineContainer { RelativeSizeAxes = Axes.Both }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ColumnDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension(GridSizeMode.Distributed),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -120,12 +128,5 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
timelineContainer.Beatmap.BindTo(Beatmap);
|
timelineContainer.Beatmap.BindTo(Beatmap);
|
||||||
timelineContainer.WaveformVisible.BindTo(waveformCheckbox.Current);
|
timelineContainer.WaveformVisible.BindTo(waveformCheckbox.Current);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
|
|
||||||
timelineContainer.Size = new Vector2(DrawSize.X - timelineContainer.DrawPosition.X, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user