Difference between revisions of "Tile Systems (MenuQue)"
Jump to navigation
Jump to search
→Scroll
imported>Kyoma m (Added unfinished tag) |
imported>Kyoma (→Scroll) |
||
Line 43: | Line 43: | ||
===Scroll=== | ===Scroll=== | ||
This will respond to the mousewheel and increment or decrement | This will respond to the mousewheel and increment or decrement the <user5> trait. Most common use would be for custom scrollbars but how this value is used makes no difference. REQUIRES: <user5> trait. | ||
* A scroll system is only considered active (and thus invoked) when it is visible and targetable. When a menu has more than one scroll system (including the default scrolling behaviour) it will use the first active one it finds. Scroll systems always take precedence over the default scrolling behaviour. | |||
* The code does not check for boundaries when it detects scrolling, that should be done in the XML using the <max> and <min> traits. | |||
Here is a quick template, when you see a trait with ... then that means it is of no importance to this system in particular and should be filled with whatever value you need it to be. They are listed for completeness and to better illustrate things. | |||
<pre>... | |||
<image name="scroll_bar"> | |||
<include src="vertical_scroll.xml" /> | |||
<id> &Scroll; </id> | |||
<target> &true; </target> | |||
<locus> &true; </locus> | |||
<depth> 15 </depth> | |||
<user1> ... </user1> | |||
<user2> ... </user2> | |||
<user3> ... </user3> <!-- step distance --> | |||
<user4> ... </user4> <!-- jump distance --> | |||
<user5> 0 </user5> <!-- code set - scroll force value (must be 0 here) --> | |||
<!-- user7 --> <!-- current value --> | |||
<user8> ... </user8> <!-- num visible --> | |||
</image> | |||
... | |||
</pre> | |||
===Drag=== | ===Drag=== |