mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:43:21 +08:00
Clean code
This commit is contained in:
parent
765c6e4ecc
commit
0e50e4ee34
@ -8,7 +8,6 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System;
|
|
||||||
using static osu.Framework.Graphics.UserInterface.TextBox;
|
using static osu.Framework.Graphics.UserInterface.TextBox;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
||||||
@ -132,63 +131,58 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
|||||||
|
|
||||||
public LabelledTextBox()
|
public LabelledTextBox()
|
||||||
{
|
{
|
||||||
Masking = true;
|
|
||||||
CornerRadius = outer_corner_radius;
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
base.Height = default_height + Padding.Top;
|
base.Height = default_height + Padding.Top;
|
||||||
|
CornerRadius = outer_corner_radius;
|
||||||
|
Masking = true;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChild = new Container
|
||||||
{
|
{
|
||||||
new Container
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
CornerRadius = outer_corner_radius,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Box
|
||||||
CornerRadius = outer_corner_radius,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
new Box
|
RelativeSizeAxes = Axes.Both,
|
||||||
{
|
Colour = OsuColour.FromHex("1c2125"),
|
||||||
RelativeSizeAxes = Axes.Both,
|
},
|
||||||
Colour = OsuColour.FromHex("1c2125"),
|
new Container
|
||||||
},
|
{
|
||||||
new Container
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = default_height,
|
||||||
|
Child = new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = default_height,
|
Height = default_height,
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
new Drawable[]
|
||||||
Height = default_height,
|
|
||||||
Content = new[]
|
|
||||||
{
|
{
|
||||||
new Drawable[]
|
label = new OsuSpriteText
|
||||||
{
|
{
|
||||||
label = new OsuSpriteText
|
Anchor = Anchor.TopLeft,
|
||||||
{
|
Origin = Anchor.TopLeft,
|
||||||
Anchor = Anchor.TopLeft,
|
Padding = new MarginPadding { Left = default_label_left_padding, Top = default_label_top_padding },
|
||||||
Origin = Anchor.TopLeft,
|
Colour = Color4.White,
|
||||||
Padding = new MarginPadding { Left = default_label_left_padding, Top = default_label_top_padding },
|
TextSize = default_label_text_size,
|
||||||
Colour = Color4.White,
|
Font = @"Exo2.0-Bold",
|
||||||
TextSize = default_label_text_size,
|
},
|
||||||
Text = LabelText,
|
textBox = new OsuTextBox
|
||||||
Font = @"Exo2.0-Bold",
|
{
|
||||||
},
|
Anchor = Anchor.TopLeft,
|
||||||
textBox = new OsuTextBox
|
Origin = Anchor.TopLeft,
|
||||||
{
|
RelativeSizeAxes = Axes.X,
|
||||||
Anchor = Anchor.TopLeft,
|
Height = default_height,
|
||||||
Origin = Anchor.TopLeft,
|
CornerRadius = inner_corner_radius,
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = default_height,
|
|
||||||
ReadOnly = ReadOnly,
|
|
||||||
CornerRadius = inner_corner_radius,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ColumnDimensions = new[]
|
},
|
||||||
{
|
ColumnDimensions = new[]
|
||||||
new Dimension(GridSizeMode.Absolute, label_container_width),
|
{
|
||||||
new Dimension()
|
new Dimension(GridSizeMode.Absolute, label_container_width),
|
||||||
}
|
new Dimension()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user