1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 07:04:15 +08:00

Merge pull request #166 from Tom94/various-improvements

Various improvements
This commit is contained in:
Dean Herbert 2016-11-14 15:59:17 +09:00 committed by GitHub
commit c37afd7a81
23 changed files with 167 additions and 197 deletions

@ -1 +1 @@
Subproject commit 5c0e4edbbcdc26ab56c70676856477cd21e7afdc Subproject commit 1cb936a4fe9e699ee37deb34eed0b04bc06167e3

View File

@ -21,8 +21,7 @@ namespace osu.Desktop.VisualTests.Tests
protected override IFrameBasedClock Clock => ourClock; protected override IFrameBasedClock Clock => ourClock;
[BackgroundDependencyLoader] public TestCaseHitObjects()
private void load()
{ {
var swClock = new StopwatchClock(true) { Rate = 1 }; var swClock = new StopwatchClock(true) { Rate = 1 };
ourClock = new FramedClock(swClock); ourClock = new FramedClock(swClock);

View File

@ -25,8 +25,7 @@ namespace osu.Desktop.Tests
protected MusicController mc; protected MusicController mc;
[BackgroundDependencyLoader] public TestCaseMusicController()
private void load()
{ {
ourClock = new FramedClock(); ourClock = new FramedClock();
} }

View File

@ -19,9 +19,12 @@ namespace osu.Desktop.VisualTests
{ {
class VisualTestGame : OsuGameBase class VisualTestGame : OsuGameBase
{ {
[BackgroundDependencyLoader] protected override void LoadComplete()
private void load()
{ {
base.LoadComplete();
// Have to construct this here, rather than in the constructor, because
// we depend on some dependencies to be loaded within OsuGameBase.load().
Add(new TestBrowser()); Add(new TestBrowser());
} }
} }

View File

@ -43,13 +43,18 @@ namespace osu.Game.GameModes
public override bool Push(GameMode mode) public override bool Push(GameMode mode)
{ {
//don't actually push until we've finished loading. // When trying to push a non-loaded GameMode, load it asynchronously and re-invoke Push
if (!mode.IsLoaded) // once it's done.
if (mode.LoadState == LoadState.NotLoaded)
{ {
mode.Preload(game, d => Push((BackgroundMode)d)); mode.Preload(game, d => Push((BackgroundMode)d));
return true; return true;
} }
// Make sure the in-progress loading is complete before pushing the GameMode.
while (mode.LoadState < LoadState.Loaded)
Thread.Sleep(1);
base.Push(mode); base.Push(mode);
return true; return true;

View File

@ -1,8 +1,6 @@
//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 osu.Framework;
using osu.Framework.Allocation;
using osu.Game.Graphics.Background; using osu.Game.Graphics.Background;
namespace osu.Game.GameModes.Backgrounds namespace osu.Game.GameModes.Backgrounds
@ -14,11 +12,6 @@ namespace osu.Game.GameModes.Backgrounds
public BackgroundModeCustom(string textureName) public BackgroundModeCustom(string textureName)
{ {
this.textureName = textureName; this.textureName = textureName;
}
[BackgroundDependencyLoader]
private void load()
{
Add(new Background(textureName)); Add(new Background(textureName));
} }

View File

@ -78,65 +78,64 @@ namespace osu.Game.GameModes
Content.FadeIn(transition_time, EasingTypes.OutExpo); Content.FadeIn(transition_time, EasingTypes.OutExpo);
} }
[BackgroundDependencyLoader] public GameModeWhiteBox()
private void load()
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
box = new Box box = new Box
{
RelativeSizeAxes = Axes.Both,
Size = new Vector2(0.3f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = getColourFor(GetType()),
Alpha = 1,
BlendingMode = BlendingMode.Additive,
},
textContainer = new Container
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new[]
{ {
RelativeSizeAxes = Axes.Both, new SpriteText
Size = new Vector2(0.3f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = getColourFor(GetType()),
Alpha = 1,
BlendingMode = BlendingMode.Additive,
},
textContainer = new Container
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new[]
{ {
new SpriteText Text = GetType().Name,
{ Anchor = Anchor.Centre,
Text = GetType().Name, Origin = Anchor.Centre,
Anchor = Anchor.Centre, TextSize = 50,
Origin = Anchor.Centre, },
TextSize = 50, new SpriteText
}, {
new SpriteText Text = GetType().Namespace,
{ Anchor = Anchor.Centre,
Text = GetType().Namespace, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Position = new Vector2(0, 30)
Origin = Anchor.Centre, },
Position = new Vector2(0, 30)
},
}
},
popButton = new Button
{
Text = @"Back",
RelativeSizeAxes = Axes.X,
Size = new Vector2(0.1f, 40),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Colour = new Color4(235, 51, 153, 255),
Alpha = 0,
Action = delegate {
Exit();
}
},
childModeButtons = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Both,
Size = new Vector2(0.1f, 1)
} }
},
popButton = new Button
{
Text = @"Back",
RelativeSizeAxes = Axes.X,
Size = new Vector2(0.1f, 40),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Colour = new Color4(235, 51, 153, 255),
Alpha = 0,
Action = delegate {
Exit();
}
},
childModeButtons = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Both,
Size = new Vector2(0.1f, 1)
}
}; };
if (PossibleChildren != null) if (PossibleChildren != null)

