Merge branch 'master' into leaderboards

This commit is contained in:
Dean Herbert
2017-03-22 08:24:49 +09:00
committed by GitHub
36 changed files with 173 additions and 68 deletions

View File

@ -169,6 +169,7 @@ namespace osu.Game.Overlays.Notifications
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Icon = FontAwesome.fa_times_circle,
TextSize = 20
}
};
}

View File

@ -53,6 +53,7 @@ namespace osu.Game.Overlays.Notifications
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Icon = icon,
TextSize = 20
}
});

View File

@ -32,6 +32,7 @@ namespace osu.Game.Overlays.Options
{
Icon = Ruleset.GetRuleset(m).Icon,
Colour = Color4.Gray,
TextSize = 20
});
Children = new Drawable[]

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using System;
namespace osu.Game.Overlays.Options.Sections.Graphics
{
@ -12,9 +13,16 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
{
protected override string Header => "Layout";
private OptionSlider<int> letterboxPositionX;
private OptionSlider<int> letterboxPositionY;
private Bindable<bool> letterboxing;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager config)
{
letterboxing = config.GetBindable<bool>(FrameworkConfig.Letterboxing);
Children = new Drawable[]
{
new OptionLabel { Text = "Resolution: TODO dropdown" },
@ -26,19 +34,36 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
new OsuCheckbox
{
LabelText = "Letterboxing",
Bindable = config.GetBindable<bool>(FrameworkConfig.Letterboxing),
Bindable = letterboxing,
},
new OptionSlider<int>
letterboxPositionX = new OptionSlider<int>
{
LabelText = "Horizontal position",
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionX)
},
new OptionSlider<int>
letterboxPositionY = new OptionSlider<int>
{
LabelText = "Vertical position",
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionY)
},
};
letterboxing.ValueChanged += visibilityChanged;
letterboxing.TriggerChange();
}
private void visibilityChanged(object sender, EventArgs e)
{
if (letterboxing)
{
letterboxPositionX.Show();
letterboxPositionY.Show();
}
else
{
letterboxPositionX.Hide();
letterboxPositionY.Hide();
}
}
}
}

View File

@ -61,8 +61,13 @@ namespace osu.Game.Overlays.Options.Sections
},
new OptionSlider<double>
{
LabelText = "Cursor size",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.CursorSize)
LabelText = "Menu cursor size",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.MenuCursorSize)
},
new OptionSlider<double>
{
LabelText = "Gameplay cursor size",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.GameplayCursorSize)
},
new OsuCheckbox
{
@ -72,4 +77,4 @@ namespace osu.Game.Overlays.Options.Sections
};
}
}
}
}

View File

@ -87,6 +87,7 @@ namespace osu.Game.Overlays.Options
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 20
},
}
},

View File

@ -98,6 +98,7 @@ namespace osu.Game.Overlays.Toolbar
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 20
},
DrawableText = new OsuSpriteText
{