fix flowcontainer order properly and removed todo as its decided to do nothing there for now

This commit is contained in:
Olle Kelderman 2020-05-25 00:55:10 +02:00
parent 1062e07ec1
commit a174117880
1 changed files with 4 additions and 9 deletions

View File

@ -151,7 +151,7 @@ public IEnumerable<T> Items
private class ActionableInfo : LabelledDrawable<Drawable>
{
protected OsuButton Button;
private OsuButton button;
public ActionableInfo()
: base(true)
@ -160,7 +160,7 @@ public ActionableInfo()
public string ButtonText
{
set => Button.Text = value;
set => button.Text = value;
}
public string Value
@ -197,7 +197,7 @@ public bool Failing
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{
Button = new TriangleButton
button = new TriangleButton
{
Size = new Vector2(100, 30),
Action = () => Action?.Invoke()
@ -219,11 +219,10 @@ private class ResolutionSelector : ActionableInfo
protected override Drawable CreateComponent()
{
var drawable = base.CreateComponent();
FlowContainer.Insert(0, numberBox = new OsuNumberBox
FlowContainer.Insert(-1, numberBox = new OsuNumberBox
{
Width = 100
});
FlowContainer.SetLayoutPosition(Button, 1);
base.Action = () =>
{
@ -246,10 +245,6 @@ protected override Drawable CreateComponent()
Action?.Invoke(number);
}
else
{
// TODO: input box was empty, give user feedback? do nothing?
}
};
return drawable;
}