View File

@ -47,53 +47,48 @@ namespace osu.Game.GameModes.Menu
this.text = text; this.text = text;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
Alpha = 0; Alpha = 0;
Vector2 boxSize = new Vector2(ButtonSystem.button_width + Math.Abs(extraWidth), ButtonSystem.button_area_height); Vector2 boxSize = new Vector2(ButtonSystem.button_width + Math.Abs(extraWidth), ButtonSystem.button_area_height);
Children = new Drawable[] Children = new Drawable[]
{ {
box = new Box box = new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = colour,
Scale = new Vector2(0, 1),
Size = boxSize,
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
EdgeSmoothness = new Vector2(2, 0),
},
iconText = new Container
{
AutoSizeAxes = Axes.Both,
Position = new Vector2(extraWidth / 2, 0),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{ {
Anchor = Anchor.Centre, icon = new TextAwesome
Origin = Anchor.Centre,
Colour = colour,
Scale = new Vector2(0, 1),
Size = boxSize,
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
EdgeSmoothness = new Vector2(2, 0),
},
iconText = new Container
{
AutoSizeAxes = Axes.Both,
Position = new Vector2(extraWidth / 2, 0),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{ {
icon = new TextAwesome Anchor = Anchor.Centre,
{ TextSize = 30,
Anchor = Anchor.Centre, Position = new Vector2(0, 0),
TextSize = 30, Icon = symbol
Position = new Vector2(0, 0), },
Icon = symbol new SpriteText
}, {
new SpriteText Direction = FlowDirection.HorizontalOnly,
{ Anchor = Anchor.Centre,
Direction = FlowDirection.HorizontalOnly, Origin = Anchor.Centre,
Anchor = Anchor.Centre, TextSize = 16,
Origin = Anchor.Centre, Position = new Vector2(0, 35),
TextSize = 16, Text = text
Position = new Vector2(0, 35),
Text = text
}
} }
} }
}
}; };
} }

View File

@ -52,11 +52,7 @@ namespace osu.Game.GameModes.Menu
public ButtonSystem() public ButtonSystem()
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
Children = new Drawable[] Children = new Drawable[]
{ {
buttonArea = new Container buttonArea = new Container
@ -105,13 +101,13 @@ namespace osu.Game.GameModes.Menu
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0); buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.fa_user, new Color4(102, 68, 204, 255), OnSolo, wedge_width, Key.P)); buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), wedge_width, Key.P));
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.fa_users, new Color4(94, 63, 186, 255), OnMulti, 0, Key.M)); buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.fa_users, new Color4(94, 63, 186, 255), () => OnMulti?.Invoke(), 0, Key.M));
buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), OnChart)); buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), () => OnChart?.Invoke()));
buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P)); buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P));
buttonsTopLevel.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), OnEdit, 0, Key.E)); buttonsTopLevel.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
buttonsTopLevel.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), OnDirect, 0, Key.D)); buttonsTopLevel.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
buttonsTopLevel.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q)); buttonsTopLevel.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
buttonFlow.Add(buttonsPlay); buttonFlow.Add(buttonsPlay);

View File

@ -19,11 +19,7 @@ namespace osu.Game.GameModes.Play.Catch
Size = new Vector2(512, 0.9f); Size = new Vector2(512, 0.9f);
Anchor = Anchor.BottomCentre; Anchor = Anchor.BottomCentre;
Origin = Anchor.BottomCentre; Origin = Anchor.BottomCentre;
}
[BackgroundDependencyLoader]
private void load()
{
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f }); Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
} }
} }

View File

