vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ List of button attributes |
2 | -- ====================================================== |
||
3 | info.text = [STRING] -- The text of the button |
||
4 | info.func = [function()] -- The function that is called when you click the button |
||
5 | info.checked = [nil, 1] -- Check the button |
||
6 | info.isTitle = [nil, 1] -- If it's a title the button is disabled and the font color is set to yellow |
||
7 | info.disabled = [nil, 1] -- Disable the button and show an invisible button that still traps the mouseover event so menu doesn't time out |
||
8 | info.hasArrow = [nil, 1] -- Show the expand arrow for multilevel menus |
||
9 | info.hasColorSwatch = [nil, 1] -- Show color swatch or not, for color selection |
||
10 | info.r = [1 - 255] -- Red color value of the color swatch |
||
11 | info.g = [1 - 255] -- Green color value of the color swatch |
||
12 | info.b = [1 - 255] -- Blue color value of the color swatch |
||
13 | info.swatchFunc = [function()] -- Function called by the color picker on color change |
||
14 | info.hasOpacity = [nil, 1] -- Show the opacity slider on the colorpicker frame |
||
15 | info.opacity = [0.0 - 1.0] -- Percentatge of the opacity, 1.0 is fully shown, 0 is transparent |
||
16 | info.opacityFunc = [function()] -- Function called by the opacity slider when you change its value |
||
17 | info.cancelFunc = [function(previousValues)] -- Function called by the colorpicker when you click the cancel button (it takes the previous values as its argument) |
||
18 | info.notClickable = [nil, 1] -- Disable the button and color the font white |
||
19 | info.notCheckable = [nil, 1] -- Shrink the size of the buttons and don't display a check box |
||
20 | info.owner = [Frame] -- Dropdown frame that "owns" the current dropdownlist |
||
21 | info.keepShownOnClick = [nil, 1] -- Don't hide the dropdownlist after a button is clicked |
||
22 | ]]-- |
||
23 | UltimateUIMaster_MenuInfoList = { }; |
||
24 | UltimateUIMaster_MenuLastValue = 0; |
||
25 | |||
26 | function UltimateUIMaster_MenuBisOnLoad() |
||
27 | UIDropDownMenu_Initialize(this, UltimateUIMaster_MenuInitialize, "MENU"); |
||
28 | UIDropDownMenu_SetButtonWidth(50); |
||
29 | UIDropDownMenu_SetWidth(50); |
||
30 | end |
||
31 | |||
32 | function UltimateUIMaster_MenuOnLoad() |
||
33 | UIDropDownMenu_Initialize(UltimateUIMenuBis, UltimateUIMaster_MenuInitialize); |
||
34 | UIDropDownMenu_Initialize(this, UltimateUIMaster_MenuInitialize); |
||
35 | UIDropDownMenu_SetButtonWidth(50); |
||
36 | UIDropDownMenu_SetWidth(50); |
||
37 | end |
||
38 | |||
39 | UltimateUIMaster_MenuOpen = EarthMenu_MenuOpen; |
||
40 | |||
41 | function UltimateUIMaster_MenuInitialize() |
||
42 | if ( UIDROPDOWNMENU_MENU_LEVEL == 1 ) then |
||
43 | for index, value in UltimateUIMaster_MenuInfoList do |
||
44 | if (value.text) then |
||
45 | value.value = index; |
||
46 | UIDropDownMenu_AddButton(value, 1); |
||
47 | end |
||
48 | end |
||
49 | end |
||
50 | if ( UIDROPDOWNMENU_MENU_LEVEL == 2 ) then |
||
51 | UltimateUIMaster_MenuLastValue = UIDROPDOWNMENU_MENU_VALUE; |
||
52 | for index, value in UltimateUIMaster_MenuInfoList[UIDROPDOWNMENU_MENU_VALUE] do |
||
53 | if (type(value) == "table") then |
||
54 | if (value.text) then |
||
55 | value.value = index; |
||
56 | UIDropDownMenu_AddButton(value, 2); |
||
57 | end |
||
58 | end |
||
59 | end |
||
60 | end |
||
61 | if ( UIDROPDOWNMENU_MENU_LEVEL == 3 ) then |
||
62 | for index, value in UltimateUIMaster_MenuInfoList[UltimateUIMaster_MenuLastValue][UIDROPDOWNMENU_MENU_VALUE] do |
||
63 | if (type(value) == "table") then |
||
64 | if (value.text) then |
||
65 | UIDropDownMenu_AddButton(value, 3); |
||
66 | end |
||
67 | end |
||
68 | end |
||
69 | end |
||
70 | end |
||
71 |