RML Documents

From FreeSpace Wiki
Jump to: navigation, search
Librocket RML references
Elements
Documents
Images
Style Sheets
Forms
Controls
Data Display
Templates
Events

RML documents have this basic structure.

<rml>

All libRocket documents begin with the <rml> element. The element should contain two children, <head> and <body>.

<rml>
	<head>
	...
	</head>
	<body>
	...
	</body>
</rml>

<head>

The <head> element contains information about the current document, such as its title, style and template information is references. No information in the header is rendered.

<title>

The <title> element contains the title of the document. This is often used for the specifying the contents of the title bar of a game window.

<link>

The <link> element is used to specify additional resources the document requires.

Attributes

type
  • Type of link, which should be one of:
  • text/rcss - libRocket Style Sheet Specification
  • text/template - libRocket Template
  • text/script - libRocket script
href
  • Specifies the source URI, relative to the document being parsed.

<body>

The body of a document contains the document’s content. All elements within the <body> tag is laid out and rendered by libRocket based on the active style sheets.