mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Extract default mod switch measurements to constants
For use later when specific sizes/scales of the mod switches are desired.
This commit is contained in:
@ -21,9 +21,9 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
public BindableBool Active { get; } = new BindableBool();
|
public BindableBool Active { get; } = new BindableBool();
|
||||||
|
|
||||||
private readonly IMod mod;
|
public const float DEFAULT_SIZE = 60;
|
||||||
|
|
||||||
private const float size = 60;
|
private readonly IMod mod;
|
||||||
|
|
||||||
private readonly SpriteIcon background;
|
private readonly SpriteIcon background;
|
||||||
private readonly SpriteIcon? modIcon;
|
private readonly SpriteIcon? modIcon;
|
||||||
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(size),
|
Size = new Vector2(DEFAULT_SIZE),
|
||||||
Icon = OsuIcon.ModBg
|
Icon = OsuIcon.ModBg
|
||||||
},
|
},
|
||||||
contentFlow = new FillFlowContainer
|
contentFlow = new FillFlowContainer
|
||||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
public BindableBool Active { get; } = new BindableBool();
|
public BindableBool Active { get; } = new BindableBool();
|
||||||
|
|
||||||
|
public const float DEFAULT_HEIGHT = 30;
|
||||||
|
|
||||||
private readonly IMod mod;
|
private readonly IMod mod;
|
||||||
|
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
@ -36,7 +38,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
public ModSwitchTiny(IMod mod)
|
public ModSwitchTiny(IMod mod)
|
||||||
{
|
{
|
||||||
this.mod = mod;
|
this.mod = mod;
|
||||||
Size = new Vector2(73, 30);
|
Size = new Vector2(73, DEFAULT_HEIGHT);
|
||||||
|
|
||||||
InternalChild = new CircularContainer
|
InternalChild = new CircularContainer
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user