Add printLine support for commands and implement basic UI controls rendering

This commit is contained in:
Stone_Red
2026-06-08 19:51:22 +02:00
parent fc71af028f
commit 8b900c9d58
14 changed files with 178 additions and 29 deletions
+28
View File
@@ -36,6 +36,34 @@ public class DesktopProcess : Process
// 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));
testWindow.CreateUIElement<RemSox.UI.GUI.UIEelements.Controls.Button>(b =>
{
b.Position = new System.Drawing.Point(20, 30);
b.Size = new System.Drawing.Size(100, 30);
b.Text = "Click Me";
b.BackgroundColor = System.Drawing.Color.LightBlue;
});
testWindow.CreateUIElement<RemSox.UI.GUI.UIEelements.Controls.CheckBox>(c =>
{
c.Position = new System.Drawing.Point(20, 80);
c.Text = "Check Me";
c.IsChecked = true;
});
testWindow.CreateUIElement<RemSox.UI.GUI.UIEelements.Shapes.Line>(l =>
{
l.Position = new System.Drawing.Point(20, 130);
l.EndPosition = new System.Drawing.Point(180, 130);
l.Color = System.Drawing.Color.Red;
});
testWindow.AutoFlush = true;
testWindow.Flush();
while (!StopRequested)
{
WindowManager.Update();
+1 -5
View File
@@ -77,15 +77,11 @@ public class TerminalProcess : Process
}
else
{
bool found = CommandManager.TryExecute(cmd);
bool found = CommandManager.TryExecute(cmd, line => PrintLine(line));
if (!found)
{
PrintLine($"\"{cmd}\" is not a command");
}
else
{
PrintLine("Command executed. (Output sent to background console)");
}
}
}
UpdateDisplay();