ImageLiteral Element (Data): Difference between revisions
From HLKitWiki
Jump to navigationJump to search
(One intermediate revision by the same user not shown) | |||
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. | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|image | |class="leftnormal"|image | ||
Line 13: | Line 11: | ||
|istransparent | |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". | |(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". | ||
|- | |||
|isbuiltin | |||
|(Optional) Boolean – Indicates whether the image file is a "built-in" file provided by HL for easy re-use. Default: "no". | |||
|- | |- | ||
|} | |} |
Latest revision as of 10:12, 20 February 2009
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". isbuiltin (Optional) Boolean – Indicates whether the image file is a "built-in" file provided by HL for easy re-use. 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>