mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:43:20 +08:00
Merge branch 'master' into editor-hitobject-overlays
This commit is contained in:
commit
6cc54a464c
@ -101,7 +101,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Vector2 GetAspectAdjustedSize() => new Vector2(1, 0.8f);
|
protected override Vector2 PlayfieldArea => new Vector2(1, 0.8f);
|
||||||
|
|
||||||
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new ManiaFramedReplayInputHandler(replay, this);
|
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new ManiaFramedReplayInputHandler(replay, this);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using osu.Framework.Graphics.Cursor;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
using osu.Game.Rulesets.Osu.UI;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
{
|
{
|
||||||
@ -17,6 +18,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
protected override Playfield CreatePlayfield() => new OsuEditPlayfield();
|
protected override Playfield CreatePlayfield() => new OsuEditPlayfield();
|
||||||
|
|
||||||
|
protected override Vector2 PlayfieldArea => Vector2.One;
|
||||||
|
|
||||||
protected override CursorContainer CreateCursor() => null;
|
protected override CursorContainer CreateCursor() => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
protected override Vector2 GetAspectAdjustedSize()
|
protected override Vector2 GetAspectAdjustedSize()
|
||||||
{
|
{
|
||||||
var aspectSize = DrawSize.X * 0.75f < DrawSize.Y ? new Vector2(DrawSize.X, DrawSize.X * 0.75f) : new Vector2(DrawSize.Y * 4f / 3f, DrawSize.Y);
|
var aspectSize = DrawSize.X * 0.75f < DrawSize.Y ? new Vector2(DrawSize.X, DrawSize.X * 0.75f) : new Vector2(DrawSize.Y * 4f / 3f, DrawSize.Y);
|
||||||
return new Vector2(aspectSize.X / DrawSize.X, aspectSize.Y / DrawSize.Y) * 0.75f;
|
return new Vector2(aspectSize.X / DrawSize.X, aspectSize.Y / DrawSize.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override CursorContainer CreateCursor() => new GameplayCursor();
|
protected override CursorContainer CreateCursor() => new GameplayCursor();
|
||||||
|
@ -88,6 +88,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
return new Vector2(1, default_relative_height * aspectAdjust);
|
return new Vector2(1, default_relative_height * aspectAdjust);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Vector2 PlayfieldArea => Vector2.One;
|
||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this);
|
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this);
|
||||||
|
|
||||||
protected override BeatmapConverter<TaikoHitObject> CreateBeatmapConverter() => new TaikoBeatmapConverter(IsForCurrentRuleset);
|
protected override BeatmapConverter<TaikoHitObject> CreateBeatmapConverter() => new TaikoBeatmapConverter(IsForCurrentRuleset);
|
||||||
|
@ -319,7 +319,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Playfield.Size = GetAspectAdjustedSize();
|
Playfield.Size = GetAspectAdjustedSize() * PlayfieldArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -330,11 +330,17 @@ namespace osu.Game.Rulesets.UI
|
|||||||
protected virtual BeatmapProcessor<TObject> CreateBeatmapProcessor() => new BeatmapProcessor<TObject>();
|
protected virtual BeatmapProcessor<TObject> CreateBeatmapProcessor() => new BeatmapProcessor<TObject>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Computes the final size of the <see cref="Playfield"/> in relative coordinate space after all
|
/// Computes the size of the <see cref="Playfield"/> in relative coordinate space after aspect adjustments.
|
||||||
/// aspect and scale adjustments.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The aspect-adjusted size.</returns>
|
/// <returns>The aspect-adjusted size.</returns>
|
||||||
protected virtual Vector2 GetAspectAdjustedSize() => new Vector2(0.75f); // A sane default
|
protected virtual Vector2 GetAspectAdjustedSize() => Vector2.One;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The area of this <see cref="RulesetContainer"/> that is available for the <see cref="Playfield"/> to use.
|
||||||
|
/// Must be specified in relative coordinate space to this <see cref="RulesetContainer"/>.
|
||||||
|
/// This affects the final size of the <see cref="Playfield"/> but does not affect the <see cref="Playfield"/>'s scale.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual Vector2 PlayfieldArea => new Vector2(0.75f); // A sane default
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a converter to convert Beatmap to a specific mode.
|
/// Creates a converter to convert Beatmap to a specific mode.
|
||||||
|
Loading…
Reference in New Issue
Block a user