Fixed Experiments Size

This commit is contained in:
JacobTech 2024-11-18 00:46:12 -05:00
parent dc4d86ce26
commit 99f6434b50
4 changed files with 28 additions and 5 deletions

View File

@ -0,0 +1,22 @@
using GraphicsManager.Enums;
using GraphicsManager.Interfaces;
using GraphicsManager.Objects;
namespace Luski.GUI.MainScreen.UI.Generic;
public class LuskiFlow : FlowLayout
{
public override void ParentResize()
{
BlockDraw = true;
for (int i = 0; i < Controls.Length; i++)
{
if (Controls[i] is IParent parent)
{
parent.ParentResize();
}
}
if (Parent is not null) Parent.TryDraw();
BlockDraw = false;
}
}

View File

@ -1,10 +1,11 @@
using GraphicsManager.Enums; using GraphicsManager.Enums;
using GraphicsManager.Objects; using GraphicsManager.Objects;
using GraphicsManager.Objects.Core; using GraphicsManager.Objects.Core;
using Luski.GUI.MainScreen.UI.Generic;
namespace Luski.GUI.MainScreen.UI.LuskiControls.SettingsMenuBase.Core; namespace Luski.GUI.MainScreen.UI.LuskiControls.SettingsMenuBase.Core;
public class PageFlow : FlowLayout, ISettingsPage public class PageFlow : LuskiFlow, ISettingsPage
{ {
public string PageName public string PageName
{ {

View File

@ -38,7 +38,7 @@ public class ExperimentGUI : UserControl
} }
Top = new(Globals.DefaultFont) Top = new(Globals.DefaultFont)
{ {
Location = new(5.ScaleInt(), 5.ScaleInt()), Location = new(5.ScaleInt()),
Text = ei.DisplayName Text = ei.DisplayName
}; };
Label n = new(Globals.MessageFont) Label n = new(Globals.MessageFont)
@ -68,7 +68,7 @@ public class ExperimentGUI : UserControl
dd = new(Globals.ms.TextureManager.GetTextureResource("RoundedRectangle.png"), new Rectangle() dd = new(Globals.ms.TextureManager.GetTextureResource("RoundedRectangle.png"), new Rectangle()
{ {
Size = new(1.ScaleInt()), Size = new(1.ScaleInt()),
BackgroundColor = Color4.Gray, BackgroundColor = Color4.Gray
}, Disabled) }, Disabled)
{ {
Size = new(base.Size.X, 40.ScaleInt()), Size = new(base.Size.X, 40.ScaleInt()),
@ -142,7 +142,7 @@ public class ExperimentGUI : UserControl
line.ForceDistanceUpdate(this); line.ForceDistanceUpdate(this);
Controls.Add(line); Controls.Add(line);
Controls.Add(Top); 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)); 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) private Task DdOnOptionSelected(ExperimentDropButton arg)

View File

@ -22,7 +22,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="GraphicsManager" Version="1.1.1-alpha24" /> <PackageReference Include="GraphicsManager" Version="1.1.1-alpha25" />
<PackageReference Include="Luski.net" Version="2.0.1-alpha18" /> <PackageReference Include="Luski.net" Version="2.0.1-alpha18" />
<PackageReference Include="Updater" Version="1.0.0-alpha04" /> <PackageReference Include="Updater" Version="1.0.0-alpha04" />
</ItemGroup> </ItemGroup>