mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Merge pull request #100 from peppy/general-fixes
Fixes in-line with framework update.
This commit is contained in:
commit
01fd7b82e8
@ -1 +1 @@
|
|||||||
Subproject commit 44a3b764f0095573eec45ee1f68265f837896fc3
|
Subproject commit f68706eb9b8106bb0f6a15e7406ec49df6ebb014
|
@ -1,16 +1,11 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
using osu.Game.Beatmaps.Samples;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Timing
|
namespace osu.Game.Beatmaps.Timing
|
||||||
{
|
{
|
||||||
class SampleChange : ControlPoint
|
public class SampleChange : ControlPoint
|
||||||
{
|
{
|
||||||
public SampleInfo Sample;
|
public SampleInfo Sample;
|
||||||
}
|
}
|
||||||
|
@ -93,8 +93,9 @@ namespace osu.Game.GameModes
|
|||||||
Alpha = 1,
|
Alpha = 1,
|
||||||
Additive = false
|
Additive = false
|
||||||
},
|
},
|
||||||
textContainer = new AutoSizeContainer
|
textContainer = new Container
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
/// Button designed specifically for the osu!next main menu.
|
/// Button designed specifically for the osu!next main menu.
|
||||||
/// In order to correctly flow, we have to use a negative margin on the parent container (due to the parallelogram shape).
|
/// In order to correctly flow, we have to use a negative margin on the parent container (due to the parallelogram shape).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Button : AutoSizeContainer, IStateful<ButtonState>
|
public class Button : Container, IStateful<ButtonState>
|
||||||
{
|
{
|
||||||
private Container iconText;
|
private Container iconText;
|
||||||
private Box box;
|
private Box box;
|
||||||
@ -44,6 +44,8 @@ namespace osu.Game.GameModes.Menu
|
|||||||
this.extraWidth = extraWidth;
|
this.extraWidth = extraWidth;
|
||||||
this.triggerKey = triggerKey;
|
this.triggerKey = triggerKey;
|
||||||
this.text = text;
|
this.text = text;
|
||||||
|
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
@ -64,8 +66,9 @@ namespace osu.Game.GameModes.Menu
|
|||||||
Size = boxSize,
|
Size = boxSize,
|
||||||
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
|
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
|
||||||
},
|
},
|
||||||
iconText = new AutoSizeContainer
|
iconText = new Container
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Position = new Vector2(extraWidth / 2, 0),
|
Position = new Vector2(extraWidth / 2, 0),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
@ -80,8 +80,9 @@ namespace osu.Game.GameModes.Menu
|
|||||||
{
|
{
|
||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Spacing = new Vector2(-wedge_width, 0),
|
Spacing = new Vector2(-wedge_width, 0),
|
||||||
Children = new Drawable[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
settingsButton = new Button(@"settings", @"options", FontAwesome.gear, new Color4(85, 85, 85, 255), OnSettings, -wedge_width, Key.O),
|
settingsButton = new Button(@"settings", @"options", FontAwesome.gear, new Color4(85, 85, 85, 255), OnSettings, -wedge_width, Key.O),
|
||||||
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape),
|
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape),
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class OsuLogo : AutoSizeContainer
|
public partial class OsuLogo : Container
|
||||||
{
|
{
|
||||||
private Sprite logo;
|
private Sprite logo;
|
||||||
private CircularContainer logoContainer;
|
private CircularContainer logoContainer;
|
||||||
@ -51,14 +51,18 @@ namespace osu.Game.GameModes.Menu
|
|||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
logoBounceContainer = new AutoSizeContainer
|
logoBounceContainer = new Container
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
logoContainer = new CircularContainer
|
logoContainer = new CircularContainer
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace osu.Game.GameModes.Play
|
namespace osu.Game.GameModes.Play
|
||||||
{
|
{
|
||||||
public abstract class ComboCounter : AutoSizeContainer
|
public abstract class ComboCounter : Container
|
||||||
{
|
{
|
||||||
public bool IsRolling
|
public bool IsRolling
|
||||||
{
|
{
|
||||||
@ -102,6 +102,8 @@ namespace osu.Game.GameModes.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected ComboCounter()
|
protected ComboCounter()
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
DisplayedCountSpriteText = new SpriteText
|
DisplayedCountSpriteText = new SpriteText
|
||||||
|
@ -29,11 +29,12 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
return base.OnMouseUp(state, args);
|
return base.OnMouseUp(state, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
class OsuCursor : AutoSizeContainer
|
class OsuCursor : Container
|
||||||
{
|
{
|
||||||
public OsuCursor()
|
public OsuCursor()
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -13,6 +14,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
public KeyCounterCollection()
|
public KeyCounterCollection()
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.HorizontalOnly;
|
Direction = FlowDirection.HorizontalOnly;
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<KeyCounter> counters = new List<KeyCounter>();
|
private List<KeyCounter> counters = new List<KeyCounter>();
|
||||||
|
@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public abstract class RollingCounter<T> : AutoSizeContainer
|
public abstract class RollingCounter<T> : Container
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Type of the Transform to use.
|
/// Type of the Transform to use.
|
||||||
@ -116,6 +116,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
};
|
};
|
||||||
|
|
||||||
TextSize = 40;
|
TextSize = 40;
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
|
@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class StarCounter : AutoSizeContainer
|
public class StarCounter : Container
|
||||||
{
|
{
|
||||||
private readonly Container starContainer;
|
private readonly Container starContainer;
|
||||||
private readonly List<TextAwesome> stars = new List<TextAwesome>();
|
private readonly List<TextAwesome> stars = new List<TextAwesome>();
|
||||||
@ -84,7 +84,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows a float count as stars (up to 10). Used as star difficulty display.
|
/// Shows a float count as stars (up to 10). Used as star difficulty display.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StarCounter() : this(10) {
|
public StarCounter() : this(10)
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -45,6 +45,7 @@ namespace osu.Game.Online.Chat.Display
|
|||||||
{
|
{
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(1, 1)
|
Spacing = new Vector2(1, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Online.Chat.Display
|
|||||||
{
|
{
|
||||||
namespace osu.Online.Social
|
namespace osu.Online.Social
|
||||||
{
|
{
|
||||||
public class ChatLine : AutoSizeContainer
|
public class ChatLine : Container
|
||||||
{
|
{
|
||||||
public readonly Message Message;
|
public readonly Message Message;
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ namespace osu.Game.Online.Chat.Display
|
|||||||
base.Load(game);
|
base.Load(game);
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -55,9 +56,10 @@ namespace osu.Game.Online.Chat.Display
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new AutoSizeContainer
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding { Left = padding + 10 },
|
Padding = new MarginPadding { Left = padding + 10 },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ToolbarButton
|
new ToolbarButton
|
||||||
@ -85,6 +86,7 @@ namespace osu.Game.Overlays
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new []
|
Children = new []
|
||||||
{
|
{
|
||||||
new ToolbarButton
|
new ToolbarButton
|
||||||
|
@ -77,6 +77,7 @@ namespace osu.Game.Overlays
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Padding = new MarginPadding { Left = 5, Right = 5 },
|
Padding = new MarginPadding { Left = 5, Right = 5 },
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
DrawableIcon = new TextAwesome
|
DrawableIcon = new TextAwesome
|
||||||
@ -95,6 +96,7 @@ namespace osu.Game.Overlays
|
|||||||
tooltipContainer = new FlowContainer
|
tooltipContainer = new FlowContainer
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Position = new Vector2(5, -5),
|
Position = new Vector2(5, -5),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Cached;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
@ -11,6 +10,7 @@ using osu.Game.GameModes.Play;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
|
using osu.Framework.Caching;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
@ -44,6 +44,7 @@ namespace osu.Game.Overlays
|
|||||||
modeButtons = new FlowContainer
|
modeButtons = new FlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Primitives;
|
|||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
internal class VolumeControl : AutoSizeContainer
|
internal class VolumeControl : Container
|
||||||
{
|
{
|
||||||
private FlowContainer volumeMetersContainer;
|
private FlowContainer volumeMetersContainer;
|
||||||
private VolumeMeter volumeMeterMaster;
|
private VolumeMeter volumeMeterMaster;
|
||||||
@ -26,6 +26,11 @@ namespace osu.Game
|
|||||||
Origin = Anchor.BottomRight;
|
Origin = Anchor.BottomRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public VolumeControl()
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
{
|
{
|
||||||
base.Load(game);
|
base.Load(game);
|
||||||
@ -37,6 +42,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
volumeMetersContainer = new FlowContainer
|
volumeMetersContainer = new FlowContainer
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
Position = new Vector2(10, 30),
|
Position = new Vector2(10, 30),
|
||||||
|
Loading…
Reference in New Issue
Block a user