Table of Contents

Interface IScaleformFunctionRegistrar

Namespace
SkyrimForge.Menus
Assembly
SkyrimForge.dll

Adds functions that this plugin implements to Scaleform movies, for their ActionScript to call.

public interface IScaleformFunctionRegistrar

Remarks

// _root.getPlayerGold() in the movie's ActionScript calls the delegate below.
scaleform.Register(movie, root, "getPlayerGold", call => call.RetVal?.SetNumber(player.GetGoldAmount()));

A delegate may call the game directly. An exception from a delegate is written to the log of the plugin that registered it. A registration lasts until the process exits.

Properties

OnMovieCreated

Raised as the game finishes each movie.

IGameEvent<ScaleformMovieCreatedEventArgs> OnMovieCreated { get; }

Property Value

IGameEvent<ScaleformMovieCreatedEventArgs>

Remarks

The game builds a menu's movie each time the menu opens, so a function is registered again on each one. A handler may call the game, and may call Register(IGFxMovie, GFxValue, string, Action<Params>) for the movie it was given.

Exceptions

InvalidOperationException

The running SKSE has no Scaleform interface.

Methods

Register(IGFxMovie, GFxValue, string, Action<Params>)

Puts a function named name on target.

void Register(IGFxMovie movie, GFxValue target, string name, Action<GFxFunctionHandler.Params> handler)

Parameters

movie IGFxMovie

The movie that creates the function, which is UiMovie on the menu being extended.

target GFxValue

The ActionScript object that takes the function as a member, usually the movie's _root.

name string

The name ActionScript uses for it.

handler Action<GFxFunctionHandler.Params>

The delegate that runs for each call. Args.Get() returns the arguments the movie passed, and writing into RetVal sends a value back. Leaving RetVal alone returns undefined.

Exceptions

ArgumentNullException

name or handler is null.

ArgumentException

name is empty.

InvalidOperationException

Setting the member on target returned false.