ImageLiteral Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
New page: {{context|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...
 
Line 21: Line 21:


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

Revision as of 02:09, 2 December 2008

Context: HL Kit &#133; Kit Reference &#133; Data File Reference &#133; 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", e_xml_required, NULL, NULL, 0, NULL }, { "istransparent", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no },

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>