mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-06 07:46:29 +02:00
Add DesktopProcess and start-gui command for launching GUI mode
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using RemSox.Processing;
|
||||
using RemSox.Processes;
|
||||
using RemSox.UI.GUI.CLI;
|
||||
|
||||
namespace RemSox.UI.GUI.CLI.Commands;
|
||||
|
||||
public class StartGuiCommand : ICommand
|
||||
{
|
||||
public string Name => "start-gui";
|
||||
public string Description => "Starts the Graphical User Interface (Desktop Process)";
|
||||
|
||||
public void Execute(string? args)
|
||||
{
|
||||
Console.WriteLine("Starting Desktop Process...");
|
||||
ProcessManager.SpawnProcess<DesktopProcess>();
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,12 @@ public sealed class Window(string title, int processId, int id, IRenderSource re
|
||||
return uiElement;
|
||||
}
|
||||
|
||||
public void Invalidate()
|
||||
{
|
||||
isFirstRender = true;
|
||||
Flush();
|
||||
}
|
||||
|
||||
public void Flush()
|
||||
{
|
||||
if (!IsVisible)
|
||||
|
||||
@@ -140,6 +140,17 @@ public static class WindowManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void InvalidateAll()
|
||||
{
|
||||
foreach (var processWindows in windows.Values)
|
||||
{
|
||||
foreach (var window in processWindows)
|
||||
{
|
||||
window.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetNextWindowId()
|
||||
{
|
||||
return nextWindowId++;
|
||||
|
||||
Reference in New Issue
Block a user