Style Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
Line 71: Line 71:
|Id – Unique id of the font resource to be used for the style.
|Id – Unique id of the font resource to be used for the style.
|-
|-
|
|textcolor
|(Optional) x –  
|(Optional) x –  
|-
|-
|
|textcolorid
|(Optional) x –  
|(Optional) x –  
|-
|-
|
|background
|(Optional) x –  
|(Optional) x –  
|-
|-
|
|alignment
|(Optional) x –  
|(Optional) x –  
|-
|-
|
|ispattern
|(Optional) x –  
|(Optional) x –  
|-
|-
|
|scaleimage
|(Optional) x –  
|(Optional) x –  
|-
|-

Revision as of 12:24, 25 November 2008

Context: HL Kit … Kit Reference … Structural File Reference 

The "style" Element

All of the basic visual look and behaviors of portals is encapsulated in a collection of styles. Each distinct category of portal has its own type of style, and you can only associate styles with portals of the corresponding type. Each separate style is specified through the use of a "style" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the style. This id is used in all references to the style.
border (Optional) Id – Identifies the border to used in conjunction with this style. All portals may have a border drawn around them, and the border is controlled via the style. You can specify the unique id of the border to use or "none" to indicate no border. Default: "none"

The "resource" element also possesses child elements that define the specifics of the resource. 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 "resource" element, exactly one of these child elements may be specified for each style. If multiple are given, a compiler error will be reported. The chosen child element dictates the type of style that is being defined. You may include as many "resource" elements as you wish after the single child element that specifies the style.

style_label An optional "style_label" element may appear as defined by the given link. This element specifies the details of a style for use with label portals.
style_image An optional "style_image" element may appear as defined by the given link. This element specifies the details of a style for use with image portals.
style_edit An optional "style_edit" element may appear as defined by the given link. This element specifies the details of a style for use with edit portals.
style_checkbox An optional "style_checkbox" element may appear as defined by the given link. This element specifies the details of a style for use with checkbox portals.
style_menu An optional "style_menu" element may appear as defined by the given link. This element specifies the details of a style for use with menu portals.
style_action An optional "style_action" element may appear as defined by the given link. This element specifies the details of a style for use with action portals.
style_incrementer An optional "style_incrementer" element may appear as defined by the given link. This element specifies the details of a style for use with incrementer portals.
style_chooser An optional "style_chooser" element may appear as defined by the given link. This element specifies the details of a style for use with chooser portals.
style_region An optional "style_region" element may appear as defined by the given link. This element specifies the details of a style for use with region portals.
style_table An optional "style_table" element may appear as defined by the given link. This element specifies the details of a style for use with table portals.
style_separator An optional "style_separator" element may appear as defined by the given link. This element specifies the details of a style for use with separator portals.
style_special An optional "style_special" element may appear as defined by the given link. This element specifies the details of a style for use with special portals.
style_output An optional "style_output" element may appear as defined by the given link. This element specifies the details of a style for use with output portals.
resource Zero or more "resource" elements may appear as defined by the given link. This element specifies new resources that are used in conjunction with the style.

The "style_label" Element

The "style_label" element defines the facets of a style for label portals. The complete list of attributes for this element is below.

font Id – Unique id of the font resource to be used for the style.
textcolor (Optional) x –
textcolorid (Optional) x –
background (Optional) x –
alignment (Optional) x –
ispattern (Optional) x –
scaleimage (Optional) x –

{ "textcolor", e_xml_implied, "", NULL, 0, NULL }, { "textcolorid", e_xml_implied, "", NULL, 0, NULL }, { "background", e_xml_implied, "", NULL, 0, NULL }, { "alignment", e_xml_set, l_alignment[0], NULL, SIZE_ALIGNMENT, l_alignment }, { "ispattern", e_xml_set, l_yes_no[0], NULL, SIZE_YES_NO, l_yes_no }, { "scaleimage", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no }

The "style_image" Element

The "style_image" element defines the facets of a style for image portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_edit" Element

The "style_edit" element defines the facets of a style for edit portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_checkbox" Element

The "style_checkbox" element defines the facets of a style for checkbox portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_menu" Element

The "style_menu" element defines the facets of a style for menu portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_action" Element

The "style_action" element defines the facets of a style for action portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_incrementer" Element

The "style_incrementer" element defines the facets of a style for incrementer portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_chooser" Element

The "style_chooser" element defines the facets of a style for chooser portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_region" Element

The "style_region" element defines the facets of a style for region portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_table" Element

The "style_table" element defines the facets of a style for table portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_separator" Element

The "style_separator" element defines the facets of a style for separator portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_special" Element

The "style_special" element defines the facets of a style for special portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

The "style_output" Element

The "style_output" element defines the facets of a style for output portals. The complete list of attributes for this element is below.

Id – Unique id of the font resource to be used for the style.
(Optional) x –
(Optional) x –
(Optional) x –

Example

The following example demonstrates what various "style" elements might look like. All default values are assumed for optional attributes.