Portal Element (Data): Difference between revisions
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
|isheader | |isheader | ||
|(Optional) Boolean – Indicates whether this portal is utilized within a [[Dual-purpose Headers on Tables|dual-purpose header]] as part of a table. Default: "no".<br> | |(Optional) Boolean – Indicates whether this portal is utilized within a [[Dual-purpose Headers on Tables|dual-purpose header]] as part of a table. Default: "no".<br> | ||
{{note}}This attribute is only permitted on portals within templates that serves as dual-purpose headers. | {{note}}This attribute is only permitted on portals within templates that serves as dual-purpose headers.<br> | ||
{{note}}Field-based portals may '''never''' be designated for use within a header, as there is no pick/thing associated with dual-purpose templates. | |||
|- | |- | ||
|showinvalid | |showinvalid | ||
Line 112: | Line 113: | ||
|{{flalt|OutputTable Element (Data)|output_table}} | |{{flalt|OutputTable Element (Data)|output_table}} | ||
|An optional "output_table" element may appear as defined by the given link. This element specifies the details of a table portal for sheet output. | |An optional "output_table" element may appear as defined by the given link. This element specifies the details of a table portal for sheet output. | ||
|- | |||
|{{flalt|OutputDots Element (Data)|output_dots}} | |||
|An optional "output_dots" element may appear as defined by the given link. This element specifies the details of a special label portal for sheet output. | |||
|- | |||
|{{flalt|OutputSeparator Element (Data)|output_separator}} | |||
|An optional "output_separator" element may appear as defined by the given link. This element specifies the details of a separator portal for sheet output. | |||
|- | |- | ||
|[[#live|live]] | |[[#live|live]] |
Latest revision as of 09:59, 20 February 2009
Context: HL Kit … Kit Reference … Data File Reference … Multiple Sources
The "portal" Element
Within the hierarchy of visual elements, the individual elements that the user interacts with are portals. There is a wide assortment of different portal types that can be employed for different purposes. Each separate portal is specified through the use of a "portal" element. The complete list of attributes for this element is below.
id Id – Specifies the unique id of the portal. This id is used in all references to the portal. style Id – Specifies the unique id of the style to utilize with this portal. The style must be compatible with the portal type (e.g. a label style must be used with a label portal). tiptext (Optional) Text – Description information to be shown to the user when the user pauses the mouse over the portal. If empty, nothing is shown. Default: Empty. isheader (Optional) Boolean – Indicates whether this portal is utilized within a dual-purpose header as part of a table. Default: "no".
NOTE! This attribute is only permitted on portals within templates that serves as dual-purpose headers.
NOTE! Field-based portals may never be designated for use within a header, as there is no pick/thing associated with dual-purpose templates.showinvalid (Optional) Boolean – Indicates whether the text used within the portal should be automatically changed to the built-in "lblwarning" color when the portal references an invalid pick. This behavior only applies to suitable portal types, including labels, incrementers, checkboxes, and menus. Default: "no". showdisabled (Optional) Boolean – Indicates whether the text used within the portal should be automatically changed to the built-in "lbldisable" color when the portal references a pick whose pre-requisites are not satisfied. This behavior only applies to suitable portal types, including labels, incrementers, checkboxes, and menus. Default: "yes". width (Optional) Integer – Specifies the default width to use for the portal. In general, portal dimensions should only be controlled via the Position script of the containing visual element. If zero, the default auto-sizing behaviors are employed. Default: "0". height (Optional) Integer – Specifies the default height to use for the portal. In general, portal dimensions should only be controlled via the Position script of the containing visual element. If zero, the default auto-sizing behaviors are employed. Default: "0".
The "portal" element also possesses child elements that define the specifics 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.
IMPORTANT! With the exception of the "live" and "mouseinfo" elements, exactly one of these child elements may be specified for each portal. If multiple are given, a compiler error will be reported. The chosen child element dictates the type of portal that is being defined and its characteristics. You may include up to one "live" and/or "mouseinfo" elements after the single child element that specifies the portal.
label An optional "label" element may appear as defined by the given link. This element specifies the details of a label portal. image_field An optional "image_field" element may appear as defined by the given link. This element specifies the details of a field-based image portal. image_user An optional "image_user" element may appear as defined by the given link. This element specifies the details of an image portal containing user-selected images. image_literal An optional "image_literal" element may appear as defined by the given link. This element specifies the details of an image portal containing a static image. image_reference An optional "image_reference" element may appear as defined by the given link. This element specifies the details of an image portal that references a field-based image. incrementer An optional "incrementer" element may appear as defined by the given link. This element specifies the details of an incrementer portal. edit An optional "edit" element may appear as defined by the given link. This element specifies the details of an edit portal. edit_date An optional "edit_date" element may appear as defined by the given link. This element specifies the details of an editdate portal. checkbox An optional "checkbox" element may appear as defined by the given link. This element specifies the details of a checkbox portal. menu_literal An optional "menu_literal" element may appear as defined by the given link. This element specifies the details of a menu portal consisting of a fixed set of options. menu_array An optional "menu_array" element may appear as defined by the given link. This element specifies the details of an array-based menu portal. menu_things An optional "menu_things" element may appear as defined by the given link. This element specifies the details of a thing-based menu portal. action An optional "action" element may appear as defined by the given link. This element specifies the details of an action portal. region An optional "region" element may appear as defined by the given link. This element specifies the details of a region portal. separator An optional "separator" element may appear as defined by the given link. This element specifies the details of a separator portal. chooser_table An optional "chooser_table" element may appear as defined by the given link. This element specifies the details of a table-based chooser portal. table_fixed An optional "table_fixed" element may appear as defined by the given link. This element specifies the details of a non-editable table portal. table_dynamic An optional "table_dynamic" element may appear as defined by the given link. This element specifies the details of a table portal to which the user can add arbitrary items. table_auto An optional "table_auto" element may appear as defined by the given link. This element specifies the details of a table portal to which a specific item can be added. setting_edit An optional "setting_edit" element may appear as defined by the given link. This element specifies the details of a special portal for editing configuration settings. setting_summary An optional "setting_summary" element may appear as defined by the given link. This element specifies the details of a special portal for showing a summary of configuration settings. alliance An optional "alliance" element may appear as defined by the given link. This element specifies the details of a special portal for controlling the alliance state of an actor. output_label An optional "output_label" element may appear as defined by the given link. This element specifies the details of a label portal for sheet output. output_image An optional "output_image" element may appear as defined by the given link. This element specifies the details of an image portal for sheet output. output_table An optional "output_table" element may appear as defined by the given link. This element specifies the details of a table portal for sheet output. output_dots An optional "output_dots" element may appear as defined by the given link. This element specifies the details of a special label portal for sheet output. output_separator An optional "output_separator" element may appear as defined by the given link. This element specifies the details of a separator portal for sheet output. live An optional "live" element may appear as defined by the given link. This element defines a Live Tag Expression for the portal. mouseinfo An optional "mouseinfo" element may appear as defined by the given link. This element defines a MouseInfo Script for the portal.
The "live" Element
The "live" element defines a Live Tag Expression for the portal that determines whether the portal is applicable based on the prevailing conditions. In general, portals should be controlled via scripts using the "visible" target reference instead of using this mechanism. The complete list of attributes for this element is below.
PCDATA TagExpr – Specifies the code comprising the Live tag expression.
The "mouseinfo" Element
The "mouseinfo" element defines a MouseInfo Script for the portal that synthesizes text for display to the user whenever the user pauses the mouse over the portal. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the MouseInfo script.
Example
The following example demonstrates what various "portal" elements might look like. All default values are assumed for optional attributes.
<portal id="hair" style="editNormal"> <edit field="perHair"/> </portal> <portal id="name" style="chkNormal" showinvalid="yes" tiptext="Click to equip this item"> <checkbox field="grIsEquip" dynamicfield="grStkName"/> </portal> <portal id="menu" style="menuNormal"> <menu_things field="adjChosen" component="none" maxvisible="20" usepicksfield="adjUsePick" candidatefield="adjCandid"> <candidate></candidate> </menu_things> </portal> <portal id="gender" style="menuNormal"> <menu_literal field="perGender"> <choice value="0" display="Gender: Male"/> <choice value="1" display="Gender: Female"/> </menu_literal> </portal> <portal id="textlist" style="menuNormal"> <menu_array field="conTextSel" array="conList" maxvisible="10"/> </portal> <portal id="stRace" style="chsNormal" width="110"> <chooser_table component="Race" choosetemplate="LargeItem"> <chosen> @text = "Race: " & field[name].text </chosen> <titlebar> @text = "Choose the race for your character" </titlebar> </chooser_table> </portal>