Reference Element (Data)

From HLKitWiki
Revision as of 06:42, 24 November 2008 by Rob (Talk | contribs) (New page: {{context|Kit Reference|Structural File Reference}} ==The "reference" Element== References provide a mechanism that is very similar to tool tips, with the mouse cursor changing to indica...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Context: HL KitKit Reference … Structural File Reference 

The "reference" Element

References provide a mechanism that is very similar to tool tips, with the mouse cursor changing to indicate that help is available for the region beneath the mouse. When the user clicks on the reference, the tip is displayed until the user clicks again to discard it. References are designed for use within encoded text and are ideal for annotating keywords and icons used within the data files. You can define a reference via the "reference" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id to utilize for this reference.

NOTE! Unlike most other elements, the unique ids assigned to references may only possess a maximum of 9 characters instead of the usual 10.

contents Text – Specifies the text to be inserted anywhere the reference is utilized. May contain encoded text.

NOTE! The use of references is not verified at compile time. It is only checked when text containing the reference is rendered in some way. If a reference is undefined when accessed, the text "[Undefined reference: name]" is output. In addition, you can view a list of any undefined references by going to the "Debug" menu and selecting "View Undefined String Usage".

Example

The following example demonstrates what a "reference" element might look like. All default values are assumed for optional attributes.

<reference
  id="BulletPrf"
  contents="Bullet-Proof Armor"/>