Editor/Events.Assets.cs
namespace Sandbox;
public static partial class Event
{
/// <summary>
/// Events for assets.
/// </summary>
public static partial class Asset
{
/// <summary>
/// Invoked when a file has changed in the "Content" path
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="string"/></term>
/// <description>Name of the file.</description>
/// </item>
/// </list>
/// </summary>
public sealed class ContentChangedAttribute() : EventAttribute( "content.changed" );
/// <summary>
/// Events for packages.
/// </summary>
public static class Package
{
/// <summary>
/// Invoked when you update a package.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that was updated.</description>
/// </item>
/// </list>
/// </summary>
public sealed class ChangedAttribute() : EventAttribute( "package.changed" );
/// <summary>
/// Invoked when a package is installed.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that was installed.</description>
/// </item>
/// </list>
/// </summary>
public sealed class InstalledAttribute() : EventAttribute( "package.changed.installed" );
/// <summary>
/// Invoked when you favourite a package.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that was favourited.</description>
/// </item>
/// </list>
/// </summary>
public sealed class FavouritedAttribute() : EventAttribute( "package.changed.favourite" );
/// <summary>
/// Invoked when you upvote/downvote a package.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that was rated.</description>
/// </item>
/// </list>
/// </summary>
public sealed class RatedAttribute() : EventAttribute( "package.changed.rating" );
/// <summary>
/// Events for package downloads.
/// </summary>
public static class Download
{
/// <summary>
/// Invoked when you start downloading a package.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that is being downloaded.</description>
/// </item>
/// <item>
/// <term><see cref="System.Threading.CancellationToken"/></term>
/// <description>The download cancellation token.</description>
/// </item>
/// </list>
/// </summary>
public sealed class StartAttribute() : EventAttribute( "package.download.start" );
/// <summary>
/// Invoked while downloading a package.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that is being downloaded.</description>
/// </item>
/// <item>
/// <term><see cref="float"/></term>
/// <description>The progress of the download as a fraction.</description>
/// </item>
/// </list>
/// </summary>
public sealed class ProgressAttribute() : EventAttribute( "package.download.update" );
/// <summary>
/// Invoked when a package has been downloaded.
/// <list type="table">
/// <em>Arguments:</em>
/// <item>
/// <term><see cref="Sandbox.Package"/></term>
/// <description>The package that has finished downloading.</description>
/// </item>
/// </list>
/// </summary>
public sealed class FinishAttribute() : EventAttribute( "package.download.complete" );
}
}
/// <summary>
/// Events for shaders.
/// </summary>
public static class Shader
{
/// <summary>
/// Invoked when opening a shader
/// <list type="table">
/// <i>Arguments:</i>
/// <item>
/// <term><see cref="string"/></term>
/// <description>Absolute path of the shader.</description>
/// </item>
/// </list>
/// </summary>
public sealed class OpenAttribute() : EventAttribute( "open.shader" );
/// <summary>
/// Invoked when opening a shader
/// <list type="table">
/// <i>Arguments:</i>
/// <item>
/// <term><see cref="string"/></term>
/// <description>Relative path of the shader.</description>
/// </item>
/// </list>
/// </summary>
public sealed class CompileAttribute() : EventAttribute( "compile.shader" );
}
/// <summary>
/// Events for models.
/// </summary>
public static class Model
{
/// <summary>
/// Invoked when a model is reloaded.
/// <list type="table">
/// <i>Arguments:</i>
/// <item>
/// <term><see cref="Sandbox.Model"/></term>
/// <description>The reloaded model.</description>
/// </item>
/// </list>
/// </summary>
public sealed class ReloadedAttribute() : EventAttribute( "model.reload" );
}
}
}