Skip to content

Theme Type: Choices

Robert McIntosh edited this page Sep 18, 2022 · 1 revision

Overview

The choices type allows you to define a control with a select menu of options for the user to choose from. Its useful when you want to present users with a variable of strict choices such as aligning text, left, right or center.

image


Defining your Setting

name

A short user-friendly title that gives the user an idea of this setting. This value is localized.


hint

A long user-friendly description that details what this setting is used for. This value is localized.


type

Set type to choices to generate this control.


default

The default choice of the choices control will be the default option listed and should exist within the choices properties.


choices

This is an object of options for the user to select from. The key property will be used as a value and the value of the key is what will be displayed to the user. For example, if you wanted to justify-content in css, the key may be start where the display to the user would be top as users will understand the top of the page more than the start of the page.


Example Setting

"--tidy-hud-controls-alignment": {
	"name": "lib-themer.tidyHUDControlsAlignment.name",
	"hint": "lib-themer.tidyHUDControlsAlignment.hint",
	"type": "choices",
	"default": "center",
	"choices": {
		"start": "lib-themer.tidyHUDControlsAlignment.choices.start",
		"center": "lib-themer.tidyHUDControlsAlignment.choices.center",
		"end": "lib-themer.tidyHUDControlsAlignment.choices.end"
	}
}