Skip to content

Commit

Permalink
Upload newest code for LoxyMono
Browse files Browse the repository at this point in the history
  • Loading branch information
MEMESCOEP committed Oct 17, 2022
1 parent 5a5059f commit 13a27d9
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 195 deletions.
4 changes: 2 additions & 2 deletions src/XenOS/CustomConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public void CMD()
{

}
GUI gui = new GUI();
gui.INIT();
//GUI gui = new GUI();
//gui.INIT();
break;
}
}
Expand Down
185 changes: 90 additions & 95 deletions src/XenOS/GUI.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/XenOS/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public static void MoveItemAtIndexToFront<T>(List<T> list, int index)
public static void MoveItemAtIndex<T>(List<T> list, int OldIndex, int NewIndex)
{
T item = list[OldIndex];
list.RemoveAt(OldIndex);
list.Insert(NewIndex, item);
list.RemoveAt(OldIndex);
}
}
}
2 changes: 1 addition & 1 deletion src/XenOS/Shell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class Shell
public static API auraApi;
public static string username = "root";
public static string OsName = "XenOS";
public static string Version = "Alpha 083022_1005P";
public static string Version = "Alpha 101622_727P";
public static string Logo = @"|\ \ / /|\ ___ \ |\ ___ \|\ __ \|\ ____\
\ \ \/ / | \ __/|\ \ \\ \ \ \ \|\ \ \ \___|_
\ \ / / \ \ \_|/_\ \ \\ \ \ \ \\\ \ \_____ \
Expand Down
71 changes: 32 additions & 39 deletions src/XenOS/WindowManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ namespace XenOS
internal class WindowManager
{
// Variables
[ManifestResourceStream(ResourceName = "XenOS.Fonts.segoeuil.ttf")]
static byte[] FontData;

public bool ActiveWindow = false;
public int WindowID = 0;
public int WindowPosX = 0;
Expand All @@ -22,6 +19,7 @@ internal class WindowManager
public string WindowText;
public Color windowColor;
public Color TitleBarColor;
public Color TitleBarColorBG;
public Color TitleColor;
public Cosmos.System.Graphics.Point TitlePos;
public Cosmos.System.Graphics.Point TitlebarPos;
Expand All @@ -42,12 +40,12 @@ public void init()
{
WindowID = GUI.windows.Count;
GUI.windows.Add(this);
this.WindowPen = new Pen(windowColor);
this.TitlePen = new Pen(TitleColor);
this.TitleBarPen = new Pen(TitleBarColor);
this.TitlePos = new Cosmos.System.Graphics.Point(0, 0);
this.TitlebarPos = new Cosmos.System.Graphics.Point(0, 0);
this.BodyPos = new Cosmos.System.Graphics.Point(0, 0);
WindowPen = new Pen(windowColor);
TitlePen = new Pen(TitleColor);
TitleBarPen = new Pen(TitleBarColor);
TitlePos = new Cosmos.System.Graphics.Point(0, 0);
TitlebarPos = new Cosmos.System.Graphics.Point(0, 0);
BodyPos = new Cosmos.System.Graphics.Point(0, 0);
}
catch
{
Expand All @@ -61,19 +59,28 @@ public void DrawWindow(Canvas canvas)
{
if (WindowPen != null && TitlePen != null)
{
this.BodyPos.X = WindowPosX;
this.BodyPos.Y = WindowPosY;
this.TitlebarPos.X = WindowPosX;
this.TitlebarPos.Y = WindowPosY;
this.TitlePos.X = WindowPosX + ((WindowWidth / 2) - (Title.Length * 4));
this.TitlePos.Y = WindowPosY + 20;
if (ActiveWindow)
{
TitleBarPen.Color = TitleBarColor;
TitlePen.Color = TitleColor;
}
else
{
TitleBarPen.Color = Color.LightGray;
TitlePen.Color = Color.Gray;
}

canvas.DrawFilledRectangle(WindowPen, BodyPos, WindowWidth, WindowHeight);
canvas.DrawFilledRectangle(TitleBarPen, TitlebarPos, WindowWidth, 40);
canvas.DrawImage(GUI.CloseWindow, WindowPosX + (WindowWidth - 20), WindowPosY + 12);
BodyPos.X = WindowPosX;
BodyPos.Y = WindowPosY;
TitlebarPos.X = WindowPosX;
TitlebarPos.Y = WindowPosY;
TitlePos.X = WindowPosX + ((WindowWidth / 2) - (Title.Length * 4));
TitlePos.Y = WindowPosY + 20;

//TTFManager.DrawStringTTF(canvas, TitlePen, Title, "Font", 16f, TitlePos);
canvas.DrawString(Title, Cosmos.System.Graphics.Fonts.PCScreenFont.Default, TitlePen, TitlePos); //new Cosmos.System.Graphics.Point(WindowPosX + ((WindowWidth / 2) - (Title.Length * 4)), WindowPosY + 20)
canvas.DrawFilledRectangle(WindowPen, BodyPos, WindowWidth, WindowHeight);
canvas.DrawFilledRectangle(TitleBarPen, TitlebarPos, WindowWidth, 40);
canvas.DrawImageAlpha(GUI.CloseWindow, WindowPosX + (WindowWidth - 20), WindowPosY + 12);
canvas.DrawString(Title, Cosmos.System.Graphics.Fonts.PCScreenFont.Default, TitlePen, TitlePos);
}
}
catch
Expand All @@ -82,28 +89,14 @@ public void DrawWindow(Canvas canvas)
}
}

