Skip to content
Alexander Gottwald edited this page Sep 18, 2017 · 9 revisions

This page lists the available BML components and their attributes. Bold attributes are required.

Structure

BML is structured into hierarchical nodes. Each node has a type, any number of attributes and any number of child nodes.

Nodes

A node without attributes and child nodes consists of only the type followed by a semicolon

type;

A node with attributes or child nodes consists of the type and the attributes and child nodes enclosed in curly braces. Attribute name and value are separated by the equals sign and are followed by a semicolon. The value must be enclosed in double quotation marks. The parser does not allow double quotation marks in attribute values.

type{attribute1="value";attribute2="value";child1;child2{attribute3="value"}}

Form data

All form data elements have an id attribute. The contents or selection of the form data element is returned in the answer with key id.

input

Text input

  • id
  • onenter
  • enabled: "true", "false"
  • text
  • maxchars
  • maxlines
  • color
  • bgcolor
  • bgtexture

passthrough

Data passed through the dialog. The entry is not displayed but returned in the answer.

  • id
  • text: value

dropdown

Dropdown list

  • id
  • options: "value1,value2,value3"
  • default: index of default option

button

  • id
  • text
  • confirm
  • question
  • hover
  • default

radio

  • id
  • text
  • hover
  • group
  • selected
  • enabled
  • hidden

checkbox

  • id
  • text
  • confirm
  • question
  • unconfirm
  • unquestion
  • hover
  • selected
  • enabled
  • color

BML Components

  • color: "r,g,b"
  • size: "width,height"

text or label

Styled text

  • text
  • type: "italic", "bold", "bolditalic"
  • hover

header

Large text

  • text

table

  • cols

The table is filled with children until the last complete row is done. I.e a table with 3 cols and 13 children will have 4 rows. The lonely entry on the last row is ignored.

border

Border layout. Children are added in the following order:

  • North
  • West
  • Center
  • East
  • South

scroll

  • vertical: "true", "false"
  • horizontal: "true", "false"

varray

  • rescale: "true", "false"

harray

  • rescale: "true", "false"

left

Align left

right

Align right

center

Align center

image

  • src: resource name or URL starting with http://
  • text: hover text

tree

  • id
  • showheader
  • height
  • cols

"col" and "row" child nodes

col (when used directly in "tree")

  • text
  • width

row

  • id
  • name
  • hover
  • rarity: int
  • children: int

"col" child nodes

col (when used in "row")

  • id
  • text
  • checkbox
  • selected

Clone this wiki locally