ChooserTable Element (Data)

From HLKitWiki
Revision as of 04:37, 2 December 2008 by Rob (Talk | contribs) (New page: {{context|Kit Reference|Data File Reference|Portal Element (Data)}} ==The "choose_table" Element== Choosers are similar to thing-based menus in some ways, as they allow the user to selec...)

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

Context: HL KitKit Reference … Data File Reference … Portal Element (Data) 

The "choose_table" Element

Choosers are similar to thing-based menus in some ways, as they allow the user to select one thing or pick from a list that is determined dynamically. One key difference with choosers is that any selected thing/pick is added to the container as a new pick. If a pick is selected, a new pick derived from the same thing is added. Another key difference is that the available things/picks are displayed for selection in a "choose form", allowing each object to be presented with detailed information. The "chooser" mechanism is ideal for selecting facets like race, profession, archetype, etc. Each chooser is defined via the use of the "chooser_table" element. The complete list of attributes for this element is below.

component Id – Specifies the unique id of the component that all selectable objects must be derived from.
choosetemplate Id – Specifies the unique id of the template to be used for displaying selectable objects.
choosepicks (Optional) Set – Designates whether the selectable objects consist of things or picks, and, if the latter, where the list of picks is retrieved from. Must be one of these values:

thing – The selectable objects are things.
container – The selectable objects are picks from the implicitly identified container. If the containing scene is a form associated with a gizmo, the gizmo is used, else the actor is used.
hero – The selectable objects are picks from the active actor.
actor – Same as "hero".
Default: "thing".

choosesortset (Optional) Id – Specifies the unique id of the sort set to be used for sequencing all of the objects presented for selection. If empty, all objects are sorted by name. Default: Empty.
choosegaphorz (Optional) Integer – Specifies the gap along the horizontal access to insert between items presented for selection. Default: "0".
choosegapvert (Optional) Integer – Specifies the gap along the vertical access to insert between items presented for selection. Default: "0".
descwidth (Optional) Integer – Specifies the width of the reserved "description" area on the right within the chooser form. Some items need more width for lengthy descriptions and some do not, so you can control this as you see fit. Default: "200".
dynamic (Optional) Boolean – Indicates whether the chooser needs to be dynamically updated after any modification to the actor so that the influence of other changes are always visually reflected to the user. Default: "no".

{ "buytemplate", e_xml_implied, "", NULL, 0, NULL }, { "xactspecial", e_xml_implied, "0", NULL, 0, NULL }, { "linkage", e_xml_implied, "", NULL, 0, NULL }, { "candidatepick", e_xml_implied, "", NULL, 0, NULL }, { "candidatefield", e_xml_implied, "", NULL, 0, NULL }, { "showupdate", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no }, { "prereqtarget", e_xml_set, l_prereq_target[0], NULL, SIZE_PREREQ_TARGET, l_prereq_target }, { "empty", e_xml_implied, "", NULL, 0, NULL }

The "output_label" element also possesses child elements that define additional behaviors of the portal. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

labeltext An optional "labeltext" element may appear as defined by the given link. This element defines a Label Script that is used for synthesizing the text to be output.

The "labeltext" Element

The "labeltext" element defines a Label Script for the portal. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Label script.

Example

The following example demonstrates what an output label portal might look like. All default values are assumed for optional attributes.

<portal id="name" style="outNameLg">
  <output_label field="name"/>
  </portal>

<portal id="oHeroName" style="outHeroNam">
  <output_label>
    <labeltext>
      @text = hero.actorname
      var result as number
      result = compare(@text, "")
      if (result = 0) then
        @text = "- Unnamed Hero -"
        endif
      </labeltext>
    </output_label>
  </portal>