On MSCROLL » History » Version 4
Per Amundsen, 06/20/2017 10:48 AM
1 | 1 | Per Amundsen | _Added in 2.7_ |
---|---|---|---|
2 | |||
3 | *<notextile>on <level>:MSCROLL:<*#?=!@>:<commands></notextile>* |
||
4 | |||
5 | Triggers when a user scrolls the message buffer in a window. |
||
6 | |||
7 | 4 | Per Amundsen | _See also [[/scrolltext]], [[$window]].mscrollpos, [[$window]].mscrollmax._ |
8 | 1 | Per Amundsen | |
9 | *Parameters* |
||
10 | |||
11 | 3 | Per Amundsen | <level> - The [[User Access Level]] for the event to trigger. |
12 | 1 | Per Amundsen | <*#?=!@> - The [[Matchtarget]] to listen to. |
13 | <commands> - The commands to be performed when the event listener's criteria is met. |
||
14 | |||
15 | *Example* |
||
16 | |||
17 | <pre> |
||
18 | on *:mscroll:#:{ |
||
19 | 2 | Per Amundsen | if ($window($active).mscrollpos == 1) { |
20 | 1 | Per Amundsen | echo -sg scrollbar for $active is at top |
21 | } |
||
22 | 2 | Per Amundsen | else if ($window($active).mscrollpos == $window($active).mscrollmax) { |
23 | 1 | Per Amundsen | echo -sg scrollbar for $active is at bottom |
24 | } |
||
25 | } |
||
26 | </pre> |