Difference between revisions of "Property Element"

947 bytes added ,  00:05, 19 December 2009
imported>JRoush
imported>JRoush
Line 28: Line 28:
== Mouse Targetable ==
== Mouse Targetable ==
Properties for any menu elements that can be the focus of mouse events, i.e. the [[Menu Element#Image|Image]] and [[Menu Element#Rect|Rect]] elements.
Properties for any menu elements that can be the focus of mouse events, i.e. the [[Menu Element#Image|Image]] and [[Menu Element#Rect|Rect]] elements.
*Target
*'''Target''' (Numeric: Boolean) If true, the element may have mouse or keyboard focus - the Mouseover and Clicked traits will be set accordingly by the engine, and clicking on the element will play the corresponding Clicksound.  If false, then the element is just part of the background, and won't react to player input at all.
*Clicksound
*'''Clicksound''' (Numeric) Which in-game click sound effect to play when the element is clicked.
*Mouseover
*'''Mouseover''' (Numeric) For targetable elements, this property is set automatically by the game engine.  Its value is 1 when the element has mouse focus, and 0 at all other times.
*'''Clicked''' (Numeric) For targetable elements, this property is set automatically by the game engine.  Its value is 1 ''for a single frame'' after the element is clicked by the mouse.  There are a number of clever uses for this property - the generic scroll bars, for example, use it to count how many times the player has clicked on the increase/decrease buttons.


== Textured ==
== Textured ==
Anonymous user