mirror of
https://github.com/ppy/osu
synced 2025-02-08 14:17:29 +00:00
Only pad textbox after collection is created
This commit is contained in:
parent
38ade433a6
commit
2e40ff25f7
@ -60,6 +60,7 @@ namespace osu.Game.Collections
|
||||
[Resolved]
|
||||
private BeatmapCollectionManager collectionManager { get; set; }
|
||||
|
||||
private Container textBoxPaddingContainer;
|
||||
private ItemTextBox textBox;
|
||||
|
||||
public ItemContent(BeatmapCollection collection)
|
||||
@ -85,7 +86,7 @@ namespace osu.Game.Collections
|
||||
IsCreated = { BindTarget = IsCreated },
|
||||
IsTextBoxHovered = v => textBox.ReceivePositionalInputAt(v)
|
||||
},
|
||||
new Container
|
||||
textBoxPaddingContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = button_width },
|
||||
@ -107,7 +108,9 @@ namespace osu.Game.Collections
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
collectionName.BindValueChanged(_ => createNewCollection(), true);
|
||||
IsCreated.BindValueChanged(created => textBoxPaddingContainer.Padding = new MarginPadding { Right = created.NewValue ? button_width : 0 }, true);
|
||||
}
|
||||
|
||||
private void createNewCollection()
|
||||
|
Loading…
Reference in New Issue
Block a user