Class ScaleformValue
- Namespace
- SkyrimForge.Game
- Assembly
- SkyrimForge.Game.dll
A Scaleform value a plugin allocates and frees. Almost every Scaleform member writes into a value the caller supplies,
on GFxValue and GFxMovie alike.
public sealed class ScaleformValue : IDisposable
- Inheritance
-
ScaleformValue
- Implements
- Inherited Members
Remarks
using (ScaleformValue health = ScaleformValue.Create())
{
if (ui.GetMenu(HUDMenu.MenuName)?.UiMovie is { } movie && movie.GetVariable(health.Value, "_root.HUDMovieBaseInstance.HealthMeter._percent"))
{
double percent = health.Value.GetNumber();
}
}
Disposing one calls into the game, so dispose it on the game's thread or inside an ITaskQueue task.
Properties
Value
The value this stores, as the view every bound Scaleform member is declared on.
public GFxValue Value { get; }
Property Value
Methods
Create()
Allocates a value that Dispose() frees.
public static ScaleformValue Create()
Returns
- ScaleformValue
A value of no type, ready for a Scaleform member to fill.
Exceptions
- InvalidOperationException
The value could not be allocated.
Dispose()
public void Dispose()