Class PrismaUiApi
- Namespace
- SkyrimForge.PrismaUi
- Assembly
- SkyrimForge.PrismaUi.dll
The Prisma UI plugin, which draws HTML over the game.
public sealed class PrismaUiApi
- Inheritance
-
PrismaUiApi
- Inherited Members
Remarks
Callbacks run as queued work, so the rules on SkyrimForge.ITaskQueue apply. An exception a callback throws is logged.
Constructors
PrismaUiApi(ILog)
Requests Prisma UI's interface.
public PrismaUiApi(ILog log)
Parameters
logILogReceives callback exceptions and the warnings and errors of each page.
Exceptions
- InvalidOperationException
Prisma UI is not usable. The message states why.
Properties
ConsoleMessagesSupported
Whether the installed Prisma UI raises OnConsoleMessage.
public bool ConsoleMessagesSupported { get; }
Property Value
HasAnyActiveFocus
Whether any view in the process has focus, including views other mods created.
public static bool HasAnyActiveFocus { get; }
Property Value
Methods
CreateView(string)
Creates a view over a page.
public PrismaView CreateView(string htmlPath)
Parameters
htmlPathstringA path under
Data\PrismaUI\views, such asmymod/index.html, or anhttp://orhttps://URL.
Returns
- PrismaView
The view.
Remarks
Call this from SkyrimForge.Events.IGameEvents.OnInputLoaded or later, because Prisma UI initializes on the first view and requires the input device manager. A missing page still returns a view, and DOM ready is never raised. The process ends if Prisma UI's renderer fails to start.
Exceptions
- ArgumentNullException
htmlPathisnull.- InvalidOperationException
Prisma UI created no view.
CreateViewOrNull(string)
Creates a view over a page, or returns null if Prisma UI creates none.
public PrismaView? CreateViewOrNull(string htmlPath)
Parameters
htmlPathstringA path under
Data\PrismaUI\views, such asmymod/index.html, or anhttp://orhttps://URL.
Returns
- PrismaView
The view, or
nullif Prisma UI created none.
Remarks
Call this from SkyrimForge.Events.IGameEvents.OnInputLoaded or later, because Prisma UI initializes on the first view and requires the input device manager. A missing page still returns a view, and DOM ready is never raised. The process ends if Prisma UI's renderer fails to start.
Exceptions
- ArgumentNullException
htmlPathisnull.