mirror of
https://github.com/osukey/osukey.git
synced 2025-06-19 18:27:58 +09:00
Fix toolbar sizing hackiness.
This commit is contained in:
parent
57d97ba2e9
commit
714c94b7a8
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
tooltipContainer = new FlowContainer
|
tooltipContainer = new FlowContainer
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
AutoSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Position = new Vector2(5, 5),
|
Position = new Vector2(5, 5),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
@ -123,6 +123,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
};
|
};
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
AutoSizeAxes = Axes.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -131,14 +132,6 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
sampleClick = audio.Sample.Get(@"Menu/menuclick");
|
sampleClick = audio.Sample.Get(@"Menu/menuclick");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
|
|
||||||
//todo: find a way to avoid using this (autosize needs to be able to ignore certain drawables.. in this case the tooltip)
|
|
||||||
Size = new Vector2(Flow.DrawSize.X, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
|
@ -22,6 +22,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
public ToolbarUserArea()
|
public ToolbarUserArea()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
AutoSizeAxes = Axes.X;
|
||||||
|
|
||||||
Children = new Drawable[] {
|
Children = new Drawable[] {
|
||||||
button = new ToolbarUserButton
|
button = new ToolbarUserButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user