mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Extending ScriptGlue now possible
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using GlitchyEditor.EditWindows;
|
||||
using GlitchyEngine.Content;
|
||||
|
||||
namespace GlitchyEngine.Scripting;
|
||||
|
||||
extension ScriptGlue
|
||||
{
|
||||
static this()
|
||||
{
|
||||
OnRegisterNativeCalls.Add(new => RegisterExtensionCalls);
|
||||
}
|
||||
|
||||
private static void RegisterExtensionCalls()
|
||||
{
|
||||
EngineFunctions.[Friend]_functions.ImGuiExtension_ShowAssetDropTarget = => ImGuiExtension_ShowAssetDropTarget;
|
||||
}
|
||||
|
||||
[RegisterCall(EngineResultAsBool = true, IsExtension = true)]
|
||||
public static EngineResult ImGuiExtension_ShowAssetDropTarget(ref AssetHandle assetHandle)
|
||||
{
|
||||
return ComponentEditWindow.ShowAssetDropTarget(ref assetHandle) ? .Ok : .False;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user