MouseInfo Script: Difference between revisions
New page: {{context|Kit Reference|Script Types}} ==Technical Details== :{| class="scripttable" |class="leftnormal"|Initial Context: |Pick or Thing |- |Alternate ... |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
|Fields Finalized? | |Fields Finalized? | ||
|Yes | |Yes | ||
|- | |||
|Where Used: | |||
|[[Portal Element (Data)|Portals]] | |||
|- | |||
|Procedure Use: | |||
|"mouseinfo" type, "info" context, "pick" context | |||
|- | |- | ||
|} | |} | ||
Line 18: | Line 24: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"| | |class="leftnormal"|text | ||
|Entry: Contains the default mouse-info for the object, which consists of the basic description text assigned to the object and any failed pre-requisites.<br> | |(String) Entry: Contains the default mouse-info for the object, which consists of the basic description text assigned to the object and any failed pre-requisites.<br> | ||
Exit: Contains the text to be displayed to the user as the mouse-info text. The final text may contain [[Encoded Text|encoding]]. | Exit: Contains the text to be displayed to the user as the mouse-info text. The final text may contain [[Encoded Text|encoding]]. | ||
|- | |- | ||
|ispick | |ispick | ||
|Entry: Indicates whether the text is being rendered for a thing (zero) or a pick (non-zero), allowing different handling to be performed for the two separate cases. | |(Number) Entry: Indicates whether the text is being rendered for a thing (zero) or a pick (non-zero), allowing different handling to be performed for the two separate cases. | ||
Exit: Ignored. | Exit: Ignored. | ||
|- | |- |
Latest revision as of 08:48, 20 February 2009
Context: HL Kit … Kit Reference … Script Types
Technical Details
Initial Context: Pick or Thing Alternate Context: None Fields Finalized? Yes Where Used: Portals Procedure Use: "mouseinfo" type, "info" context, "pick" context
The MouseInfo script utilizes the following special symbols:
text (String) Entry: Contains the default mouse-info for the object, which consists of the basic description text assigned to the object and any failed pre-requisites.
Exit: Contains the text to be displayed to the user as the mouse-info text. The final text may contain encoding.
ispick (Number) Entry: Indicates whether the text is being rendered for a thing (zero) or a pick (non-zero), allowing different handling to be performed for the two separate cases. Exit: Ignored.
Description
HL makes extensive use of visual elements that the user can move the mouse over to obtain further details about an object. This is generally referred to as mouse-over highlighting, or simply mouse info, and it is accomplished via the MouseInfo script on various portals. The purpose of the MouseInfo script is to synthesize the actual text to be displayed for the pick/thing that the user is inquiring about.
NOTE! The MouseInfo script is read-only. Within this script, virtually all aspects of the structural hierarchy can be accessed, but nothing can be changed.
Example
When displaying weapons, it's useful to show the damage and range. This can be easily appended to the default text for display.
@text &= "\n" @text &= "Damage: " & field[wpDamage}.text & "\n" @text &= "Range: " & field[wpRange].text & "\n"