public bool CheckIfDragged()
public bool CheckIfDraggable()
{
if (IsBetween(Cosmos.System.MouseManager.X, WindowPosX, WindowPosX + (WindowWidth - 40)) && IsBetween(Cosmos.System.MouseManager.Y, WindowPosY, WindowPosY + 40))
{
return true;
}
else
{
return false;
}
return (IsBetween(Cosmos.System.MouseManager.X, WindowPosX, WindowPosX + (WindowWidth - 40)) && IsBetween(Cosmos.System.MouseManager.Y, WindowPosY, WindowPosY + 40));
}

public bool CheckIfClosed()
{
if (IsBetween(Cosmos.System.MouseManager.X, WindowPosX + WindowWidth, WindowPosX + (WindowWidth - 40)) && IsBetween(Cosmos.System.MouseManager.Y, WindowPosY, WindowPosY + 40))
{
return true;
}
else
{
return false;
}
return (IsBetween(Cosmos.System.MouseManager.X, WindowPosX + WindowWidth, WindowPosX + (WindowWidth - 40)) && IsBetween(Cosmos.System.MouseManager.Y, WindowPosY, WindowPosY + 40));
}

public bool CheckIfActive()
Expand All @@ -114,7 +107,7 @@ public bool CheckIfActive()
}
else
{
if(Cosmos.System.MouseManager.MouseState == Cosmos.System.MouseState.Left)
if(Cosmos.System.MouseManager.MouseState != Cosmos.System.MouseState.None)
{
if (IsBetween(Cosmos.System.MouseManager.X, WindowPosX, WindowPosX + WindowWidth) && IsBetween(Cosmos.System.MouseManager.Y, WindowPosY, WindowPosY + WindowHeight))
{
Expand All @@ -127,7 +120,7 @@ public bool CheckIfActive()
}
else
{
return true;
return false;
}
}
}
Expand Down
Binary file modified src/XenOS/obj/Debug/net6.0/XenOS.assets.cache
Binary file not shown.
Binary file modified src/XenOS/obj/Debug/net6.0/XenOS.csproj.AssemblyReference.cache
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7fa466e5cccfa1e44129cec5ed4027968ded02f5
373283f4b116a70bb70f51e3e83d8ab7fecb33c9
Binary file modified src/XenOS/obj/Debug/net6.0/XenOS.dll
Binary file not shown.
Binary file modified src/XenOS/obj/Debug/net6.0/XenOS.pdb
Binary file not shown.
Binary file modified src/XenOS/obj/Debug/net6.0/ref/XenOS.dll
Binary file not shown.
Binary file modified src/XenOS/obj/Debug/net6.0/refint/XenOS.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions src/XenOS/obj/XenOS.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<SourceRoot Include="C:\Users\andre\.nuget\packages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20220825095601\build\Cosmos.Build.props" Condition="Exists('$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20220825095601\build\Cosmos.Build.props')" />
<Import Project="$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20221014111716\build\Cosmos.Build.props" Condition="Exists('$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20221014111716\build\Cosmos.Build.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgCosmos_Build Condition=" '$(PkgCosmos_Build)' == '' ">C:\Users\andre\.nuget\packages\cosmos.build\0.1.0-localbuild20220825095601</PkgCosmos_Build>
<PkgCosmos_Build Condition=" '$(PkgCosmos_Build)' == '' ">C:\Users\andre\.nuget\packages\cosmos.build\0.1.0-localbuild20221014111716</PkgCosmos_Build>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/XenOS/obj/XenOS.csproj.nuget.g.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20220825095601\build\Cosmos.Build.targets" Condition="Exists('$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20220825095601\build\Cosmos.Build.targets')" />
<Import Project="$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20221014111716\build\Cosmos.Build.targets" Condition="Exists('$(NuGetPackageRoot)cosmos.build\0.1.0-localbuild20221014111716\build\Cosmos.Build.targets')" />
</ImportGroup>
</Project>
92 changes: 46 additions & 46 deletions src/XenOS/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"version": 3,
"targets": {
"net6.0": {
"Cosmos.Build/0.1.0-localbuild20220825095601": {
"Cosmos.Build/0.1.0-localbuild20221014111716": {
"type": "package",
"build": {
"build/Cosmos.Build.props": {},
"build/Cosmos.Build.targets": {}
}
},
"Cosmos.Common/0.1.0-localbuild20220825095617": {
"Cosmos.Common/0.1.0-localbuild20221014111733": {
"type": "package",
"dependencies": {
"Cosmos.Debug.Kernel": "0.1.0-localbuild20220825095617"
"Cosmos.Debug.Kernel": "0.1.0-localbuild20221014111733"
},
"compile": {
"lib/net6.0/Cosmos.Common.dll": {}
Expand All @@ -21,11 +21,11 @@
"lib/net6.0/Cosmos.Common.dll": {}
}
},
"Cosmos.Core/0.1.0-localbuild20220825095617": {
"Cosmos.Core/0.1.0-localbuild20221014111733": {
"type": "package",
"dependencies": {
"Cosmos.Debug.Kernel": "0.1.0-localbuild20220825095617",
"IL2CPU.API": "0.1.0-localbuild20220825095617"
"Cosmos.Debug.Kernel": "0.1.0-localbuild20221014111733",
"IL2CPU.API": "0.1.0-localbuild20221014111733"
},
"compile": {
"lib/net6.0/Cosmos.Core.dll": {}
Expand All @@ -34,7 +34,7 @@
"lib/net6.0/Cosmos.Core.dll": {}
}
},
"Cosmos.Debug.Kernel/0.1.0-localbuild20220825095617": {
"Cosmos.Debug.Kernel/0.1.0-localbuild20221014111733": {
"type": "package",
"compile": {
"lib/netstandard2.0/Cosmos.Debug.Kernel.dll": {}
Expand All @@ -43,13 +43,13 @@
"lib/netstandard2.0/Cosmos.Debug.Kernel.dll": {}
}
},
"Cosmos.HAL2/0.1.0-localbuild20220825095617": {
"Cosmos.HAL2/0.1.0-localbuild20221014111733": {
"type": "package",
"dependencies": {
"Cosmos.Common": "0.1.0-localbuild20220825095617",
"Cosmos.Core": "0.1.0-localbuild20220825095617",
"Cosmos.Debug.Kernel": "0.1.0-localbuild20220825095617",
"IL2CPU.API": "0.1.0-localbuild20220825095617"
"Cosmos.Common": "0.1.0-localbuild20221014111733",
"Cosmos.Core": "0.1.0-localbuild20221014111733",
"Cosmos.Debug.Kernel": "0.1.0-localbuild20221014111733",
"IL2CPU.API": "0.1.0-localbuild20221014111733"
},
"compile": {
"lib/net6.0/Cosmos.HAL2.dll": {}
Expand All @@ -58,13 +58,13 @@
"lib/net6.0/Cosmos.HAL2.dll": {}
}
},
"Cosmos.System2/0.1.0-localbuild20220825095617": {
"Cosmos.System2/0.1.0-localbuild20221014111733": {
"type": "package",
"dependencies": {
"Cosmos.Common": "0.1.0-localbuild20220825095617",
"Cosmos.Debug.Kernel": "0.1.0-localbuild20220825095617",
"Cosmos.HAL2": "0.1.0-localbuild20220825095617",
"IL2CPU.API": "0.1.0-localbuild20220825095617"
"Cosmos.Common": "0.1.0-localbuild20221014111733",
"Cosmos.Debug.Kernel": "0.1.0-localbuild20221014111733",
"Cosmos.HAL2": "0.1.0-localbuild20221014111733",
"IL2CPU.API": "0.1.0-localbuild20221014111733"
},
"compile": {
"lib/net6.0/Cosmos.System2.dll": {}
Expand Down Expand Up @@ -105,7 +105,7 @@
"lib/netstandard2.0/ELFSharp.dll": {}
}
},
"IL2CPU.API/0.1.0-localbuild20220825095617": {
"IL2CPU.API/0.1.0-localbuild20221014111733": {
"type": "package",
"compile": {
"lib/netstandard2.0/IL2CPU.API.dll": {}
Expand All @@ -117,17 +117,17 @@
}
},
"libraries": {
"Cosmos.Build/0.1.0-localbuild20220825095601": {
"sha512": "PwZwIRVwMvhqWSgNK/8A5K7inU4M2Ic2LPFyBdQMuMAnJAdwe/GMBprwDE3I6XpS2NNd1Xt5ZDCljgKwzJnFtw==",
"Cosmos.Build/0.1.0-localbuild20221014111716": {
"sha512": "2bCZmPIj+qqW9juiXl9Q7raTPl7+fZO0O8kgSeg0fjBbxteoZbsmerGg/WtcCM1CtrWHrzZD0VHUuKDmYmQjiw==",
"type": "package",
"path": "cosmos.build/0.1.0-localbuild20220825095601",
"path": "cosmos.build/0.1.0-localbuild20221014111716",
"hasTools": true,
"files": [
".nupkg.metadata",
"LICENSE.txt",
"build/Cosmos.Build.props",
"build/Cosmos.Build.targets",
"cosmos.build.0.1.0-localbuild20220825095601.nupkg.sha512",
"cosmos.build.0.1.0-localbuild20221014111716.nupkg.sha512",
"cosmos.build.nuspec",
"runtime.json",
"tools/cygwin/win/GPL Readme.txt",
Expand Down Expand Up @@ -462,65 +462,65 @@
"tools/yasm/win/yasm.exe"
]
},
"Cosmos.Common/0.1.0-localbuild20220825095617": {
"sha512": "6WnP0azSvmK3afOImVvRKuZ/4TVYGFXq7/DCO2U1DSLHc/bN1pxUJ1hjw12Co6Y5W/Mxh+mPZyewjwrvnTICEQ==",
"Cosmos.Common/0.1.0-localbuild20221014111733": {
"sha512": "z3fjVpnItffLVjzqHOiZ83hAG8UbxLHhb7e41jrr6g4N7nushp0MqNccXXm2ovZxu9gj7cSAlk4uky81HbVrfg==",
"type": "package",
"path": "cosmos.common/0.1.0-localbuild20220825095617",
"path": "cosmos.common/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"LICENSE.txt",
"cosmos.common.0.1.0-localbuild20220825095617.nupkg.sha512",
"cosmos.common.0.1.0-localbuild20221014111733.nupkg.sha512",
"cosmos.common.nuspec",
"lib/net6.0/Cosmos.Common.dll"
]
},
"Cosmos.Core/0.1.0-localbuild20220825095617": {
"sha512": "72LWAHXIn8fWhT099xSX1WfV56T+A51wzScohp8OxML4pYhwgdokC9LHLPQ/c+LjuiyzAsn/bTC/q8sKvK+3lA==",
"Cosmos.Core/0.1.0-localbuild20221014111733": {
"sha512": "hHbaLLHc9n07q4iCjr43mjwKRDzrzGry0stfBQLC1wOK/dmJjnJc5LKPwE7SiqMAVL/7dikg1W+jrGuHpXQ7qA==",
"type": "package",
"path": "cosmos.core/0.1.0-localbuild20220825095617",
"path": "cosmos.core/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"LICENSE.txt",
"cosmos.core.0.1.0-localbuild20220825095617.nupkg.sha512",
"cosmos.core.0.1.0-localbuild20221014111733.nupkg.sha512",
"cosmos.core.nuspec",
"lib/net6.0/Cosmos.Core.dll",
"lib/net6.0/Cosmos.Core.xml"
]
},
"Cosmos.Debug.Kernel/0.1.0-localbuild20220825095617": {
"sha512": "4BMgmlPZQ2TQUZXiI9gLGH3GCrykQ8c68pbvOuxpVlU/A328+yDqL/KRO6QZj0Hgnn2DR4V1E4wQ3B8sJ3R1QQ==",
"Cosmos.Debug.Kernel/0.1.0-localbuild20221014111733": {
"sha512": "n3i2kvPwtcELnUa6EHK3WNNnKxGpavSI+Fyuu8+c0LF0/FkkEWG16NiRtMrvOh+6390nCZZ7fmr7cvr1nre7vw==",
"type": "package",
"path": "cosmos.debug.kernel/0.1.0-localbuild20220825095617",
"path": "cosmos.debug.kernel/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"LICENSE.txt",
"cosmos.debug.kernel.0.1.0-localbuild20220825095617.nupkg.sha512",
"cosmos.debug.kernel.0.1.0-localbuild20221014111733.nupkg.sha512",
"cosmos.debug.kernel.nuspec",
"lib/netstandard2.0/Cosmos.Debug.Kernel.dll",
"lib/netstandard2.0/Cosmos.Debug.Kernel.xml"
]
},
"Cosmos.HAL2/0.1.0-localbuild20220825095617": {
"sha512": "wfYJufOoE11EieptJF1QoihzMeBWMgfBoMEp/tZCoy6qGzok7MInBX0dsxnopliSSpHXVXDD2EVj7lVakxwM6Q==",
"Cosmos.HAL2/0.1.0-localbuild20221014111733": {
"sha512": "g9AQjTlDb3TS6Xf9zMwwjQmmu8V9DvVuPKQpBvVVR4iI6tZ5ScVNJVJyiu87GITbi8/3eeq6zSXxI3sVUZSnQQ==",
"type": "package",
"path": "cosmos.hal2/0.1.0-localbuild20220825095617",
"path": "cosmos.hal2/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"LICENSE.txt",
"cosmos.hal2.0.1.0-localbuild20220825095617.nupkg.sha512",
"cosmos.hal2.0.1.0-localbuild20221014111733.nupkg.sha512",
"cosmos.hal2.nuspec",
"lib/net6.0/Cosmos.HAL2.dll",
"lib/net6.0/Cosmos.HAL2.xml"
]
},
"Cosmos.System2/0.1.0-localbuild20220825095617": {
"sha512": "8cl8E/P4bG5ir1o3bL0/FOZo355hTFajatwDV9kz//yK0BlM+QCyzoP8mA13gjLjCg8ID1AIWpZBbl5umlHWBQ==",
"Cosmos.System2/0.1.0-localbuild20221014111733": {
"sha512": "dNKZeMxiw3FUo9jJzGdGnMhv1RCHjETdcyCtVN5UQU6/RXghO4v8mKUtUaEv8EcQRNFtju+sOKjfGdpnAQxT0g==",
"type": "package",
"path": "cosmos.system2/0.1.0-localbuild20220825095617",
"path": "cosmos.system2/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"LICENSE.txt",
"cosmos.system2.0.1.0-localbuild20220825095617.nupkg.sha512",
"cosmos.system2.0.1.0-localbuild20221014111733.nupkg.sha512",
"cosmos.system2.nuspec",
"lib/net6.0/Cosmos.System2.dll",
"lib/net6.0/Cosmos.System2.xml"
Expand Down Expand Up @@ -567,13 +567,13 @@
"lib/netstandard2.0/ELFSharp.dll"
]
},
"IL2CPU.API/0.1.0-localbuild20220825095617": {
"sha512": "rF2u+HL+fK+H5AtSq64Fo8OLbo7B37YSC6Xx3kG3mRloFuRHslq6lfyc/0I9aACe9hWwcL1QFMA8w7Tz1JElEg==",
"IL2CPU.API/0.1.0-localbuild20221014111733": {
"sha512": "PGyTOP0BQR8CHkzx074lxs9WXqbXSaZzLikaOvjadDk+MC0QPWtp3nXswUQ0eNDRiUa8NPJh8IIB2r/1PqoduQ==",
"type": "package",
"path": "il2cpu.api/0.1.0-localbuild20220825095617",
"path": "il2cpu.api/0.1.0-localbuild20221014111733",
"files": [
".nupkg.metadata",
"il2cpu.api.0.1.0-localbuild20220825095617.nupkg.sha512",
"il2cpu.api.0.1.0-localbuild20221014111733.nupkg.sha512",
"il2cpu.api.nuspec",
"lib/netstandard2.0/IL2CPU.API.dll"
]
Expand Down
Loading

0 comments on commit 13a27d9

Please sign in to comment.