Finished Experiments Page
This commit is contained in:
parent
ba71d022d6
commit
41438004d5
@ -142,8 +142,6 @@ public class DropDown<TSelection> : UserControl where TSelection : DropDownOptio
|
||||
DropDownContainer.Location = this.GetParentLocation(DropDownParentOverride)+ new Vector2i(0, Size.Y);
|
||||
DropDownParentOverride.Controls.Add(DropDownContainer);
|
||||
DropDownContainer.Size = new(Size.X, DropDownContainer.Size.Y);
|
||||
Console.WriteLine(DropDownContainer.Controls[0].Location);
|
||||
Console.WriteLine(DropDownContainer.Controls[0].Size);
|
||||
DropDownContainer.ForceDistanceUpdate(DropDownParentOverride);
|
||||
IsOpen = true;
|
||||
DropDownContainer.Visible = IsOpen;
|
||||
|
@ -13,6 +13,7 @@ public class ExperimentGUI : UserControl
|
||||
public DropDown<ExperimentDropButton> dd;
|
||||
private static Texture? TopOpen, BottomOpen;
|
||||
private ExperimentSelectorInfo? currentEnabled;
|
||||
private Label n;
|
||||
|
||||
private static ExperimentSelectorInfo DisabledESI = new()
|
||||
{
|
||||
@ -40,7 +41,7 @@ public class ExperimentGUI : UserControl
|
||||
Location = new(5.ScaleInt()),
|
||||
Text = ei.DisplayName
|
||||
};
|
||||
Label n = new(Globals.MessageFont)
|
||||
n = new(Globals.MessageFont)
|
||||
{
|
||||
Text = ei.Name,
|
||||
Location = new(Top.Location.X, Top.Location.Y + Top.Size.Y + Top.Location.Y),
|
||||
@ -130,7 +131,6 @@ public class ExperimentGUI : UserControl
|
||||
dd.ForceDistanceUpdate(this);
|
||||
|
||||
Controls.Add(Top);
|
||||
base.BackgroundColor = new((byte)new Random().Next(255),(byte)new Random().Next(255),(byte)new Random().Next(255),(byte)new Random().Next(255));
|
||||
}
|
||||
|
||||
private Task DdOnOptionSelected(ExperimentDropButton arg)
|
||||
@ -147,4 +147,11 @@ public class ExperimentGUI : UserControl
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public override void ParentResize()
|
||||
{
|
||||
base.ParentResize();
|
||||
dd.Location = new(Top.Location.X, n.Location.Y + n.Size.Y + Top.Location.Y);
|
||||
dd.ForceDistanceUpdate(this);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user