mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Make all Playfields completely relative.
This commit is contained in:
@ -14,8 +14,7 @@ namespace osu.Game.Modes.Catch.UI
|
||||
{
|
||||
public CatchPlayfield()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
Size = new Vector2(512, 0.9f);
|
||||
Size = new Vector2(1, 0.9f);
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
|
||||
|
@ -15,8 +15,7 @@ namespace osu.Game.Modes.Mania.UI
|
||||
{
|
||||
public ManiaPlayfield(int columns)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(columns / 20f, 1f);
|
||||
Size = new Vector2(0.8f, 1f);
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
|
||||
|
@ -38,8 +38,6 @@ namespace osu.Game.Modes.Osu.UI
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(0.75f);
|
||||
|
||||
Add(new Drawable[]
|
||||
{
|
||||
|
@ -52,11 +52,6 @@ namespace osu.Game.Modes.Taiko.UI
|
||||
|
||||
public TaikoPlayfield()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
||||
// Default height
|
||||
Height = DEFAULT_PLAYFIELD_HEIGHT;
|
||||
|
||||
AddInternal(new Drawable[]
|
||||
{
|
||||
rightBackgroundContainer = new Container
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Modes.Objects;
|
||||
@ -63,6 +64,12 @@ namespace osu.Game.Modes.UI
|
||||
Add(HitObjects);
|
||||
}
|
||||
|
||||
public override Axes RelativeSizeAxes
|
||||
{
|
||||
get { return Axes.Both; }
|
||||
set { throw new InvalidOperationException($@"{nameof(Playfield<TObject, TJudgement>)}'s {nameof(RelativeSizeAxes)} should never be changed from {Axes.Both}"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs post-processing tasks (if any) after all DrawableHitObjects are loaded into this Playfield.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user