Combined
This commit is contained in:
@ -29,7 +29,7 @@ public class FPSWindow : GameWindow , IWindow
|
||||
}
|
||||
}
|
||||
|
||||
public IRenderObject? focused { get; set; }
|
||||
public RenderObjectCore? focused { get; set; }
|
||||
|
||||
public bool LogFrames { get; set; } = true;
|
||||
public int SubFrameCount { get; set; }
|
||||
@ -329,14 +329,14 @@ public class FPSWindow : GameWindow , IWindow
|
||||
Controls[i].Location.X + Controls[i].Size.X < 0 ||
|
||||
Controls[i].Location.Y + Controls[i].Size.Y < 0) continue;
|
||||
|
||||
if (Controls[i] is IParent pp)
|
||||
if (Controls[i] is ParentBase p)
|
||||
{
|
||||
pp.ResizeDraw(0,0,0,0,CS.X, CS.Y);
|
||||
p.Draw(0, 0, 0, 0, CS.X, CS.Y);
|
||||
GL.Scissor(0, 0, CS.X, CS.Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
Controls[i].Draw(0,0,0,0,CS.X, CS.Y);
|
||||
Controls[i].DrawSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -385,7 +385,7 @@ public class FPSWindow : GameWindow , IWindow
|
||||
public bool UseLiveView { get; set; } = false;
|
||||
public bool CollectUpperFiles { get; set; }
|
||||
|
||||
public void ReportSizeUpdate(IRenderObject Control)
|
||||
public void ReportSizeUpdate(RenderObjectCore Control)
|
||||
{
|
||||
|
||||
}
|
||||
@ -431,7 +431,7 @@ public class FPSWindow : GameWindow , IWindow
|
||||
public event Func<FPSWindow, Task>? WindowLoaded;
|
||||
public List<Window> Windows = new();
|
||||
|
||||
public IRenderObject? HoveringControl { get; set; }
|
||||
public RenderObjectCore? HoveringControl { get; set; }
|
||||
|
||||
private void WhenMouseMove(MouseMoveEventArgs obj)
|
||||
{
|
||||
@ -440,11 +440,11 @@ public class FPSWindow : GameWindow , IWindow
|
||||
|
||||
protected virtual void HoverCheck(MouseMoveEventArgs obj)
|
||||
{
|
||||
IRenderObject? cb = null;
|
||||
RenderObjectCore? cb = null;
|
||||
SubHitBox? cbhb = null;
|
||||
IRenderObject? checkcontrol(IRenderObject render, int add_x = 0, int addy = 0, IRenderObject? CurrentBest = null)
|
||||
RenderObjectCore? checkcontrol(RenderObjectCore render, int add_x = 0, int addy = 0, RenderObjectCore? CurrentBest = null)
|
||||
{
|
||||
void ClearHoverChain(IRenderObject ChainObject)
|
||||
void ClearHoverChain(RenderObjectCore ChainObject)
|
||||
{
|
||||
if (ChainObject is IParent parent)
|
||||
{
|
||||
@ -517,7 +517,7 @@ public class FPSWindow : GameWindow , IWindow
|
||||
|
||||
if (cb != HoveringControl)
|
||||
{
|
||||
IRenderObject? old = HoveringControl;
|
||||
RenderObjectCore? old = HoveringControl;
|
||||
HoveringControl = cb;
|
||||
if (cb is not null)
|
||||
{
|
||||
@ -554,9 +554,9 @@ public class FPSWindow : GameWindow , IWindow
|
||||
public bool IgnoreVisForChildren { get; set; }
|
||||
public const float alpha = 254f / byte.MaxValue;
|
||||
|
||||
public virtual void CheckParent(IParent p, IRenderObject c, int xx, Vector2i di)
|
||||
public virtual void CheckParent(IParent p, RenderObjectCore c, int xx, Vector2i di)
|
||||
{
|
||||
if (p.IgnoreVisForChildren || p.Controls.Length <= 1 || xx >= p.Controls.Length || !c.Visible || c is ILabel || (c is Rectangle r && r.BackgroundColor.A <= alpha)) return;
|
||||
if (p.IgnoreVisForChildren || p.Controls.Length <= 1 || xx >= p.Controls.Length || !c.Visible || c is LabelBase || (c is Rectangle r && r.BackgroundColor.A <= alpha)) return;
|
||||
for (int i = xx; i > 0; i--)
|
||||
{
|
||||
if (!p.Controls[i].IsVisible ||
|
||||
@ -624,8 +624,15 @@ public class FPSWindow : GameWindow , IWindow
|
||||
Controls[i].Location.Y >= CS.Y ||
|
||||
Controls[i].Location.X + Controls[i].Size.X < 0 ||
|
||||
Controls[i].Location.Y + Controls[i].Size.Y < 0) continue;
|
||||
Controls[i].Draw(0,0,0,0,CS.X, CS.Y);
|
||||
if (Controls[i] is IParent) GL.Scissor(0, 0, CS.X, CS.Y);
|
||||
if (Controls[i] is ParentBase p)
|
||||
{
|
||||
p.Draw(0, 0, 0, 0, CS.X, CS.Y);
|
||||
GL.Scissor(0, 0, CS.X, CS.Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
Controls[i].DrawSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||