Project

General

Profile

Hotlink » History » Version 3

Per Amundsen, 01/04/2017 11:57 PM

1 1 Per Amundsen
_Added in 2.7_
2
3
*/hotlink -md [@menu]*
4
5
Opens the default and/or a custom popup menu during a [[on HOTLINK]] right-click event.
6
7 3 Per Amundsen
_See also [[on HOTLINK]], [[$hotlink]], $hotline, $hotlinepos._
8 2 Per Amundsen
9 1 Per Amundsen
*Switches*
10
11
-m - Creates and opens a popup menu using a custom @menu
12
-d - If @menu is defined, adds the menu items from @menu to the default popup menu, otherwise shows the default popup menu.
13
14
*Parameters*
15
16
[@menu] - Custom popup menu.
17
18
*Example*
19
20
<pre>
21
; Create a popup menu called '@popup'.
22
menu @popup {
23
  Popup text:echo -ag Popup menu
24
}
25
26
; When right-clicking the word 'popup', open the custom '@popup' menu.
27
on *:hotlink:popup:*:{
28
  if ($hotlink(event) == rclick) {
29
    hotlink -m @popup
30
  }
31
}
32
33
; When right-clicking the word 'popup', open the default popup menu and add the custom '@popup' menu items.
34
on *:hotlink:popup:*:{
35
  if ($hotlink(event) == rclick) {
36
    hotlink -dm @popup
37
  }
38
}
39
</pre>