InspectML

From Nocturnal Initiative

Jump to: navigation, search

Contents

Overview

InspectML is the simple markup language for the Inspect data-driven property UI system. It allows a string to specify which controls should be created for a single property.

Usage

InspectML can optionally be delimited like this:

UI[.[ #insert InspectML here ].]

Also, the # symbol can be used to cause all subsequent characters in the string (up to a newline) to be ignored

InspectML can specify one or more controls, with one or more attributes each. Attributes are contained within braces:

control { attribute = value; }

or

control
{
  attribute = value;
}

Controls

label

A static string that usually presents a friendly name for the property.

Attributes:

Attribute Values Description
text anything The text to display in the label.

value

A simple text-entry control to set the value of a scalar.

Attributes:

Attribute Values Description
required true, false Specify this property as 'required'. Required properties appear more prominently in the UI via color coding.
justify left, right Set left or right justification of the value control's text.

slider

A control that changes a numeric value on a linear scale.

Attributes:

Attribute Values Description
min number Sets the minimum value the slider will allow.
max number Sets the maximum value the slider will allow.

check

A control that sets a value to be true (non-zero) or false (zero).

No Attributes

color

A button control that displays the color and opens a color picker when clicked.

No Attributes

choice

An auto-completing combo-box style of drop down control. If the type of the property is already an enumeration, you probably don't need to specify any attributes in order to populate the drop down list.

Attribute Values Description
enum name of an enumeration Tells the Interpreter to refer to a specific enumeration (by name) to use for the available values. This is mainly useful for numeric data types that use an enumeration.
sorted true, false Sets the items in the drop down be sorted alphabetically.
dropdown true, false Sets the control to not allow typing of values into the text portion of the control.

Warning: Using the 'enum' attribute will still cause your information to be saved as a number, not a string. It only tells the system to preset the number as a string to the user.

Personal tools
Navigation
projects