Added SceneSwitching, Better font rendering, DOM inspector, Font-family prop

This commit is contained in:
antopilo
2024-09-13 17:18:09 -04:00
parent 4c76e9e493
commit 89ea32a4b3
22 changed files with 241 additions and 248 deletions

View File

@@ -72,7 +72,7 @@ namespace Nuake.Net
public class Node
{
internal static unsafe delegate*<NativeString, NativeString, NativeString, NativeString> FindChildByIDICall;
internal static unsafe delegate*<NativeString, NativeString, NativeString, bool> HasNativeInstanceICall;
internal static unsafe delegate*<NativeString, NativeString, bool> HasNativeInstanceICall;
internal static unsafe delegate*<NativeString, NativeString, NativeInstance<Node>> GetNativeInstanceNodeICall;
public string UUID;
@@ -107,24 +107,21 @@ namespace Nuake.Net
throw new Exception("Node not found");
}
T? newNode = null;
//if (HasNativeInstanceICall(CanvasUUID, CanvasUUID, UUID))
//{
// NativeInstance<Node> handle;
// unsafe { handle = GetNativeInstanceNodeICall(CanvasUUID, UUID); }
// newNode = handle.Get();
//}
if(newNode == null)
if (HasNativeInstanceICall(CanvasUUID, uuid))
{
newNode = Activator.CreateInstance<T>();
newNode.UUID = uuid;
newNode.CanvasUUID = CanvasUUID;
return newNode as T;
NativeInstance<Node> handle;
unsafe { handle = GetNativeInstanceNodeICall(CanvasUUID, uuid); }
Node? newNodeInstance = handle.Get();
if(newNodeInstance != null && newNodeInstance is T)
{
return newNodeInstance as T;
}
}
return null;
T? newNode = Activator.CreateInstance<T>();
newNode.UUID = uuid;
newNode.CanvasUUID = CanvasUUID;
return newNode as T;
}
}
}

View File

@@ -17,9 +17,14 @@ namespace Nuake.Net
public class Engine
{
internal static unsafe delegate*<NativeString, void> LoggerLogIcall;
internal static unsafe delegate*<NativeString, void> LoadSceneIcall;
public Engine() { }
public static void LoadScene(string path)
{
unsafe { LoadSceneIcall(path); }
}
/// <summary>
/// Prints a message to the console log
/// </summary>