diff --git a/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs b/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs index d957a92..45e7f7f 100644 --- a/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs +++ b/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs @@ -142,8 +142,6 @@ public class DropDown : 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; diff --git a/Luski/GUI/MainScreen/UI/SettingsPanel/ExperimentGUI.cs b/Luski/GUI/MainScreen/UI/SettingsPanel/ExperimentGUI.cs index f6dda68..5d8ea28 100644 --- a/Luski/GUI/MainScreen/UI/SettingsPanel/ExperimentGUI.cs +++ b/Luski/GUI/MainScreen/UI/SettingsPanel/ExperimentGUI.cs @@ -13,6 +13,7 @@ public class ExperimentGUI : UserControl public DropDown 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); + } } \ No newline at end of file