mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-04 22:10:34 +03:00
Added SceneSwitching, Better font rendering, DOM inspector, Font-family prop
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user