@ -119,11 +119,7 @@ namespace osu.Game.GameModes.Play
}; };
TextSize = 80; TextSize = 80;
}
[BackgroundDependencyLoader]
private void load()
{
DisplayedCountSpriteText.Text = FormatCount(Count); DisplayedCountSpriteText.Text = FormatCount(Count);
DisplayedCountSpriteText.Anchor = Anchor; DisplayedCountSpriteText.Anchor = Anchor;
DisplayedCountSpriteText.Origin = Origin; DisplayedCountSpriteText.Origin = Origin;

View File

@ -43,11 +43,14 @@ namespace osu.Game.GameModes.Play
protected virtual List<T> Convert(List<HitObject> objects) => Converter.Convert(objects); protected virtual List<T> Convert(List<HitObject> objects) => Converter.Convert(objects);
public HitRenderer()
{
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
RelativeSizeAxes = Axes.Both;
Children = new Drawable[] Children = new Drawable[]
{ {
Playfield = CreatePlayfield() Playfield = CreatePlayfield()

View File

@ -2,12 +2,9 @@
//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 osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Allocation;
namespace osu.Game.GameModes.Play.Mania namespace osu.Game.GameModes.Play.Mania
{ {
@ -22,11 +19,7 @@ namespace osu.Game.GameModes.Play.Mania
Size = new Vector2(columns / 20f, 1f); Size = new Vector2(columns / 20f, 1f);
Anchor = Anchor.BottomCentre; Anchor = Anchor.BottomCentre;
Origin = Anchor.BottomCentre; Origin = Anchor.BottomCentre;
}
[BackgroundDependencyLoader]
private void load()
{
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f }); Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
for (int i = 0; i < columns; i++) for (int i = 0; i < columns; i++)

View File

@ -33,9 +33,8 @@ namespace osu.Game.GameModes.Play.Osu
DisplayedCountSpriteText.Position = value; DisplayedCountSpriteText.Position = value;
} }
} }
[BackgroundDependencyLoader] public OsuComboCounter()
private void load()
{ {
PopOutSpriteText.Origin = Origin; PopOutSpriteText.Origin = Origin;
PopOutSpriteText.Anchor = Anchor; PopOutSpriteText.Anchor = Anchor;

View File

@ -26,18 +26,19 @@ namespace osu.Game.Graphics.Background
this.textureName = textureName; this.textureName = textureName;
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
Depth = float.MinValue; Depth = float.MinValue;
Add(BackgroundSprite = new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = Color4.DarkGray
});
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(TextureStore textures)
{ {
Add(BackgroundSprite = new Sprite BackgroundSprite.Texture = textures.Get(textureName);
{
Texture = textures.Get(textureName),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = Color4.DarkGray
});
} }
protected override void Update() protected override void Update()

View File

@ -118,11 +118,7 @@ namespace osu.Game.Graphics.UserInterface
TextSize = 40; TextSize = 40;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
DisplayedCount = Count; DisplayedCount = Count;
DisplayedCountSpriteText.Text = FormatCount(count); DisplayedCountSpriteText.Text = FormatCount(count);

View File

@ -108,11 +108,7 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
} }
}; };
}
[BackgroundDependencyLoader]
private void load()
{
starContainer.Width = MaxStars * StarSize + Math.Max(MaxStars - 1, 0) * StarSpacing; starContainer.Width = MaxStars * StarSize + Math.Max(MaxStars - 1, 0) * StarSpacing;
starContainer.Height = StarSize; starContainer.Height = StarSize;

View File

@ -18,6 +18,9 @@ namespace osu.Game.Graphics.UserInterface.Volume
private VolumeMeter volumeMeterMaster; private VolumeMeter volumeMeterMaster;
private FlowContainer content;
protected override Container<Drawable> Content => content;
public override bool Contains(Vector2 screenSpacePos) => true; public override bool Contains(Vector2 screenSpacePos) => true;
private void volumeChanged(object sender, EventArgs e) private void volumeChanged(object sender, EventArgs e)
@ -31,32 +34,31 @@ namespace osu.Game.Graphics.UserInterface.Volume
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Anchor = Anchor.BottomRight; Anchor = Anchor.BottomRight;
Origin = Anchor.BottomRight; Origin = Anchor.BottomRight;
AddInternal(content = new FlowContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Position = new Vector2(10, 30),
Spacing = new Vector2(15, 0),
});
} }
[BackgroundDependencyLoader] protected override void LoadComplete()
private void load()
{ {
base.LoadComplete();
VolumeGlobal.ValueChanged += volumeChanged; VolumeGlobal.ValueChanged += volumeChanged;
VolumeSample.ValueChanged += volumeChanged; VolumeSample.ValueChanged += volumeChanged;
VolumeTrack.ValueChanged += volumeChanged; VolumeTrack.ValueChanged += volumeChanged;
Children = new Drawable[] Add(new[]
{ {
new FlowContainer volumeMeterMaster = new VolumeMeter("Master", VolumeGlobal),
{ new VolumeMeter("Effects", VolumeSample),
AutoSizeAxes = Axes.Both, new VolumeMeter("Music", VolumeTrack)
Anchor = Anchor.BottomRight, });
Origin = Anchor.BottomRight,
Position = new Vector2(10, 30),
Spacing = new Vector2(15,0),
Children = new Drawable[]
{
volumeMeterMaster = new VolumeMeter("Master", VolumeGlobal),
new VolumeMeter("Effects", VolumeSample),
new VolumeMeter("Music", VolumeTrack)
}
}
};
} }
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)

