vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ |
2 | |||
3 | Config file for FlexBar. |
||
4 | |||
5 | Basic usage - |
||
6 | decide on a nae for the loadable config: EG MyConfig |
||
7 | place the line: |
||
8 | MyConfig = {} |
||
9 | |||
10 | then, each line you want executed follows the form: |
||
11 | MyConfig[i] = "flexbar command" |
||
12 | |||
13 | example: |
||
14 | |||
15 | MyConfig[1] = "hide button=1 on='LoseAggro' |
||
16 | MyConfig[2]= "show button=1 on='GainAggro' |
||
17 | --]] |
||
18 | |||
19 | -- Example configs: |
||
20 | -- Right click circular menu from a single button. |
||
21 | -- First, declare our circle menu config |
||
22 | FB_C_Menu = {} |
||
23 | -- then set the buttons up in their group and pattern |
||
24 | FB_C_Menu[1] = "Group Button=14-20 Anchor=14" |
||
25 | FB_C_Menu[2] = "CircleGroup Group=14 Padding=1" |
||
26 | FB_C_Menu[3] = "MoveRel Button=14 Trgbtn=13 dX=-38 dY=19" |
||
27 | FB_C_Menu[4] = "Ungroup group=14" |
||
28 | FB_C_Menu[5] = "Group Button=13-20 Anchor=13" |
||
29 | FB_C_Menu[6] = "Hide Button=14-20" |
||
30 | FB_C_Menu[7] = "Show Button=13" |
||
31 | -- Next create the behavior |
||
32 | -- Set button 20 to only do its normal thing on left clicks and make right-clicks available |
||
33 | FB_C_Menu[8] = "Advanced Button=13 State='on'" |
||
34 | -- Then, set buttons 13-19 to show on r-clicking 20 |
||
35 | FB_C_Menu[9] = "Show Button=14-20 On='RightButtonClick' Target=13" |
||
36 | -- Set the circle to hide on click and mouse leaving |
||
37 | FB_C_Menu[10] = "Hide Button=14-20 On='MouseLeaveGroup' Target=13" |
||
38 | FB_C_Menu[11] = "Hide Button=14-20 on='LeftButtonClick' Target=14-20" |
||
39 | FB_C_Menu[12] = "Hide Button=14-20 on='RightButtonClick' Target=14-20" |
||
40 | |||
41 | -- To implement these use /FlexBar LoadConfig Config='FB_C_Menu' in game |
||
42 | -- If you're already using those buttons, choose any range of 8 buttons and adjust accordingly. |
||
43 | |||
44 | -- one of the things someone was trying to do a while back was have a small row of buttons |
||
45 | -- (think he had 4) that would pop up 'totem poles' when the mouse went over them. The idea is |
||
46 | -- that he would have one for fire, earth, water and fire and put his totems in the popups. |
||
47 | -- for this we will use a group that is 4 buttons wide, and 3 high. |
||
48 | -- TotemPole 1 is buttons 1-3, with 3 being the button they pop up on |
||
49 | -- TotemPole 2 is buttons 4-6 with 6 being the trigger button |
||
50 | -- TotemPole 3 is buttons 7-9 with 9 being the trigger button |
||
51 | -- TotemPole 4 is buttons 10-12 with 12 being the trigger button |
||
52 | |||
53 | -- Name your config |
||
54 | FB_C_TotemPole = {} |
||
55 | -- Set the group up |
||
56 | FB_C_TotemPole[1] = "show button=1-12" |
||
57 | FB_C_TotemPole[2] = "group button=1-12 anchor=3" |
||
58 | -- (note the anchor - this will make your life easier) |
||
59 | FB_C_TotemPole[3] = "horizontalgroup group=3 height=3 padding=1" |
||
60 | |||
61 | -- set up events to hide all the popups when the mouse leaves the group or when a button is clicked |
||
62 | FB_C_TotemPole[4] = "hide button=[1 2 4 5 7 8 10 11] on='MouseLeaveGroup' target=3 " |
||
63 | FB_C_TotemPole[5] = "hide button=[1 2 4 5 7 8 10 11] on='LeftButtonClick' target=[1 2 4 5 7 8 10 11]" |
||
64 | FB_C_TotemPole[6] = "hide button=[1 2 4 5 7 8 10 11] on='RightButtonClick' target=[1 2 4 5 7 8 10 11]" |
||
65 | -- popup one goes up when mouse is over button 3, all others hide |
||
66 | FB_C_TotemPole[7] = "show button=[1 2] on='MouseEnterButton' target=3" |
||
67 | FB_C_TotemPole[8] = "hide button=[4 5 7 8 10 11] on='MouseEnterButton' target=3" |
||
68 | -- popup two goes up when mouse is over button 6, all others hide |
||
69 | FB_C_TotemPole[9] = "show button=[4 5] on='MouseEnterButton' target=6" |
||
70 | FB_C_TotemPole[10] = "hide button=[1 2 7 8 10 11] on='MouseEnterButton' target=6" |
||
71 | -- popup three goes up when mouse is over button 9, all others hide |
||
72 | FB_C_TotemPole[11] = "show button=[7 8] on='MouseEnterButton' target=9" |
||
73 | FB_C_TotemPole[12] = "hide button=[1 2 4 5 10 11] on='MouseEnterButton' target=9" |
||
74 | -- popup four goes up when mouse is over button 12, all others hide |
||
75 | FB_C_TotemPole[13] = "show button=[10 11] on='MouseEnterButton' target=12" |
||
76 | FB_C_TotemPole[14] = "hide button=[1 2 4 5 7 8 ] on='MouseEnterButton' target=12" |
||
77 | FB_C_TotemPole[15] = "hide button=[1 2 4 5 7 8 10 11]" |
||
78 | |||
79 | -- Another question I had was how to set up a bar that mimiced the regular action bar |
||
80 | FB_C_ActionBar = {} |
||
81 | -- Show the bar |
||
82 | FB_C_ActionBar[1] = "show button=85-96" |
||
83 | -- Set them up in a horizontal bar |
||
84 | FB_C_ActionBar[1] = "group button=85-96 anchor=85" |
||
85 | FB_C_ActionBar[2] = "horizontalgroup group=85 height=1 padding=1" |
||
86 | -- Make them mimic the action bar. ActionBarPage is thrown when the action bar changes |
||
87 | -- (although there appears to be a problem with that in EU Beta). The second argument is |
||
88 | -- the page to which it changed. |
||
89 | FB_C_ActionBar[3] = "remap button=85-96 base=1 on='ActionBarPage' target=1" |
||
90 | FB_C_ActionBar[4] = "remap button=85-96 base=13 on='ActionBarPage' target=2" |
||
91 | FB_C_ActionBar[5] = "remap button=85-96 base=25 on='ActionBarPage' target=3" |
||
92 | FB_C_ActionBar[6] = "remap button=85-96 base=37 on='ActionBarPage' target=4" |
||
93 | FB_C_ActionBar[7] = "remap button=85-96 base=49 on='ActionBarPage' target=5" |
||
94 | FB_C_ActionBar[8] = "remap button=85-96 base=61 on='ActionBarPage' target=6" |
||
95 | FB_C_ActionBar[9] = "Show group=85" |
||
96 | |||
97 | |||
98 | -- For the 3x3 matrix, do the following: |
||
99 | -- bind the 1 key to button 10, 2 key to button 11, 3 key to button 12 |
||
100 | -- make sure buttons 10-12 are empty |
||
101 | -- type /flexbar loadconfig config='Nine_Matrix' to set this up |
||
102 | Nine_Matrix={ |
||
103 | "show button=1-9", |
||
104 | "group button=1-9 anchor=1", |
||
105 | "verticalgroup group=1 width=3 padding=1", |
||
106 | "remap button=10-12 base=1 toggle='true' on='LeftButtonClick' target=10", |
||
107 | "remap button=10-12 base=4 toggle='true' on='LeftButtonClick' target=11", |
||
108 | "remap button=10-12 base=7 toggle='true' on='LeftButtonClick' target=12", |
||
109 | "raise name='reverttimer' event='revertmatrix' source=1 in=4 on='LeftButtonClick' target=10-12", |
||
110 | "remap button=10-12 base=1 reset='true' on='revertmatrix' target=1", |
||
111 | "text button=1 text='1-1'", |
||
112 | "text button=2 text='1-2'", |
||
113 | "text button=3 text='1-3'", |
||
114 | "text button=4 text='2-1'", |
||
115 | "text button=5 text='2-2'", |
||
116 | "text button=6 text='2-3'", |
||
117 | "text button=7 text='3-1'", |
||
118 | "text button=8 text='3-2'", |
||
119 | "text button=9 text='3-3'" |
||
120 | } |