1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 16:02:58 +08:00

Apply fixed label width to setup screen items

This commit is contained in:
Bartłomiej Dach 2021-06-08 17:14:26 +02:00
parent 88266eac63
commit 410cb16340
5 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,7 @@ namespace osu.Game.Screens.Edit.Setup
comboColours = new LabelledColourPalette
{
Label = "Hitcircle / Slider Combos",
FixedLabelWidth = LABEL_WIDTH,
ColourNamePrefix = "Combo"
}
};

View File

@ -28,6 +28,7 @@ namespace osu.Game.Screens.Edit.Setup
circleSizeSlider = new LabelledSliderBar<float>
{
Label = "Object Size",
FixedLabelWidth = LABEL_WIDTH,
Description = "The size of all hit objects",
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.CircleSize)
{
@ -40,6 +41,7 @@ namespace osu.Game.Screens.Edit.Setup
healthDrainSlider = new LabelledSliderBar<float>
{
Label = "Health Drain",
FixedLabelWidth = LABEL_WIDTH,
Description = "The rate of passive health drain throughout playable time",
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.DrainRate)
{
@ -52,6 +54,7 @@ namespace osu.Game.Screens.Edit.Setup
approachRateSlider = new LabelledSliderBar<float>
{
Label = "Approach Rate",
FixedLabelWidth = LABEL_WIDTH,
Description = "The speed at which objects are presented to the player",
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate)
{
@ -64,6 +67,7 @@ namespace osu.Game.Screens.Edit.Setup
overallDifficultySlider = new LabelledSliderBar<float>
{
Label = "Overall Difficulty",
FixedLabelWidth = LABEL_WIDTH,
Description = "The harshness of hit windows and difficulty of special objects (ie. spinners)",
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty)
{

View File

@ -27,24 +27,28 @@ namespace osu.Game.Screens.Edit.Setup
artistTextBox = new LabelledTextBox
{
Label = "Artist",
FixedLabelWidth = LABEL_WIDTH,
Current = { Value = Beatmap.Metadata.Artist },
TabbableContentContainer = this
},
titleTextBox = new LabelledTextBox
{
Label = "Title",
FixedLabelWidth = LABEL_WIDTH,
Current = { Value = Beatmap.Metadata.Title },
TabbableContentContainer = this
},
creatorTextBox = new LabelledTextBox
{
Label = "Creator",
FixedLabelWidth = LABEL_WIDTH,
Current = { Value = Beatmap.Metadata.AuthorString },
TabbableContentContainer = this
},
difficultyTextBox = new LabelledTextBox
{
Label = "Difficulty Name",
FixedLabelWidth = LABEL_WIDTH,
Current = { Value = Beatmap.BeatmapInfo.Version },
TabbableContentContainer = this
},

View File

@ -54,6 +54,7 @@ namespace osu.Game.Screens.Edit.Setup
backgroundTextBox = new FileChooserLabelledTextBox(".jpg", ".jpeg", ".png")
{
Label = "Background",
FixedLabelWidth = LABEL_WIDTH,
PlaceholderText = "Click to select a background image",
Current = { Value = working.Value.Metadata.BackgroundFile },
Target = backgroundFileChooserContainer,
@ -72,6 +73,7 @@ namespace osu.Game.Screens.Edit.Setup
audioTrackTextBox = new FileChooserLabelledTextBox(".mp3", ".ogg")
{
Label = "Audio Track",
FixedLabelWidth = LABEL_WIDTH,
PlaceholderText = "Click to select a track",
Current = { Value = working.Value.Metadata.AudioFile },
Target = audioTrackFileChooserContainer,

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterfaceV2;
using osuTK;
namespace osu.Game.Screens.Edit.Setup
@ -15,6 +16,11 @@ namespace osu.Game.Screens.Edit.Setup
{
private readonly FillFlowContainer flow;
/// <summary>
/// Used to align some of the child <see cref="LabelledDrawable{T}"/>s together to achieve a grid-like look.
/// </summary>
protected const float LABEL_WIDTH = 160;
[Resolved]
protected OsuColour Colours { get; private set; }