Difference between revisions of "TableFixed Element (Data)"

From HLKitWiki
Jump to: navigation, search
(The "table_fixed" Element)
Line 8: Line 8:
 
|class="leftnormal"|component
 
|class="leftnormal"|component
 
|Id – Specifies the unique id of the component that all shown objects must be derived from.  
 
|Id – Specifies the unique id of the component that all shown objects must be derived from.  
 +
|-
 +
|usetabledef
 +
|(Optional) Id – Specifies the [[TableDef Element (Data)|TableDef]] to reference for selection details of this chooser. Default: None.
 
|-
 
|-
 
|showtemplate
 
|showtemplate

Revision as of 13:33, 10 November 2017

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

The "table_fixed" Element

Fixed tables present a list of items to the user that cannot be modified by the user through the table. This is ideal for displaying a list of character attributes or a summary of the special abilities possessed by a character. Since they cannot be modified, fixed tables have only a set of behaviors for showing the selected items to the user. Each fixed table is defined via the use of the "table_fixed" element. The complete list of attributes for this element is below.

component Id – Specifies the unique id of the component that all shown objects must be derived from.
usetabledef (Optional) Id – Specifies the TableDef to reference for selection details of this chooser. Default: None.
showtemplate Id – Specifies the unique id of the template to be used for displaying the picks that have been added to the table.
showpicks (Optional) Set – Designates the source from which the picks shown are retrieved from. Must be one of these values:
  • container – The picks shown are 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 picks shown are from the active actor.
  • actor – The picks shown represent all actors in the entire portfolio.
  • lead – The picks shown represent all lead actors in the entire portfolio.
  • minion – The picks shown are all immediate minions for the active actor.
  • Default: "container".
showsortset (Optional) Id – Specifies the unique id of the sort set to be used for sequencing the items that exist within the table. If empty, all objects are sorted by name. Default: Empty.
showgapx (Optional) Integer – Specifies the gap along the X-axis to insert between items that exist within the table. Default: "0".
showgapy (Optional) Integer – Specifies the gap along the Y-axis to insert between items that exist within the table. Default: "0".
columns (Optional) Integer – Specifies the number of columns of data to display within the table. Default: "1".
scrollable (Optional) Boolean – Indicates whether the table contents can be scrolled by the user. By default, a scroller is shown whenever the number of items exceeds the visible space, but you can disable this behavior. Default: "yes".
headertemplate (Optional) Id – Specifies the unique id of the template to be used for a header item that appears at the top of the table. This allows you to add column headers above various pieces of information in the table. If empty, the "headertitle" element dictates whether a header is displayed above the table. Default: Empty.
headerpick (Optional) Id – Specifies the unique id of a thing that is associated with the header item at the top of the table. HL will retrieve any pick based on this thing that exists within the target container and use it. This allows you to control what fields can be accessed from the "headertemplate". If empty, the "actor" pick is used, except within a gizmo, where its "defaultthing" is used instead. Default: Empty.
footertemplate (Optional) Id – Specifies the unique id of the template to be used for a footer at the bottom of the table. This allows you to put information at the bottom of the table that is always tied to the table for sizing and positioning purposes. If empty, no footer is displayed for the table. Default: Empty.
showfixedlast (Optional) Boolean – Indicates whether all non-deletable picks within the table are sorted to the end of the list of picks shown. Default: "no".
allowuserorder (Optional) Boolean – Indicates whether the items in the table can be re-ordered by the user. If enabled, the specified component must designate a suitable ordering field or a separate component with such a field must be specified via the "ordercomponent" attribute. Default: "no".

NOTE! Verify that whatever sort set you use for showing the items includes the designated ordering field as its first sort key.

ordercomponent (Optional) Id – Specifies the unique id of an alternate component that possesses a suitable ordering field. This attribute is only applicable when the table supports user ordering. If empty, the ordering field is dictated by the component associated with the table. Default: Empty.
alwaysupdate (Optional) Boolean – Indicates whether the table must 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".

NOTE! This option can significantly slow down display updates on slower computers, so only enable this if truly necessary.

The "table_fixed" 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.

list An optional "list" element may appear as defined by the given link. This element defines a List Tag Expression for the portal.
headertitle An optional "headertitle" element may appear as defined by the given link. This element defines a HeaderTitle Script for the portal.

The "list" Element

The "list" element defines a List Tag Expression for the portal that limits the set of picks that are shown. Regardless of this tag expression, all picks added via this portal are always shown within it, enabling deletion of any object added through the table. The complete list of attributes for this element is below.

PCDATA TagExpr – Specifies the code comprising the List tag expression.

The "headertitle" Element

The "headertitle" element defines a HeaderTitle Script for the portal that synthesizes the text to be displayed at the top of the table as a header. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the HeaderTitle script.

Example

The following example demonstrates what a fixed table portal might look like. All default values are assumed for optional attributes.

<portal id="baAttrib" style="tblInvis">
  <table_fixed component="Attribute" scrollable="no"
      showtemplate="baAttrPick" showsortset="explicit">
    <headertitle>
      @text = "Attributes"
      </headertitle>
    </table_fixed>
  </portal>