Fixed Drop Line

This commit is contained in:
JacobTech 2024-11-18 01:18:26 -05:00
parent 99f6434b50
commit 169a20daf0
2 changed files with 17 additions and 1 deletions

View File

@ -2,6 +2,7 @@ using GraphicsManager.Enums;
using GraphicsManager.Interfaces; using GraphicsManager.Interfaces;
using GraphicsManager.Objects; using GraphicsManager.Objects;
using GraphicsManager.Objects.Core; using GraphicsManager.Objects.Core;
using Luski.GUI.MainScreen.UI.Generic;
using OpenTK.Mathematics; using OpenTK.Mathematics;
using OpenTK.Windowing.Common; using OpenTK.Windowing.Common;
@ -9,7 +10,7 @@ namespace Luski.GUI.MainScreen.UI.LuskiControls;
public class DropDown<TSelection> : UserControl where TSelection : DropDownOption public class DropDown<TSelection> : UserControl where TSelection : DropDownOption
{ {
public readonly FlowLayout DropDownContainer; public readonly LuskiFlow DropDownContainer;
private IParent ip; private IParent ip;
@ -141,9 +142,13 @@ public class DropDown<TSelection> : UserControl where TSelection : DropDownOptio
DropDownContainer.Location = this.GetParentLocation(DropDownParentOverride)+ new Vector2i(0, Size.Y); DropDownContainer.Location = this.GetParentLocation(DropDownParentOverride)+ new Vector2i(0, Size.Y);
DropDownParentOverride.Controls.Add(DropDownContainer); DropDownParentOverride.Controls.Add(DropDownContainer);
DropDownContainer.Size = new(Size.X, DropDownContainer.Size.Y); DropDownContainer.Size = new(Size.X, DropDownContainer.Size.Y);
Console.WriteLine(DropDownContainer.Controls[0].Location);
Console.WriteLine(DropDownContainer.Controls[0].Size);
DropDownContainer.ForceDistanceUpdate(DropDownParentOverride); DropDownContainer.ForceDistanceUpdate(DropDownParentOverride);
IsOpen = true; IsOpen = true;
DropDownContainer.Visible = IsOpen; DropDownContainer.Visible = IsOpen;
DropDownContainer.Controls[0].Location = new(1);
DropDownContainer.Controls[0].Location = new(0);
DropDownParentOverride.Controls.MoveControlToEnd(DropDownContainer); DropDownParentOverride.Controls.MoveControlToEnd(DropDownContainer);
if (OpenStatusChanged is not null) OpenStatusChanged.Invoke(IsOpen); if (OpenStatusChanged is not null) OpenStatusChanged.Invoke(IsOpen);
BlockDraw = false; BlockDraw = false;

View File

@ -513,6 +513,17 @@ public class MainScreenWindow : Window
{ {
ForceUpdate(); 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) else if (e.Key == Keys.F10)
{ {
CheckParent(this); CheckParent(this);