-
Notifications
You must be signed in to change notification settings - Fork 2
Themes
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.
To create a theme asset, either go to Assets → Create → Hackbox → Theme, or right-click in the assets window, and go to Create → Hackbox → Theme, and then name the theme appropriately:
You can then edit the properties of the theme by selecting it in the assets and viewing the properties in the Inspector:
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;
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:
- Setting
Theme
in code:
Hackbox.State someState;
someState.Theme = myTheme;