Table of Contents

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

log ILog

Receives 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

bool

HasAnyActiveFocus

Whether any view in the process has focus, including views other mods created.

public static bool HasAnyActiveFocus { get; }

Property Value

bool

Methods

CreateView(string)

Creates a view over a page.

public PrismaView CreateView(string htmlPath)

Parameters

htmlPath string

A path under Data\PrismaUI\views, such as mymod/index.html, or an http:// or https:// 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

htmlPath is null.

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

htmlPath string

A path under Data\PrismaUI\views, such as mymod/index.html, or an http:// or https:// URL.

Returns

PrismaView

The view, or null if 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

htmlPath is null.