Table of Contents

Class TVApp

Namespace
S1API.TVApp
Assembly
S1API.dll

Abstract base class for creating custom TV applications.

public abstract class TVApp : Registerable
Inheritance
TVApp
Inherited Members
Extension Methods

Remarks

This class provides an extensible framework for defining TV application behaviors, user interface elements, and registration mechanics for integration into the TV system. Modders should extend this class and implement the required abstract members.

Constructors

TVApp()

protected TVApp()

Fields

Logger

Logger instance used for logging messages, warnings, or errors related to the functionality of TV applications.

protected static readonly Log Logger

Field Value

Log

Properties

AppName

Gets the unique identifier for this TV app.

protected abstract string AppName { get; }

Property Value

string

Remarks

This property is used as a key to identify the application within the TV system. It must be unique among all registered TV apps.

AppTitle

Gets the display title shown on the TV interface.

protected abstract string AppTitle { get; }

Property Value

string

Remarks

This is the human-readable name displayed to the user on the app button.

Icon

Gets the icon sprite displayed on the TV app button.

protected abstract Sprite Icon { get; }

Property Value

Sprite

Remarks

This sprite is shown in the TV home screen's app list.

IsOpen

Determines if this TV app is currently open.

public bool IsOpen { get; }

Property Value

bool

IsPaused

Determines if this TV app is currently paused.

public bool IsPaused { get; }

Property Value

bool

Methods

Close()

Closes this TV application and returns to the TV home screen.

public void Close()

OnClosed()

Called when the app is closed.

protected virtual void OnClosed()

OnCreated()

Called when the TVApp instance is created. Registers the app with the TVAppRegistry.

protected override void OnCreated()

OnCreatedUI(GameObject)

Called when the app UI container is created. Override to build your UI.

protected abstract void OnCreatedUI(GameObject container)

Parameters

container GameObject

The GameObject container for UI elements.

OnDestroyed()

Cleans up resources when the app is destroyed.

protected override void OnDestroyed()

OnOpened()

Called when the app is opened.

protected virtual void OnOpened()

OnPaused()

Called when the app is paused.

protected virtual void OnPaused()

OnResumed()

Called when the app is resumed from pause.

protected virtual void OnResumed()

OnUpdate()

Called every frame while the app is open and not paused. Override for game logic updates.

protected virtual void OnUpdate()

Open()

Opens this TV application.

public void Open()

Pause()

Pauses the TV application.

public void Pause()

Resume()

Resumes the TV application from pause.

public void Resume()