Merge branch 'master' into seperateCursorSize

This commit is contained in:
Dean Herbert
2017-03-22 08:11:45 +09:00
committed by GitHub
68 changed files with 808 additions and 472 deletions

View File

@ -65,7 +65,7 @@ namespace osu.Game.Overlays
Vector2 change = state.Mouse.Position - state.Mouse.PositionMouseDown.Value;
// Diminish the drag distance as we go further to simulate "rubber band" feeling.
change *= (float)Math.Pow(change.Length, 0.7f) / change.Length;
change *= change.Length <= 0 ? 0 : (float)Math.Pow(change.Length, 0.7f) / change.Length;
dragContainer.MoveTo(change);
return base.OnDrag(state);

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

@ -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
{