mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 04:57:38 +09:00
Merge pull request #12027 from peppy/new-beatmap-empty-fields
Don't fill beatmap metadata with template values on creating a new beatmap
This commit is contained in:
commit
5a7e416495
@ -113,8 +113,6 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
var metadata = new BeatmapMetadata
|
var metadata = new BeatmapMetadata
|
||||||
{
|
{
|
||||||
Artist = "artist",
|
|
||||||
Title = "title",
|
|
||||||
Author = user,
|
Author = user,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -128,7 +126,6 @@ namespace osu.Game.Beatmaps
|
|||||||
BaseDifficulty = new BeatmapDifficulty(),
|
BaseDifficulty = new BeatmapDifficulty(),
|
||||||
Ruleset = ruleset,
|
Ruleset = ruleset,
|
||||||
Metadata = metadata,
|
Metadata = metadata,
|
||||||
Version = "difficulty"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterfaceV2
|
namespace osu.Game.Graphics.UserInterfaceV2
|
||||||
@ -53,6 +54,14 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
CornerRadius = CORNER_RADIUS,
|
CornerRadius = CORNER_RADIUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override bool AcceptsFocus => true;
|
||||||
|
|
||||||
|
protected override void OnFocus(FocusEvent e)
|
||||||
|
{
|
||||||
|
base.OnFocus(e);
|
||||||
|
GetContainingInputManager().ChangeFocus(Component);
|
||||||
|
}
|
||||||
|
|
||||||
protected override OsuTextBox CreateComponent() => CreateTextBox().With(t =>
|
protected override OsuTextBox CreateComponent() => CreateTextBox().With(t =>
|
||||||
{
|
{
|
||||||
t.OnCommit += (sender, newText) => OnCommit?.Invoke(sender, newText);
|
t.OnCommit += (sender, newText) => OnCommit?.Invoke(sender, newText);
|
||||||
|
@ -56,6 +56,14 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
item.OnCommit += onCommit;
|
item.OnCommit += onCommit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(artistTextBox.Current.Value))
|
||||||
|
GetContainingInputManager().ChangeFocus(artistTextBox);
|
||||||
|
}
|
||||||
|
|
||||||
private void onCommit(TextBox sender, bool newText)
|
private void onCommit(TextBox sender, bool newText)
|
||||||
{
|
{
|
||||||
if (!newText) return;
|
if (!newText) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user