View File

@ -20,17 +20,13 @@ namespace osu.Game.Online.Chat.Display
{ {
public readonly Message Message; public readonly Message Message;
public ChatLine(Message message)
{
this.Message = message;
}
const float padding = 200; const float padding = 200;
const float text_size = 20; const float text_size = 20;
[BackgroundDependencyLoader] public ChatLine(Message message)
private void load()
{ {
this.Message = message;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;

View File

@ -80,8 +80,12 @@ namespace osu.Game
Audio.VolumeTrack.Weld(Config.GetBindable<double>(OsuConfig.VolumeMusic)); Audio.VolumeTrack.Weld(Config.GetBindable<double>(OsuConfig.VolumeMusic));
PlayMode = Config.GetBindable<PlayMode>(OsuConfig.PlayMode); PlayMode = Config.GetBindable<PlayMode>(OsuConfig.PlayMode);
}
protected override void LoadComplete()
{
base.LoadComplete();
//todo: move to constructor or LoadComplete.
Add(new Drawable[] { Add(new Drawable[] {
new VolumeControlReceptor new VolumeControlReceptor
{ {

View File

@ -37,10 +37,6 @@ namespace osu.Game
public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>(); public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
private void Beatmap_ValueChanged(object sender, EventArgs e)
{
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
@ -65,15 +61,6 @@ namespace osu.Game
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic")); Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Black")); Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Black"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-BlackItalic")); Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-BlackItalic"));
AddInternal(ratioContainer = new RatioAdjust());
Children = new Drawable[]
{
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
};
Beatmap.ValueChanged += Beatmap_ValueChanged;
OszArchiveReader.Register(); OszArchiveReader.Register();
@ -85,6 +72,19 @@ namespace osu.Game
}); });
} }
protected override void LoadComplete()
{
base.LoadComplete();
AddInternal(ratioContainer = new RatioAdjust
{
Children = new[]
{
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
}
});
}
public override void SetHost(BasicGameHost host) public override void SetHost(BasicGameHost host)
{ {
if (Config == null) if (Config == null)

View File

@ -44,9 +44,9 @@ namespace osu.Game.Overlays
} }
} }
[BackgroundDependencyLoader] protected override void LoadComplete()
private void load()
{ {
base.LoadComplete();
DrawableIcon.TextSize *= 1.4f; DrawableIcon.TextSize *= 1.4f;
} }
} }

View File

@ -29,11 +29,7 @@ namespace osu.Game.Overlays
public ToolbarModeSelector() public ToolbarModeSelector()
{ {
RelativeSizeAxes = Axes.Y; RelativeSizeAxes = Axes.Y;
}
[BackgroundDependencyLoader]
private void load()
{
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -59,8 +55,11 @@ namespace osu.Game.Overlays
} }
}; };
int amountButtons = 0;
foreach (PlayMode m in Enum.GetValues(typeof(PlayMode))) foreach (PlayMode m in Enum.GetValues(typeof(PlayMode)))
{ {
++amountButtons;
var localMode = m; var localMode = m;
modeButtons.Add(new ToolbarModeButton modeButtons.Add(new ToolbarModeButton
{ {
@ -73,8 +72,8 @@ namespace osu.Game.Overlays
}); });
} }
RelativeSizeAxes = Axes.Y; // We need to set the size within LoadComplete, because
Size = new Vector2(modeButtons.Children.Count() * ToolbarButton.WIDTH + padding * 2, 1); Size = new Vector2(amountButtons * ToolbarButton.WIDTH + padding * 2, 1);
} }
public void SetGameMode(PlayMode mode) public void SetGameMode(PlayMode mode)