Portals

From HLKitWiki
Jump to: navigation, search

Context: HL KitBasic Concepts and Terminology … Visual Building Blocks 

Overview

Portals are the finest level of control within a visual presentation. They provide access to individual fields within things and picks. Fields are hooked up to portals, thereby allowing the user to view and/or modify the contents of those fields. For example, a "label" portal could be associated with the "damage" field for a weapon, thereby allowing the contents of the field to be displayed to the user via that portal. If an "edit" portal were used instead, then the contents of the field could potentially be modified by the user.

Each of the different types of portals is summarized in the sections below. Complete details on each portal type will be found within the Kit Reference section of this documentation.

IMPORTANT! Portals are unlike most other elements used within the Kit. For portals that are defined within templates, the unique ids of those portals must only be unique within the context of the template. This means that you may freely re-use the same unique id for portals within different templates. For example, you could have a "name" or "delete" portal within multiple templates. Since portals within templates are only accessible through the template in which they are defined, their scope is uniquely restricted to the template, which makes the re-use of ids possible. Please note that this ability to re-use unique ids only applies to portals defined within a layout, so it does not apply to tables and other portals used directly within layouts.

Label Portals

Labels are the simplest type of portal and allow the display of information to the user. There are different types of label portals, depending on what the label contains and how it is to be displayed to the user.

Literal Literal label portals display a fixed string of text.
Field-Based Field-based label portals show the contents of a specific field.
Script-Based Script-based label portals synthesize their contents via a script, with the results being displayed.
Titles Title label portals present their contents with special formatting for use as a title.

Image Portals

Image portals enable the display of images to the user. There are different types of image portals, depending on what the portal contains and how it is to be presented.

Literal Literal image portals always display the same, fixed image.
Field-Based Field-based image portals show the image dictated by the contents of a specific field.
User User image portals present the image that has been selected by a user.
Reference Reference image portals allow a user-added image to be dynamically adapted for use at run-time (such as using a tiny version of the first character portrait on the Tactical Console).

Edit Portals

Edit portals enable the user to edit the contents of a specific field. There are different types of edit portals, depending on what the portal contains and how it is to be presented.

Simple Simple edit portals provide direct editing of a numeric or text field.
Date Date edit portals offer structured editing that ensures the contents of the field always subscribe to specific rules (e.g. four digits for year, two digits for month, etc.).

Incrementer Portals

Incrementer portals provide the ability to edit the contents of a specific numeric field. An incrementer includes visual elements like a "+" and "-" button that allow the user to easily increase and decrease the value shown within the portal. Incrementers are typically used for attribute values, damage tracking, charges, and other similar mechanisms.

Checkbox Portals

Checkbox portals allow the user to toggle the state of a specific field between values of zero and one. The user sees the portal as an either/or toggle state.

Menu Portals

Menu portals enable the user to select one choice from a list of available choices. There are different types of menu portals, depending on what the portal contains.

Literal Literal menus present a choice from a set of options that are pre-defined and fixed. They are suited for situations like the gender of a character and the method used for selecting ability scores in the d20 System.
Array Array-based menus use a script or other technique to synthesize the list of valid choices the user can select from.
Things Thing-based menus dynamically identify a group of things from which the user can select. They are useful when choosing a weapon type or spell type to assign a skill bonus.
Picks Pick-based menus dynamically identify a group of picks from which the user can select. They are ideal when you need apply an adjustment to something that is restricted to what the character possesses, such as choosing a weapon that the character has.

Chooser Portals

Chooser portals allow the user to select a thing from a table of options that include full descriptions. Once the thing is selected, it is added to the character as a pick and becomes an integral part of the character. Chooser portals are perfect for selecting a race or an alignment, since exactly one selection must be made for the character, and the user will want to be able to review the details associated with each possible choice.

Action Portals

Action portals are presented as buttons that trigger a specific action when interacted with by the user. There are many types of action portals, depending on what action is desired.

Delete Triggers the deletion of a pick from the table that added it.
Info When clicked or the mouse is moved over the portal, full details on the pick are displayed.
Edit Triggers editing of the gizmo associated with a pick by bringing up a suitable form for the purpose.
Form Triggers the display of a specific tab panel as a form, such as is used to directly apply damage to actors from within the Tactical Console.
Trigger Invokes a script, such as when applying damage to an actor or resetting the accrued damage.
Notes Displays a form where arbitrary notes can be edited for a pick.
Load Switches to the actor associated with the specified pick, such as is used on the Dashboard and Tactical Console.
Lock Transitions the character into a locked state for the purposes of advancement.
Unlock Transitions the character into an unlocked state for the purposes of advancement.
Master Switches to the actor that is the "master" of the current actor.
Minion Switches to an actor that is the "minion" of the current actor.
Manage Gear Displays a menu through which the user can move gear between different containers.
Get Gear Displays a menu through which the user can move gear between actors.
Start Combat Begins a new combat within the Tactical Console.
End Combat End the current combat within the Tactical Console.
New Turn Starts a new combat turn within the Tactical Console.
Initiative Change Incorporates any direct initiative changes made by the user within the Tactical Console.
Integrate Integrates any pending actors into the current combat.
Sort Dashboard Triggers a re-sort of the actors shown on the Dashboard.

Region Portals

Region portals make it possible to place a border around a rectangular region that doesn't correspond to a single portal. For example, if you want to visual group a few portals, you can define a region that encompasses all of them and place a border around the region, thereby placing a box around the group of portals.

Separator Portals

Separator portals allow you to put either a vertical or horizontal separator bar between sections of the display. Separators are an excellent way to visual group portals and make the interface more intuitive for the user.

Table Portals

Table portals present a collection of related picks in a tabular list. Each item in the table is displayed via a template that is specified with the table. The template specifies how to position the various facets of the pick within the table entry. There are different types of table portals, depending on what the portal contains and how it is to be presented.

Fixed Fixed table portals display a table of picks that provides no means for the user to add or delete items.
Dynamic Dynamic table portals display a table of picks that includes an option at the bottom to add new items to the table. If the "add" option is used, the user is presented with a list of things to choose from and the one selected is added to the container as a new pick.
Auto Auto table portals display a table of picks that includes an option at the bottom to add new items to the table. If the "add" option is used, a specific thing is added to the container as a new pick, which the user can subsequently customize. The journal is an example of an "auto" table, where adding a new item automatically adds a new journal entry.

Special Portals

Special portals are those portals that have highly specialized uses and cannot generally be customized by the author in term of behavior. However, they do need to be properly placed within the interface, so a special portal is used to represent the mechanism and allow placement. There are a number of special portals, as outlined below.

Edit Settings Displayed as button that allows the user to edit configuration settings when clicked. This portal is typically used on the Configure Hero form.
Settings Summary Displayed as a grid that shows the currently selected configuration settings. This portal is typically used on the Configure Hero form.
Alliance Displayed as a menu that allows the user to select whether the character is to be considered an ally or an enemy for the purposes of the Tactical Console. This portal is typically used on the Configure Hero form.

Output Portals

The output of character sheets entails a number of critical differences from the interactive visual elements used on-screen. As such, a different set of portals is used to render character sheet output. The presentation behaviors of output portals is similar, yet distinct, from interactive portals, and the set of available output portals consists of those outlined below.

Label Renders text onto the character sheet, with the text being driven by any of the different mechanisms supported by on-screen label portals.
Image Draws an image onto the character sheet, with the image being handled in any of the different ways supported by on-screen image portals.
Table Renders a table of picks to the character sheet, using a template to specify the contents of each item within the table.