From 169a20daf0563a5054b42e6d3c299a9e16769cb0 Mon Sep 17 00:00:00 2001 From: JacobTech Date: Mon, 18 Nov 2024 01:18:26 -0500 Subject: [PATCH] Fixed Drop Line --- Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs | 7 ++++++- Luski/GUI/MainScreenWindow.cs | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs b/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs index 3880820..d957a92 100644 --- a/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs +++ b/Luski/GUI/MainScreen/UI/LuskiControls/DropDown.cs @@ -2,6 +2,7 @@ using GraphicsManager.Enums; using GraphicsManager.Interfaces; using GraphicsManager.Objects; using GraphicsManager.Objects.Core; +using Luski.GUI.MainScreen.UI.Generic; using OpenTK.Mathematics; using OpenTK.Windowing.Common; @@ -9,7 +10,7 @@ namespace Luski.GUI.MainScreen.UI.LuskiControls; public class DropDown : UserControl where TSelection : DropDownOption { - public readonly FlowLayout DropDownContainer; + public readonly LuskiFlow DropDownContainer; private IParent ip; @@ -141,9 +142,13 @@ 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; + DropDownContainer.Controls[0].Location = new(1); + DropDownContainer.Controls[0].Location = new(0); DropDownParentOverride.Controls.MoveControlToEnd(DropDownContainer); if (OpenStatusChanged is not null) OpenStatusChanged.Invoke(IsOpen); BlockDraw = false; diff --git a/Luski/GUI/MainScreenWindow.cs b/Luski/GUI/MainScreenWindow.cs index 988d263..5feb5f0 100644 --- a/Luski/GUI/MainScreenWindow.cs +++ b/Luski/GUI/MainScreenWindow.cs @@ -513,6 +513,17 @@ public class MainScreenWindow : Window { ForceUpdate(); } + else if (e.Key == Keys.F9) + { + if (HoveringControl is IParent p) + { + Globals.PrintParent(p); + } + else + { + Globals.PrintParent(this); + } + } else if (e.Key == Keys.F10) { CheckParent(this);