Skip to content
Ashley Muncaster edited this page Apr 13, 2024 · 8 revisions

A theme describes the basic theming of a member's screen. It can define the default background colors and text colors of the Header and Main sections of the UI.

Creating a Theme Asset

To create a theme asset, either go to AssetsCreateHackboxTheme, or right-click in the assets window, and go to CreateHackboxTheme, and then name the theme appropriately:

image

You can then edit the properties of the theme by selecting it in the assets and viewing the properties in the Inspector:

image

Creating a Theme in code

To create a theme in code:

Hackbox.UI.Theme theme = Hackbox.UI.Theme.Create("myTheme");
theme.HeaderColor = Color.white;
theme.HeaderBackground = "#000000";
theme.MainColor = Color.black;

Using a Theme

To use a theme, you should specify it as the theme on a State object. This can be done either by:

  • Setting the theme property of a state in the Inspector:

image

  • Setting Theme in code:
Hackbox.State someState;
someState.Theme = myTheme;
Clone this wiki locally