1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 04:32:55 +08:00

Merge pull request #980 from Tom94/better-fill-mode

Set RelativeSizeAxes for updated FillMode behavior
This commit is contained in:
Dean Herbert 2017-07-08 22:18:53 +09:00 committed by GitHub
commit bde06d466a
14 changed files with 14 additions and 1 deletions

View File

@ -93,6 +93,7 @@ namespace osu.Game.Beatmaps.Drawables
{ {
new BeatmapBackgroundSprite(working) new BeatmapBackgroundSprite(working)
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,

View File

@ -26,6 +26,7 @@ namespace osu.Game.Graphics.Backgrounds
Add(Sprite = new Sprite Add(Sprite = new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Colour = Color4.DarkGray, Colour = Color4.DarkGray,

View File

@ -38,6 +38,7 @@ namespace osu.Game.Overlays.Direct
{ {
return new AsyncLoadWrapper(new BeatmapBackgroundSprite(new OnlineWorkingBeatmap(SetInfo.Beatmaps.FirstOrDefault(), textures, null)) return new AsyncLoadWrapper(new BeatmapBackgroundSprite(new OnlineWorkingBeatmap(SetInfo.Beatmaps.FirstOrDefault(), textures, null))
{ {
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
OnLoadComplete = d => d.FadeInFromZero(400, EasingTypes.Out), OnLoadComplete = d => d.FadeInFromZero(400, EasingTypes.Out),
}) { RelativeSizeAxes = Axes.Both }; }) { RelativeSizeAxes = Axes.Both };

View File

@ -398,6 +398,7 @@ namespace osu.Game.Overlays
{ {
sprite = new Sprite sprite = new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(150), Colour = OsuColour.Gray(150),
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
}, },

View File

@ -438,6 +438,7 @@ namespace osu.Game.Screens.Multiplayer
{ {
new AsyncLoadWrapper(new BeatmapBackgroundSprite(new OnlineWorkingBeatmap(value, textures, null)) new AsyncLoadWrapper(new BeatmapBackgroundSprite(new OnlineWorkingBeatmap(value, textures, null))
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,

View File

@ -227,6 +227,7 @@ namespace osu.Game.Screens.Play
{ {
new Sprite new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Texture = beatmap?.Background, Texture = beatmap?.Background,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,

View File

@ -163,6 +163,7 @@ namespace osu.Game.Screens.Ranking
{ {
new Sprite new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Alpha = 0.2f, Alpha = 0.2f,
Texture = Beatmap?.Background, Texture = Beatmap?.Background,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,

View File

@ -343,6 +343,7 @@ namespace osu.Game.Screens.Ranking
{ {
cover = new Sprite cover = new Sprite
{ {
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -152,6 +152,7 @@ namespace osu.Game.Screens.Select
// Zoomed-in and cropped beatmap background // Zoomed-in and cropped beatmap background
new BeatmapBackgroundSprite(beatmap) new BeatmapBackgroundSprite(beatmap)
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,

View File

@ -31,6 +31,7 @@ namespace osu.Game.Screens.Select.Leaderboards
{ {
rankSprite = new Sprite rankSprite = new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fit FillMode = FillMode.Fit

View File

@ -82,6 +82,7 @@ namespace osu.Game.Screens.Tournament
}, },
new Sprite new Sprite
{ {
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
Texture = textures.Get(@"Backgrounds/Drawings/background.png") Texture = textures.Get(@"Backgrounds/Drawings/background.png")
}, },

View File

@ -151,9 +151,9 @@ namespace osu.Game.Screens.Tournament
{ {
flagSprite = new Sprite flagSprite = new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
FillMode = FillMode.Fit FillMode = FillMode.Fit
}, },
new OsuSpriteText new OsuSpriteText

View File

@ -31,6 +31,7 @@ namespace osu.Game.Users
Add(new Sprite Add(new Sprite
{ {
RelativeSizeAxes = Axes.Both,
Texture = texture, Texture = texture,
FillMode = FillMode.Fit, FillMode = FillMode.Fit,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,

View File

@ -46,6 +46,7 @@ namespace osu.Game.Users
{ {
new AsyncLoadWrapper(new CoverBackgroundSprite(user) new AsyncLoadWrapper(new CoverBackgroundSprite(user)
{ {
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,