ImageLiteral Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
Line 5: Line 5:
The role of the "image_literal" element is to display a fixed image to the user, where the image is dictated by the portal definition. Whenever you need to show an icon to the user, such as when indicating a particular condition is present, you can use a literal image portal. The complete list of attributes for this element is below.
The role of the "image_literal" element is to display a fixed image to the user, where the image is dictated by the portal definition. Whenever you need to show an icon to the user, such as when indicating a particular condition is present, you can use a literal image portal. The complete list of attributes for this element is below.


{ "image", e_xml_required, NULL, NULL, 0, NULL },
{ "istransparent", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no },
:{| class="infotable"
:{| class="infotable"
|class="leftnormal"|image
|class="leftnormal"|image

Revision as of 10:54, 2 December 2008

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

The "image_literal" Element

The role of the "image_literal" element is to display a fixed image to the user, where the image is dictated by the portal definition. Whenever you need to show an icon to the user, such as when indicating a particular condition is present, you can use a literal image portal. The complete list of attributes for this element is below.

image Text – Specifies the filename of a bitmap image within the data file folder for the game system. The given image is displayed within the portal.
istransparent (Optional) Boolean – Indicates whether the image should be treated as transparent, wherein the pixel color at position 0,0 is considered transparent throughout the image. Default: "no".

Example

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

<portal id="heldby" style="imgNormal">
  <image_literal image="gearinfo.bmp" istransparent="yes"/>
  <mouseinfo mousepos="middle+above">
    call InfoHeld
    </mouseinfo>
  </portal>