Add automatic window positioning to avoid overlap and maximize spaciousness

This commit is contained in:
Stone_Red
2026-06-10 04:02:54 +02:00
parent 3a635e85df
commit fad05a3e9a
5 changed files with 124 additions and 23 deletions
+1 -9
View File
@@ -1,5 +1,3 @@
using Cosmos.Kernel.System.Graphics;
using RemSox.Processing;
using RemSox.UI.GUI.Rendering;
using RemSox.UI.GUI.Windows;
@@ -18,17 +16,11 @@ internal class DesktopProcess() : Process("Desktop Manager")
isGraphicsInitialized = true;
}
// Trigger Canvas initialization
_ = FullScreenCanvas.GetFullScreenCanvas();
// Force existing windows to redraw onto the new canvas renderer
WindowManager.InvalidateAll();
// Start the terminal process within the desktop environment
_ = ProcessManager.SpawnProcess<TerminalProcess>();
// Create a test window for new UI controls
Window testWindow = WindowManager.CreateWindow(this, "UI Controls Test", new System.Drawing.Point(500, 50), new System.Drawing.Size(200, 180));
Window testWindow = WindowManager.CreateWindow(this, "UI Controls Test", new System.Drawing.Size(200, 180));
_ = testWindow.CreateUIElement<UI.GUI.UIEelements.Controls.Button>(b =>
{