Add SurfaceNodeActions for more contextual surface nodes scripting

This commit is contained in:
Wojtek Figat
2023-08-24 10:43:22 +02:00
parent 60e5c5446c
commit 952fe61515
23 changed files with 199 additions and 169 deletions

View File

@@ -122,14 +122,14 @@ namespace FlaxEditor.Surface
/// <summary>
/// Called when control gets loaded and added to surface.
/// </summary>
public virtual void OnLoaded()
public virtual void OnLoaded(SurfaceNodeActions action)
{
}
/// <summary>
/// Called when surface gets loaded and nodes boxes are connected.
/// </summary>
public virtual void OnSurfaceLoaded()
public virtual void OnSurfaceLoaded(SurfaceNodeActions action)
{
UpdateRectangles();
}
@@ -137,14 +137,14 @@ namespace FlaxEditor.Surface
/// <summary>
/// Called after adding the control to the surface after user spawn (eg. add comment, add new node, etc.).
/// </summary>
public virtual void OnSpawned()
public virtual void OnSpawned(SurfaceNodeActions action)
{
}
/// <summary>
/// Called on removing the control from the surface after user delete/cut operation (eg. delete comment, cut node, etc.).
/// </summary>
public virtual void OnDeleted()
public virtual void OnDeleted(SurfaceNodeActions action)
{
Dispose();
}