vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[
2 Functions to implement slash commands for FlexBar
3 Last Modified
4 12/26/2004 Initial version
5 08/12/2005 Added FlexBarButton_UpdateLocation and FlexBarButton_DragStart - Sherkhan
6 08/12/2005 Added Text3 Field - Sherkhan
7 08/24/2005 Adjusted FlexBarButton_OnClick() to "properly" handle pet autocast (ticket #13) - Ratbert_CP
8 --]]
9  
10 FlexBarVersion = 1.5
11  
12  
13 -- Utility object
14 local util = Utility_Class:New()
15  
16 -- OnFoo functions
17  
18 function FlexBar_OnLoad()
19 -- Set up slash commands
20 FB_Command_AddCommands(FBcmd)
21 -- Register for events
22 FlexBar:RegisterEvent("VARIABLES_LOADED");
23 FlexBar:RegisterEvent("PLAYER_ENTERING_WORLD");
24 FlexBar:RegisterEvent("PLAYER_ENTER_COMBAT");
25 FlexBar:RegisterEvent("PLAYER_LEAVE_COMBAT");
26 FlexBar:RegisterEvent("PLAYER_REGEN_ENABLED");
27 FlexBar:RegisterEvent("PLAYER_REGEN_DISABLED");
28 FlexBar:RegisterEvent("CHAT_MSG_COMBAT_SELF_MISSES");
29 FlexBar:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
30 FlexBar:RegisterEvent("CHAT_MSG_COMBAT_CREATURE_VS_SELF_MISSES");
31 FlexBar:RegisterEvent("UNIT_HEALTH")
32 FlexBar:RegisterEvent("UNIT_MANA")
33 FlexBar:RegisterEvent("UNIT_RAGE")
34 FlexBar:RegisterEvent("UNIT_ENERGY")
35 FlexBar:RegisterEvent("ACTIONBAR_PAGE_CHANGED")
36 -- FlexBar:RegisterEvent("SPELLS_CHANGED")
37 FlexBar:RegisterEvent("PLAYER_COMBO_POINTS")
38 FlexBar:RegisterEvent("PLAYER_GAINED_CONTROL")
39 FlexBar:RegisterEvent("PLAYER_LOST_CONTROL")
40 FlexBar:RegisterEvent("BAG_UPDATE")
41 FlexBar:RegisterEvent("UNIT_INVENTORY_CHANGED")
42 FlexBar:RegisterEvent("ACTIONBAR_SLOT_CHANGED")
43 FlexBar:RegisterEvent("UPDATE_INVENTORY_ALERTS")
44 FlexBar:RegisterEvent("MERCHANT_UPDATE")
45 FlexBar:RegisterEvent("MERCHANT_CLOSED")
46 FlexBar:RegisterEvent("UNIT_AURA")
47 FlexBar:RegisterEvent("UNIT_COMBAT")
48 FlexBar:RegisterEvent("PLAYER_TARGET_CHANGED")
49 FlexBar:RegisterEvent("UNIT_PET")
50 FlexBar:RegisterEvent("UNIT_FLAGS");
51 FlexBar:RegisterEvent("PET_BAR_UPDATE");
52 FlexBar:RegisterEvent("PET_BAR_UPDATE_COOLDOWN");
53 FlexBar:RegisterEvent("PARTY_MEMBERS_CHANGED");
54 FlexBar:RegisterEvent("PLAYER_AURAS_CHANGED");
55  
56 end
57  
58 function FlexBar_OnEvent(event)
59 -- Dispatch to standard event handlers
60 local dispatch = FBEventHandlers[event]
61 if dispatch then
62 dispatch(event)
63 end
64 -- Dispatch to extended event handlers
65 local handlers = FBExtHandlers[string.upper(event)]
66 if handlers then
67 local index, dispatch
68 for index, dispatch in pairs(handlers) do
69 dispatch(event)
70 end
71 end
72 end
73  
74 function Flexbar_OnUpdate(elapsed)
75 -- Update any timers we have running.
76 local name, timer
77 for name, timer in pairs(FBTimers) do
78 timer:Update(elapsed)
79 end
80 if not FBProfileLoaded then return end
81 --local msg = ("Actual = %d,%d\nState = %d,%d\nSaved = %d,%d")
82 --msg = format(msg,FlexFrame41:GetRight(),FlexFrame41:GetBottom(),FBState[41]["xcoord"],FBState[41]["ycoord"],FBSavedProfile[FBProfileName][41].State["xcoord"],FBSavedProfile[FBProfileName][41].State["ycoord"])
83 FBLoadProfileDialogTitle:SetText("")
84 FBLoadProfileDialogText:SetText("")
85 end
86  
87 function FlexBarFrame_OnLoad(frame)
88 -- Went nuts trying to figure out why I couldn't get clicks and drags
89 -- in my handle frames - I didn't do this
90 frame:RegisterForDrag("LeftButton");
91 end
92  
93 function FlexBarFrame_UpdateLocation(frame)
94 -- The button frame has recieved a drag stop, or a moveABS/moveREL command has finished
95 -- Get the current button co-ordinates and store them
96 -- 1) Determine if this is a single button, or a group
97 -- 2) If single, apply settings for the single button
98 -- If group, apply settings for the button group - new coords for all buttons in the group
99 local buttonnum=FB_GetButtonNum(frame)
100  
101 if (frame.moving) then
102 frame.moving = nil;
103 frame:StopMovingOrSizing();
104 if (FBState[buttonnum]["group"]) and (FBState[buttonnum]["group"] == buttonnum) then
105 -- We have a group anchor that moved, save coordinate data for anchor, and set new
106 -- locations for non-anchor buttons in memory based upon the stored offset data
107 if(FB_DebugFlag == 1) then
108 FB_ReportToUser("<< Frame_UpdateLocation: Group #"..buttonnum.." Update >>");
109 end
110  
111 FB_GetCoords(buttonnum)
112 FB_RestoreGroupOffsetAfterMove(buttonnum)
113 else
114 -- Single button moved, save coordinate data for just the button
115 if(FB_DebugFlag == 1) then
116 FB_ReportToUser("<< Frame_UpdateLocation: Button #"..buttonnum.." Update >>");
117 end
118  
119 FB_GetCoords(buttonnum)
120 end
121 end
122  
123 end
124  
125 function FlexBarFrame_DragStart(frame)
126 local buttonnum=FB_GetButtonNum(frame)
127  
128 if (FBState[buttonnum]["group"]) and (FBState[buttonnum]["group"] == buttonnum) then
129 -- Group move starting, store group button offsets prior to the move
130 FB_StoreGroupOffsetForMove(buttonnum)
131 end
132  
133 -- Set frame to Moving
134 frame.moving = true;
135 frame:StartMoving();
136  
137 if(FB_DebugFlag == 1) then
138 FB_ReportToUser("<< Button_DragStart: Dragging button "..FB_GetButtonNum(frame).." >>");
139 end
140 end
141  
142 function FlexBarButtonDown(buttonnum)
143 -- Modified Blizzard code (removed bonus action check)
144 -- appears to simply change the look of the button to reflect that
145 -- it is pushed.
146  
147 -- originally coded to use the button ID - but why when this is only called from bindings?
148 local button = getglobal("FlexBarButton".. buttonnum);
149 if ( button:GetButtonState() == "NORMAL" ) then
150 button:SetButtonState("PUSHED");
151 end
152 end
153  
154 function FlexBarButtonUp(buttonnum)
155 -- Modified Blizzard code (removed bonus action check)
156 -- besides the appearance change, not sure what they are doing here.
157 -- same as above
158 local button = getglobal("FlexBarButton".. buttonnum);
159 if ( button:GetButtonState() == "PUSHED" ) then
160 button:SetButtonState("NORMAL");
161 FBLastButtonDown = "LeftButton"
162 FlexBarButton_OnClick(button, true, "LeftButton")
163 if ( IsCurrentAction(FlexBarButton_GetID(button)) ) then
164 button:SetChecked(1);
165 else
166 button:SetChecked(0);
167 end
168 end
169 end
170  
171 function FlexBarButton_OnLoad(button)
172 -- Blizzard code: Called as each button is loaded.
173 button.showgrid = 1;
174 button.flashing = 0;
175 button.flashtime = 0;
176 FlexBarButton_Update(button);
177 -- Went nuts trying to figure out why I couldn't get clicks and drags
178 -- in my handle frames - I didn't do this
179 button:RegisterForDrag("LeftButton", "RightButton");
180 button:RegisterForClicks("LeftButtonUp", "RightButtonUp");
181 button:RegisterEvent("VARIABLES_LOADED");
182 button:RegisterEvent("ACTIONBAR_SHOWGRID");
183 button:RegisterEvent("ACTIONBAR_HIDEGRID");
184 button:RegisterEvent("ACTIONBAR_PAGE_CHANGED");
185 button:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
186 button:RegisterEvent("ACTIONBAR_UPDATE_STATE");
187 button:RegisterEvent("ACTIONBAR_UPDATE_USABLE");
188 button:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
189 button:RegisterEvent("UPDATE_INVENTORY_ALERTS");
190 button:RegisterEvent("PLAYER_AURAS_CHANGED");
191 button:RegisterEvent("PLAYER_TARGET_CHANGED");
192 button:RegisterEvent("UNIT_AURASTATE");
193 button:RegisterEvent("UNIT_INVENTORY_CHANGED");
194 button:RegisterEvent("CRAFT_SHOW");
195 button:RegisterEvent("CRAFT_CLOSE");
196 button:RegisterEvent("TRADE_SKILL_SHOW");
197 button:RegisterEvent("TRADE_SKILL_CLOSE");
198 button:RegisterEvent("UNIT_HEALTH");
199 button:RegisterEvent("UNIT_MANA");
200 button:RegisterEvent("UNIT_RAGE");
201 button:RegisterEvent("UNIT_FOCUS");
202 button:RegisterEvent("UNIT_ENERGY");
203 button:RegisterEvent("PLAYER_ENTER_COMBAT");
204 button:RegisterEvent("PLAYER_LEAVE_COMBAT");
205 button:RegisterEvent("PLAYER_COMBO_POINTS");
206 button:RegisterEvent("UPDATE_BINDINGS");
207 button:RegisterEvent("START_AUTOREPEAT_SPELL");
208 button:RegisterEvent("STOP_AUTOREPEAT_SPELL");
209 button:RegisterEvent("PLAYER_ENTERING_WORLD");
210 FlexBarButton_UpdateHotkeys(button);
211 end
212  
213 function FlexBarButton_UpdateHotkeys(button)
214 -- This sets the hotkey text. Originally borrowed from Telo's SideBar,
215 -- optionally puts binding or id in depending on user selection.
216  
217 local name = button:GetName();
218 local hotkey = getglobal(name.."HotKey");
219 local text2 = getglobal(name.."Text2");
220 local text3 = getglobal(name.."Text3");
221 local s, e, id = string.find(name, "^FlexBarButton(%d+)$");
222 local action = "FLEXACTIONBUTTON"..id;
223 local text = GetBindingKey(action)
224  
225 if text then
226 text = string.upper(text)
227 text = string.gsub(text, "CTRL--", "C-");
228 text = string.gsub(text, "ALT--", "A-");
229 text = string.gsub(text, "SHIFT--", "S-");
230 text = string.gsub(text, "NUM PAD", "NP");
231 text = string.gsub(text, "BACKSPACE", "Bksp");
232 text = string.gsub(text, "SPACEBAR", "Space");
233 text = string.gsub(text, "PAGE", "Pg");
234 text = string.gsub(text, "DOWN", "Dn");
235 text = string.gsub(text, "ARROW", "");
236 text = string.gsub(text, "INSERT", "Ins");
237 text = string.gsub(text, "DELETE", "Del");
238 else
239 text = ""
240 end
241  
242 local buttonnum=FB_GetButtonNum(button)
243 if FBState[buttonnum]["hotkeytext"] == nil then FBState[buttonnum]["hotkeytext"] = "" end
244 -- going to add %s for slots free for bags here later
245 if FBState[buttonnum]["hotkeytext"] == "%b" then
246 hotkey:SetText(text);
247 elseif FBState[buttonnum]["hotkeytext"] == "%c" then
248 hotkey:SetText("**")
249 elseif FBState[buttonnum]["hotkeytext"] == "%d" then
250 hotkey:SetText(buttonnum)
251 else
252 FB_TextSub(buttonnum)
253 end
254  
255 if FBState[buttonnum]["text2"] == nil then FBState[buttonnum]["text2"] = "" end
256 -- going to add %s for slots free for bags here later
257 if FBState[buttonnum]["text2"] == "%b" then
258 text2:SetText(text);
259 elseif FBState[buttonnum]["text2"] == "%c" then
260 text2:SetText("**")
261 elseif FBState[buttonnum]["text2"] == "%d" then
262 text2:SetText(buttonnum)
263 else
264 FB_TextSub(buttonnum)
265 end
266  
267 if FBState[buttonnum]["text3"] == nil then FBState[buttonnum]["text3"] = "" end
268 -- going to add %s for slots free for bags here later
269 if FBState[buttonnum]["text3"] == "%b" then
270 text3:SetText(text);
271 elseif FBState[buttonnum]["text3"] == "%c" then
272 text3:SetText("**")
273 elseif FBState[buttonnum]["text3"] == "%d" then
274 text3:SetText(buttonnum)
275 else
276 FB_TextSub(buttonnum)
277 end
278 end
279  
280 function FlexBarButton_Update(button)
281 local buttonnum=FB_GetButtonNum(button)
282 local buttonID = FlexBarButton_GetID(button);
283  
284 -- Determine whether or not the button should be flashing or not since the button may have missed the enter combat event
285 if ( IsAttackAction(buttonID) and IsCurrentAction(buttonID) ) then
286 IN_ATTACK_MODE = 1;
287 else
288 IN_ATTACK_MODE = nil;
289 end
290 IN_AUTOREPEAT_MODE = IsAutoRepeatAction(buttonID);
291  
292 local icon = getglobal(button:GetName().."Icon");
293 local buttonCooldown = getglobal(button:GetName().."Cooldown");
294 local texture = GetActionTexture(FlexBarButton_GetID(button));
295 if ( texture ) then
296 icon:SetTexture(texture);
297 icon:Show();
298 button.rangeTimer = TOOLTIP_UPDATE_TIME;
299 button:SetNormalTexture("Interface\\Buttons\\UI-Quickslot2");
300 else
301 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
302 FBSavedProfile[FBProfileName].FlexActions[buttonID]["texture"] then
303 local fbtext = string.lower(FBSavedProfile[FBProfileName].FlexActions[buttonID]["texture"])
304 if fbtext == "%player" or fbtext == "%party1" or
305 fbtext == "%party2" or fbtext == "%party3" or
306 fbtext == "%party4" or fbtext == "%target" or fbtext == "%pet" then
307  
308 SetPortraitTexture(icon,string.sub(fbtext,2))
309 icon:SetVertexColor(1,1,1)
310 icon:SetAlpha(1)
311 else
312 icon:SetTexture(FBSavedProfile[FBProfileName].FlexActions[buttonID]["texture"])
313 end
314 button:SetNormalTexture("Interface\\Buttons\\UI-Quickslot2");
315 icon:Show()
316 else
317 icon:Hide();
318 buttonCooldown:Hide();
319 button.rangeTimer = nil;
320 if not (FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
321 FBSavedProfile[FBProfileName].FlexActions[buttonID]["texture"]) then
322 button:SetNormalTexture("Interface\\Buttons\\UI-Quickslot");
323 end
324 if not FBState[FB_GetButtonNum(button)]["hotkeycolor"] then getglobal(button:GetName().."HotKey"):SetVertexColor(0.6, 0.6, 0.6); end
325 end
326 end
327 FlexBarButton_UpdateCount(button);
328 if ( HasAction(FlexBarButton_GetID(button)) ) or
329 ( FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] ) then
330 button:Show();
331 -- somewhere right before here, this gets reset to whatever
332 -- has focus -- so put it back. I don't know if this causes problems
333 -- but it is certainly the first place to look. This only happens with
334 -- remapping an empty button with showgrid=0 to a non-empty button.
335 FlexBarButton_UpdateUsable(button);
336 FlexBarButton_UpdateCooldown(button);
337 elseif ( button.showgrid == 0 ) then
338 button:Hide();
339 else
340 getglobal(button:GetName().."Cooldown"):Hide();
341 end
342  
343 if ( IN_ATTACK_MODE or IN_AUTOREPEAT_MODE ) then
344 FlexBarButton_StartFlash(button);
345 else
346 FlexBarButton_StopFlash(button);
347 end
348  
349 if ( GameTooltip:IsOwned(button) ) then
350 FlexBarButton_SetTooltip(button);
351 else
352 button.updateTooltip = nil;
353 end
354  
355 -- Update Macro Text
356 local macroName = getglobal(button:GetName().."Name");
357 macroName:SetText(GetActionText(FlexBarButton_GetID(button)))
358 end
359  
360 function FlexBarButton_ShowGrid(button)
361 -- Blizzard code; Show button even if it doesn't have an action associated with it.
362 button.showgrid = button.showgrid+1;
363 getglobal(button:GetName().."NormalTexture"):SetVertexColor(1.0, 1.0, 1.0);
364 button:Show();
365 local _,frame = FB_GetWidgets(FB_GetButtonNum(button))
366 frame:EnableDrawLayer()
367 end
368  
369 function FlexBarButton_HideGrid(button)
370 -- Blizzard code: Hide button if it doesn't have an action associated with it
371 button.showgrid = button.showgrid-1;
372 if ( button.showgrid == 0 ) and not (HasAction(FlexBarButton_GetID(button))) then
373 button:Hide();
374 local _,frame = FB_GetWidgets(FB_GetButtonNum(button))
375 frame:DisableDrawLayer()
376 end
377 end
378  
379 function FlexBarButton_UpdateState(button)
380 -- Blizzard code:
381 if ( IsCurrentAction(FlexBarButton_GetID(button)) or
382 IsAutoRepeatAction(FlexBarButton_GetID(button)) or
383 FBState[FB_GetButtonNum(button)]["checked"] ) then
384 button:SetChecked(1);
385 else
386 button:SetChecked(0);
387 end
388 end
389  
390 function FlexBarButton_UpdateUsable(button)
391 local buttonnum=FB_GetButtonNum(button)
392  
393 -- If the button is currently hidden - we do not need to do anything for this button at this time
394 if FBState[buttonnum]["hidden"] then return end;
395  
396 -- Blizzard code:
397 local icon = getglobal(button:GetName().."Icon");
398 local normalTexture = getglobal(button:GetName().."NormalTexture");
399 -- Mana check available here - also has potential
400 local isUsable, notEnoughMana = IsUsableAction(FlexBarButton_GetID(button));
401 -- Hotkey is the text displayed in the upper right corner.
402 local count = getglobal(button:GetName().."HotKey");
403 local text2 = getglobal(button:GetName().."Text2");
404 local text3 = getglobal(button:GetName().."Text3");
405 local text = count:GetText();
406 -- Here's the test for action in range - for further enhancements that let the player know button better
407 local inRange = IsActionInRange(FlexBarButton_GetID(button));
408 local buttonID = FlexBarButton_GetID(button)
409 if not FBState[buttonnum]["hotkeycolor"] then
410 if( inRange == 0 ) then
411 count:SetVertexColor(1.0, 0.1, 0.1);
412 else
413 count:SetVertexColor(0.6, 0.6, 0.6);
414 end
415 end
416 -- Default blizz code resets the vertex color every pass through, regardless of whether the state
417 -- changed. This may be a cause of FPS reduction when people have lots of buttons visible. Added checks
418 -- so coloring will only occur on an actual change of state.
419 if ( isUsable ) then
420 -- Telo added this code - If the button has hotkey text it colors like normal on in/out of range
421 -- w/o hotkey text it colors the entire button.
422 -- added toggle to force this behavior
423 if ( (not text or text == "" or FBToggles["forceshading"]) and inRange == 0 ) then
424 if FBState[buttonnum]["coloring"] ~= "usable_out_of_range" then
425 icon:SetVertexColor(1.0, 0.1, 0.1);
426 normalTexture:SetVertexColor(1.0, 0.1, 0.1);
427 FBState[buttonnum]["coloring"] = "usable_out_of_range"
428 end
429 else
430 if FBState[buttonnum]["coloring"] ~= "usable_in_range" then
431 icon:SetVertexColor(1.0, 1.0, 1.0);
432 normalTexture:SetVertexColor(1.0, 1.0, 1.0);
433 FBState[buttonnum]["coloring"] = "usable_in_range"
434 end
435 end
436 elseif ( notEnoughMana ) then
437 if FBState[buttonnum]["coloring"] ~= "not_enough_mana" then
438 icon:SetVertexColor(0.5, 0.5, 1.0);
439 normalTexture:SetVertexColor(0.5, 0.5, 1.0);
440 FBState[buttonnum]["coloring"] = "not_enough_mana"
441 end
442 else
443 if FBState[buttonnum]["coloring"] ~= "not_usable" then
444 icon:SetVertexColor(0.4, 0.4, 0.4);
445 normalTexture:SetVertexColor(1.0, 1.0, 1.0);
446 FBState[buttonnum]["coloring"] = "not_usable"
447 end
448 end
449 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and FBSavedProfile[FBProfileName].FlexActions[buttonID]["texture"] then
450 icon:SetVertexColor(1.0, 1.0, 1.0);
451 normalTexture:SetVertexColor(1.0, 1.0, 1.0);
452 end
453  
454 if FBState[buttonnum]["icon"] then
455 local bcolors = FBState[buttonnum]["icon"]
456 icon:SetVertexColor(bcolors[1], bcolors[2], bcolors[3])
457 end
458  
459 -- Digital cooldown - set the hotkey text to '%c' to get a digital cooldown
460 if FBState[buttonnum]["hotkeytext"] then
461 if FBState[buttonnum]["hotkeytext"] == "%c" then
462 local start, duration, enable = GetActionCooldown(button:GetID());
463 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
464 FBSavedProfile[FBProfileName].FlexActions[buttonID]["action"] == "pet" then
465 start, duration, enable = GetPetActionCooldown(FBSavedProfile[FBProfileName].FlexActions[buttonID]["id"])
466 end
467 if start > 0 then
468 count:SetText(format("%d",duration-(GetTime()-start)))
469 count:SetVertexColor(1.0, 1.0, .5)
470 else
471 count:SetText("**")
472 count:SetVertexColor(.5, 1.0, .5)
473 end
474 end
475 end
476 -- Digital cooldown - set the hotkey text to '%c' to get a digital cooldown
477 if FBState[buttonnum]["text2"] then
478 if FBState[buttonnum]["text2"] == "%c" then
479 local start, duration, enable = GetActionCooldown(button:GetID());
480 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
481 FBSavedProfile[FBProfileName].FlexActions[buttonID]["action"] == "pet" then
482 start, duration, enable = GetPetActionCooldown(FBSavedProfile[FBProfileName].FlexActions[buttonID]["id"])
483 end
484 if start > 0 then
485 text2:SetText(format("%d",duration-(GetTime()-start)))
486 text2:SetVertexColor(1.0, 1.0, .5)
487 else
488 text2:SetText("**")
489 text2:SetVertexColor(.5, 1.0, .5)
490 end
491 end
492 end
493 -- Digital cooldown - set the hotkey text to '%c' to get a digital cooldown
494 if FBState[buttonnum]["text3"] then
495 if FBState[buttonnum]["text3"] == "%c" then
496 local start, duration, enable = GetActionCooldown(button:GetID());
497 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
498 FBSavedProfile[FBProfileName].FlexActions[buttonID]["action"] == "pet" then
499 start, duration, enable = GetPetActionCooldown(FBSavedProfile[FBProfileName].FlexActions[buttonID]["id"])
500 end
501 if start > 0 then
502 text3:SetText(format("%d",duration-(GetTime()-start)))
503 text3:SetVertexColor(1.0, 1.0, .5)
504 else
505 text3:SetText("**")
506 text3:SetVertexColor(.5, 1.0, .5)
507 end
508 end
509 end
510 end
511  
512 function FlexBarButton_UpdateCount(button)
513 -- Blizzard code - purpose unknown at this time
514 local text = getglobal(button:GetName().."Count");
515 local count = GetActionCount(FlexBarButton_GetID(button));
516 if ( count > 1 ) then
517 text:SetText(count);
518 else
519 text:SetText("");
520 end
521 end
522  
523 function FlexBarButton_UpdateCooldown(button)
524 local buttonnum=FB_GetButtonNum(button)
525 local buttonID = button:GetID()
526  
527 -- If the button is currently hidden - we do not need to do anything for this button
528 if FBState[buttonnum]["hidden"] then return end;
529  
530 -- Blizzard code - looks like it updates the little cooldown spinner.
531 local cooldown = getglobal(button:GetName().."Cooldown");
532 local hotkey = getglobal(button:GetName().."HotKey");
533 local start, duration, enable = GetActionCooldown(FlexBarButton_GetID(button));
534 if FBProfileLoaded and FBSavedProfile[FBProfileName].FlexActions[buttonID] and
535 FBSavedProfile[FBProfileName].FlexActions[buttonID]["action"] == "pet" then
536 start, duration, enable = GetPetActionCooldown(FBSavedProfile[FBProfileName].FlexActions[buttonID]["id"])
537 end
538 -- if digital cooldowns are enabled, disable spinner - it obscures the display.
539 if FBState[buttonnum]["hotkeytext"] ~= "%c" and FBState[buttonnum]["text2"] ~= "%c" and FBState[buttonnum]["text3"] ~= "%c" then
540 CooldownFrame_SetTimer(cooldown, start, duration, enable)
541 end
542 end
543  
544 function FlexBarButton_OnEvent(event, button)
545 -- Event code for individual buttons
546 if( event == "VARIABLES_LOADED" ) then
547 end
548  
549 if ( event == "ACTIONBAR_SLOT_CHANGED" ) then
550 if ( arg1 == -1 or arg1 == FlexBarButton_GetID(button) ) then
551 FlexBarButton_Update(button);
552 end
553 return;
554 end
555  
556 if ( event == "PLAYER_AURAS_CHANGED") then
557 FlexBarButton_Update(button);
558 FlexBarButton_UpdateState(button);
559 return;
560 end
561 if ( event == "ACTIONBAR_SHOWGRID" ) then
562 FlexBarButton_ShowGrid(button);
563 return;
564 end
565 if ( event == "ACTIONBAR_HIDEGRID" ) then
566 FlexBarButton_HideGrid(button);
567 return;
568 end
569 if ( event == "UPDATE_BINDINGS" ) then
570 FlexBarButton_UpdateHotkeys(button);
571 end
572  
573 -- All event handlers below this line MUST only be valid when the button is visible
574 if ( not button:IsVisible() ) then
575 return;
576 end
577  
578 if ( event == "PLAYER_TARGET_CHANGED" ) then
579 FlexBarButton_UpdateUsable(button);
580 return;
581 end
582 if ( event == "UNIT_AURASTATE" ) then
583 if ( arg1 == "player" or arg1 == "target" ) then
584 FlexBarButton_UpdateUsable(button);
585 end
586 return;
587 end
588 if ( event == "UNIT_INVENTORY_CHANGED" ) then
589 if ( arg1 == "player" ) then
590 FlexBarButton_Update(button);
591 end
592 return;
593 end
594 if ( event == "ACTIONBAR_UPDATE_STATE" ) then
595 FlexBarButton_UpdateState(button);
596 return;
597 end
598  
599 if ( event == "ACTIONBAR_UPDATE_COOLDOWN" ) then
600 local buttonnum = FB_GetButtonNum(button)
601 local start, duration, enable = GetActionCooldown(button:GetID())
602 if not FBState[buttonnum]["lastcooldown"] then
603 FlexBarButton_UpdateCooldown(button);
604 FlexBarButton_UpdateUsable(button);
605 FBState[buttonnum]["lastcooldown"] = {}
606 FBState[buttonnum]["lastcooldown"]["start"] = start
607 FBState[buttonnum]["lastcooldown"]["duration"] = duration
608 elseif FBState[buttonnum]["lastcooldown"]["start"] ~= start or
609 FBState[buttonnum]["lastcooldown"]["duration"] ~= duration then
610 FlexBarButton_UpdateCooldown(button);
611 FlexBarButton_UpdateUsable(button);
612 FBState[buttonnum]["lastcooldown"] = {}
613 FBState[buttonnum]["lastcooldown"]["start"] = start
614 FBState[buttonnum]["lastcooldown"]["duration"] = duration
615 end
616 return;
617 end
618  
619 if ( event == "ACTIONBAR_UPDATE_USABLE" ) then
620 FlexBarButton_UpdateUsable(button);
621 FlexBarButton_UpdateCooldown(button);
622 return
623 end
624  
625 if ( event == "UPDATE_INVENTORY_ALERTS" ) then
626 FlexBarButton_UpdateCooldown(button);
627 FlexBarButton_UpdateUsable(button);
628 return;
629 end
630  
631 if ( event == "CRAFT_SHOW" or event == "CRAFT_CLOSE" or event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_CLOSE" ) then
632 FlexBarButton_UpdateState(button);
633 return;
634 end
635 if ( arg1 == "player" and (event == "UNIT_HEALTH" or event == "UNIT_MANA" or event == "UNIT_RAGE" or event == "UNIT_FOCUS" or event == "UNIT_ENERGY") ) then
636 FlexBarButton_UpdateUsable(button);
637 return;
638 end
639 if ( event == "PLAYER_ENTER_COMBAT" ) then
640 IN_ATTACK_MODE = 1;
641 if ( IsAttackAction(FlexBarButton_GetID(button)) ) then
642 FlexBarButton_StartFlash(button);
643 end
644 return;
645 end
646 if ( event == "PLAYER_LEAVE_COMBAT" ) then
647 IN_ATTACK_MODE = 0;
648 if ( IsAttackAction(FlexBarButton_GetID(button)) ) then
649 FlexBarButton_StopFlash(button);
650 end
651 return;
652 end
653 if ( event == "PLAYER_COMBO_POINTS" ) then
654 FlexBarButton_UpdateUsable(button);
655 return;
656 end
657 if ( event == "START_AUTOREPEAT_SPELL" ) then
658 IN_AUTOREPEAT_MODE = 1;
659 if ( IsAutoRepeatAction(FlexBarButton_GetID(button)) ) then
660 FlexBarButton_StartFlash(button);
661 end
662 return;
663 end
664 if ( event == "STOP_AUTOREPEAT_SPELL" ) then
665 IN_AUTOREPEAT_MODE = nil;
666 if ( FlexBarButton_IsFlashing(button) and not IsAttackAction(FlexBarButton_GetID(button)) ) then
667 FlexBarButton_StopFlash(button);
668 end
669 return;
670 end
671 end
672  
673 function FlexBarButton_SetTooltip(button)
674 -- Blizzard code
675 -- appears to reset the manually set this from my routines.
676 GameTooltip_SetDefaultAnchor(GameTooltip, button)
677 -- GameTooltip:SetOwner(this);
678  
679 local FlexButtonID = FlexBarButton_GetID(button)
680 local FlexButtonNum = FB_GetButtonNum(button)
681 if ( GameTooltip:SetAction(FlexButtonID) ) then
682 button.updateTooltip = TOOLTIP_UPDATE_TIME;
683 elseif FBProfileLoaded and
684 FBSavedProfile[FBProfileName].FlexActions[button:GetID()] and
685 FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] ~= "autoitem" and
686 FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["name"] then
687  
688 GameTooltip:SetText(FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["name"])
689 else
690 button.updateTooltip = nil;
691 end
692 if ( FBButtonInfoTooltipShown ) then
693 local scale = 1.0
694 local ttcolor = FBToggles["tooltipinfocolor"]
695 local x = math.floor(FBState[FlexButtonNum].xcoord + .5)
696 local y = math.floor(FBState[FlexButtonNum].ycoord + .5)
697 if FBState[FlexButtonNum].scale ~= nil then
698 scale = FBState[FlexButtonNum].scale
699 end
700 GameTooltip:AddLine(" ")
701 GameTooltip:AddLine("Flexbar Button "..FlexButtonNum, ttcolor.r, ttcolor.g, ttcolor.b)
702 if (FBState[FlexButtonNum].remap ~= nil) then
703 GameTooltip:AddLine("Remaped ID: "..FBState[FlexButtonNum].remap, ttcolor.r, ttcolor.g, ttcolor.b)
704 end
705 if (FBState[FlexButtonNum].group ~= nil) then
706 GameTooltip:AddLine("Group: "..FBState[FlexButtonNum].group, ttcolor.r, ttcolor.g, ttcolor.b)
707 end
708 local PosInfo = "Position: <"..x..", "..y..">"
709 if scale ~= 1 then PosInfo = PosInfo.." Scale:"..scale end
710 GameTooltip:AddLine(PosInfo, ttcolor.r, ttcolor.g, ttcolor.b)
711 GameTooltip:Show()
712 button.updateTooltip = TOOLTIP_UPDATE_TIME;
713 end
714 end
715  
716  
717 function FlexBarButton_OnUpdate(elapsed, button)
718 -- Blizzard code
719 if ( FlexBarButton_IsFlashing(button) ) then
720 button.flashtime = button.flashtime - elapsed;
721 if ( button.flashtime <= 0 ) then
722 local overtime = -button.flashtime;
723 if ( overtime >= ATTACK_BUTTON_FLASH_TIME ) then
724 overtime = 0;
725 end
726 button.flashtime = ATTACK_BUTTON_FLASH_TIME - overtime;
727  
728 local flashTexture = getglobal(button:GetName().."Flash");
729 if ( flashTexture:IsVisible() ) then
730 flashTexture:Hide();
731 else
732 flashTexture:Show();
733 end
734 end
735 end
736 -- Handle range indicator
737 if ( button.rangeTimer ) then
738 if ( button.rangeTimer < 0 ) then
739 FlexBarButton_UpdateUsable(button);
740 button.rangeTimer = TOOLTIP_UPDATE_TIME;
741 else
742 button.rangeTimer = button.rangeTimer - elapsed;
743 end
744 end
745  
746 if ( not button.updateTooltip ) then
747 return;
748 end
749  
750 button.updateTooltip = button.updateTooltip - elapsed;
751 if ( button.updateTooltip > 0 ) then
752 return;
753 end
754  
755 if ( GameTooltip:IsOwned(button) ) then
756 FlexBarButton_SetTooltip(button);
757 else
758 button.updateTooltip = nil;
759 end
760 end
761  
762 function FlexBarButton_GetID(button)
763 return (button:GetID())
764 end
765  
766 function FlexBarButton_StartFlash(button)
767 -- Blizzard code
768 button.flashing = 1;
769 button.flashtime = 0;
770 FlexBarButton_UpdateState(button);
771 end
772  
773 function FlexBarButton_StopFlash(button)
774 -- Blizzard code
775 button.flashing = 0;
776 getglobal(button:GetName().."Flash"):Hide();
777 FlexBarButton_UpdateState(button);
778 end
779  
780 function FlexBarButton_IsFlashing(button)
781 -- Blizzard code
782 if ( button.flashing == 1 ) then
783 return 1;
784 else
785 return nil;
786 end
787 end
788  
789 function FlexBarButton_OnClick(button, frombinding, mousebutton)
790 if ( IsShiftKeyDown() ) and ( not frombinding ) then
791 if not FBSavedProfile[FBProfileName].FlexActions[button:GetID()] then
792 PickupAction(FlexBarButton_GetID(button));
793 else
794 local u = Utility_Class:New()
795 if FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "autoitem" then
796 u:Echo("Error: Cannot drag an Auto Item off - disable auto item to remove")
797 elseif FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "pet" then
798 PickupPetAction(FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["id"])
799 end
800 end
801 else
802 if not FBState[FB_GetButtonNum(button)]["disabled"] then
803 if (FBState[FB_GetButtonNum(button)]["advanced"] and mousebutton == "LeftButton") or
804 not FBState[FB_GetButtonNum(button)]["advanced"] then
805 local id = FlexBarButton_GetID(button);
806 if not FBSavedProfile[FBProfileName].FlexActions[button:GetID()] or
807 FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "autoitem" then
808 if (MacroFrame_SaveMacro) then
809 MacroFrame_SaveMacro();
810 end
811 UseAction(id, 1);
812 else
813 if FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "macro" then
814 local name = FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["name"]
815 local macro = FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["macro"]
816 if type(macro) == "table" then
817 local index,command, longmacro
818 longmacro = "\n"
819 for index,command in ipairs(macro) do
820 longmacro=longmacro..command.."\n"
821 end
822 FB_Execute_MultilineMacro(longmacro,"InLineMacro"..GetTime())
823 elseif FBScripts[macro] then
824 FB_Execute_MultilineMacro(FBScripts[macro],name)
825 else
826 FB_Execute_Command(macro)
827 end
828 elseif FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "script" then
829 if FBScripts[FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["script"]] then
830 RunScript(FBScripts[FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["script"]])
831 else
832 RunScript(FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["script"])
833 end
834 elseif FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["action"] == "pet" then
835 local id = FBSavedProfile[FBProfileName].FlexActions[button:GetID()]["id"]
836 if arg1 == "RightButton" then
837 TogglePetAutocast(id)
838 else
839 CastPetAction(id)
840 end
841 end
842 end
843 end
844 end
845 if FBEventToggles["buttonevents"] ~= "off" then
846 local lastbutton = FBLastButtonDown
847 if frombinding then lastbutton="LeftButton" end
848 FB_RaiseEvent(lastbutton.."Click", FB_GetButtonNum(button))
849 if FBState[FB_GetButtonNum(button)]["echo"] then
850 FB_RaiseEvent(lastbutton.."Click",FBState[FB_GetButtonNum(button)]["echo"])
851 end
852 end
853 end
854 FlexBarButton_UpdateState(button);
855 end
856  
857 function FlexBar_LoadDefaults()
858 util:Echo("Flex Bar - first use")
859 end
860  
861 ------------------------- Bindings ---------------------------------------
862 BINDING_HEADER_FLEXBAR_SCRIPTS = "FlexBar GUI Panels";
863 BINDING_NAME_FLEXBAR_MAINMENU = "Open Flex Main Menu";
864 BINDING_NAME_FLEXBAR_AUTOITEM = "Open Auto Items";
865 BINDING_NAME_FLEXBAR_SCRIPTS = "Open Script Editor";
866 BINDING_NAME_FLEXBAR_PERFORMANCE = "Open Performance Panel";
867 BINDING_NAME_FLEXBAR_OPTIONS = "Open Options Panel";
868 BINDING_NAME_FLEXBAR_EVENTED = "Open Event Editor";
869 BINDING_NAME_FLEXBAR_BUTNINFO = "Button Information Toggle";
870 BINDING_NAME_FLEXBAR_BUTNTOOLTIP = "Button Info Tooltip Toggle";
871 BINDING_HEADER_FLEXBAR = "FlexBar Buttons";
872 BINDING_NAME_FLEXACTIONBUTTON1 = "FlexBar Button 1";
873 BINDING_NAME_FLEXACTIONBUTTON2 = "FlexBar Button 2";
874 BINDING_NAME_FLEXACTIONBUTTON3 = "FlexBar Button 3";
875 BINDING_NAME_FLEXACTIONBUTTON4 = "FlexBar Button 4";
876 BINDING_NAME_FLEXACTIONBUTTON5 = "FlexBar Button 5";
877 BINDING_NAME_FLEXACTIONBUTTON6 = "FlexBar Button 6";
878 BINDING_NAME_FLEXACTIONBUTTON7 = "FlexBar Button 7";
879 BINDING_NAME_FLEXACTIONBUTTON8 = "FlexBar Button 8";
880 BINDING_NAME_FLEXACTIONBUTTON9 = "FlexBar Button 9";
881 BINDING_NAME_FLEXACTIONBUTTON10 = "FlexBar Button 10";
882 BINDING_NAME_FLEXACTIONBUTTON11 = "FlexBar Button 11";
883 BINDING_NAME_FLEXACTIONBUTTON12 = "FlexBar Button 12";
884 BINDING_NAME_FLEXACTIONBUTTON13 = "FlexBar Button 13";
885 BINDING_NAME_FLEXACTIONBUTTON14 = "FlexBar Button 14";
886 BINDING_NAME_FLEXACTIONBUTTON15 = "FlexBar Button 15";
887 BINDING_NAME_FLEXACTIONBUTTON16 = "FlexBar Button 16";
888 BINDING_NAME_FLEXACTIONBUTTON17 = "FlexBar Button 17";
889 BINDING_NAME_FLEXACTIONBUTTON18 = "FlexBar Button 18";
890 BINDING_NAME_FLEXACTIONBUTTON19 = "FlexBar Button 19";
891 BINDING_NAME_FLEXACTIONBUTTON20 = "FlexBar Button 20";
892 BINDING_NAME_FLEXACTIONBUTTON21 = "FlexBar Button 21";
893 BINDING_NAME_FLEXACTIONBUTTON22 = "FlexBar Button 22";
894 BINDING_NAME_FLEXACTIONBUTTON23 = "FlexBar Button 23";
895 BINDING_NAME_FLEXACTIONBUTTON24 = "FlexBar Button 24";
896 BINDING_NAME_FLEXACTIONBUTTON25 = "FlexBar Button 25";
897 BINDING_NAME_FLEXACTIONBUTTON26 = "FlexBar Button 26";
898 BINDING_NAME_FLEXACTIONBUTTON27 = "FlexBar Button 27";
899 BINDING_NAME_FLEXACTIONBUTTON28 = "FlexBar Button 28";
900 BINDING_NAME_FLEXACTIONBUTTON29 = "FlexBar Button 29";
901 BINDING_NAME_FLEXACTIONBUTTON30 = "FlexBar Button 30";
902 BINDING_NAME_FLEXACTIONBUTTON31 = "FlexBar Button 31";
903 BINDING_NAME_FLEXACTIONBUTTON32 = "FlexBar Button 32";
904 BINDING_NAME_FLEXACTIONBUTTON33 = "FlexBar Button 33";
905 BINDING_NAME_FLEXACTIONBUTTON34 = "FlexBar Button 34";
906 BINDING_NAME_FLEXACTIONBUTTON35 = "FlexBar Button 35";
907 BINDING_NAME_FLEXACTIONBUTTON36 = "FlexBar Button 36";
908 BINDING_NAME_FLEXACTIONBUTTON37 = "FlexBar Button 37";
909 BINDING_NAME_FLEXACTIONBUTTON38 = "FlexBar Button 38";
910 BINDING_NAME_FLEXACTIONBUTTON39 = "FlexBar Button 39";
911 BINDING_NAME_FLEXACTIONBUTTON40 = "FlexBar Button 40";
912 BINDING_NAME_FLEXACTIONBUTTON41 = "FlexBar Button 41";
913 BINDING_NAME_FLEXACTIONBUTTON42 = "FlexBar Button 42";
914 BINDING_NAME_FLEXACTIONBUTTON43 = "FlexBar Button 43";
915 BINDING_NAME_FLEXACTIONBUTTON44 = "FlexBar Button 44";
916 BINDING_NAME_FLEXACTIONBUTTON45 = "FlexBar Button 45";
917 BINDING_NAME_FLEXACTIONBUTTON46 = "FlexBar Button 46";
918 BINDING_NAME_FLEXACTIONBUTTON47 = "FlexBar Button 47";
919 BINDING_NAME_FLEXACTIONBUTTON48 = "FlexBar Button 48";
920 BINDING_NAME_FLEXACTIONBUTTON49 = "FlexBar Button 49";
921 BINDING_NAME_FLEXACTIONBUTTON50 = "FlexBar Button 50";
922 BINDING_NAME_FLEXACTIONBUTTON51 = "FlexBar Button 51";
923 BINDING_NAME_FLEXACTIONBUTTON52 = "FlexBar Button 52";
924 BINDING_NAME_FLEXACTIONBUTTON53 = "FlexBar Button 53";
925 BINDING_NAME_FLEXACTIONBUTTON54 = "FlexBar Button 54";
926 BINDING_NAME_FLEXACTIONBUTTON55 = "FlexBar Button 55";
927 BINDING_NAME_FLEXACTIONBUTTON56 = "FlexBar Button 56";
928 BINDING_NAME_FLEXACTIONBUTTON57 = "FlexBar Button 57";
929 BINDING_NAME_FLEXACTIONBUTTON58 = "FlexBar Button 58";
930 BINDING_NAME_FLEXACTIONBUTTON59 = "FlexBar Button 59";
931 BINDING_NAME_FLEXACTIONBUTTON60 = "FlexBar Button 60";
932 BINDING_NAME_FLEXACTIONBUTTON61 = "FlexBar Button 61";
933 BINDING_NAME_FLEXACTIONBUTTON62 = "FlexBar Button 62";
934 BINDING_NAME_FLEXACTIONBUTTON63 = "FlexBar Button 63";
935 BINDING_NAME_FLEXACTIONBUTTON64 = "FlexBar Button 64";
936 BINDING_NAME_FLEXACTIONBUTTON65 = "FlexBar Button 65";
937 BINDING_NAME_FLEXACTIONBUTTON66 = "FlexBar Button 66";
938 BINDING_NAME_FLEXACTIONBUTTON67 = "FlexBar Button 67";
939 BINDING_NAME_FLEXACTIONBUTTON68 = "FlexBar Button 68";
940 BINDING_NAME_FLEXACTIONBUTTON69 = "FlexBar Button 69";
941 BINDING_NAME_FLEXACTIONBUTTON70 = "FlexBar Button 70";
942 BINDING_NAME_FLEXACTIONBUTTON71 = "FlexBar Button 71";
943 BINDING_NAME_FLEXACTIONBUTTON72 = "FlexBar Button 72";
944 BINDING_NAME_FLEXACTIONBUTTON73 = "FlexBar Button 73";
945 BINDING_NAME_FLEXACTIONBUTTON74 = "FlexBar Button 74";
946 BINDING_NAME_FLEXACTIONBUTTON75 = "FlexBar Button 75";
947 BINDING_NAME_FLEXACTIONBUTTON76 = "FlexBar Button 76";
948 BINDING_NAME_FLEXACTIONBUTTON77 = "FlexBar Button 77";
949 BINDING_NAME_FLEXACTIONBUTTON78 = "FlexBar Button 78";
950 BINDING_NAME_FLEXACTIONBUTTON79 = "FlexBar Button 79";
951 BINDING_NAME_FLEXACTIONBUTTON80 = "FlexBar Button 80";
952 BINDING_NAME_FLEXACTIONBUTTON81 = "FlexBar Button 81";
953 BINDING_NAME_FLEXACTIONBUTTON82 = "FlexBar Button 82";
954 BINDING_NAME_FLEXACTIONBUTTON83 = "FlexBar Button 83";
955 BINDING_NAME_FLEXACTIONBUTTON84 = "FlexBar Button 84";
956 BINDING_NAME_FLEXACTIONBUTTON85 = "FlexBar Button 85";
957 BINDING_NAME_FLEXACTIONBUTTON86 = "FlexBar Button 86";
958 BINDING_NAME_FLEXACTIONBUTTON87 = "FlexBar Button 87";
959 BINDING_NAME_FLEXACTIONBUTTON88 = "FlexBar Button 88";
960 BINDING_NAME_FLEXACTIONBUTTON89 = "FlexBar Button 89";
961 BINDING_NAME_FLEXACTIONBUTTON90 = "FlexBar Button 90";
962 BINDING_NAME_FLEXACTIONBUTTON91 = "FlexBar Button 91";
963 BINDING_NAME_FLEXACTIONBUTTON92 = "FlexBar Button 92";
964 BINDING_NAME_FLEXACTIONBUTTON93 = "FlexBar Button 93";
965 BINDING_NAME_FLEXACTIONBUTTON94 = "FlexBar Button 94";
966 BINDING_NAME_FLEXACTIONBUTTON95 = "FlexBar Button 95";
967 BINDING_NAME_FLEXACTIONBUTTON96 = "FlexBar Button 96";
968 BINDING_HEADER_FLEXBAR_EVENTS = "FlexBar Events";
969 BINDING_NAME_FLEXACTIONBUTTON97 = "FlexBar Button 97";
970 BINDING_NAME_FLEXACTIONBUTTON98 = "FlexBar Button 98";
971 BINDING_NAME_FLEXACTIONBUTTON99 = "FlexBar Button 99";
972 BINDING_NAME_FLEXACTIONBUTTON100 = "FlexBar Button 100";
973 BINDING_NAME_FLEXACTIONBUTTON101 = "FlexBar Button 101";
974 BINDING_NAME_FLEXACTIONBUTTON102 = "FlexBar Button 102";
975 BINDING_NAME_FLEXACTIONBUTTON103 = "FlexBar Button 103";
976 BINDING_NAME_FLEXACTIONBUTTON104 = "FlexBar Button 104";
977 BINDING_NAME_FLEXACTIONBUTTON105 = "FlexBar Button 105";
978 BINDING_NAME_FLEXACTIONBUTTON106 = "FlexBar Button 106";
979 BINDING_NAME_FLEXACTIONBUTTON107 = "FlexBar Button 107";
980 BINDING_NAME_FLEXACTIONBUTTON108 = "FlexBar Button 108";
981 BINDING_NAME_FLEXACTIONBUTTON109 = "FlexBar Button 109";
982 BINDING_NAME_FLEXACTIONBUTTON110 = "FlexBar Button 110";
983 BINDING_NAME_FLEXACTIONBUTTON111 = "FlexBar Button 111";
984 BINDING_NAME_FLEXACTIONBUTTON112 = "FlexBar Button 112";
985 BINDING_NAME_FLEXACTIONBUTTON113 = "FlexBar Button 113";
986 BINDING_NAME_FLEXACTIONBUTTON114 = "FlexBar Button 114";
987 BINDING_NAME_FLEXACTIONBUTTON115 = "FlexBar Button 115";
988 BINDING_NAME_FLEXACTIONBUTTON116 = "FlexBar Button 116";
989 BINDING_NAME_FLEXACTIONBUTTON117 = "FlexBar Button 117";
990 BINDING_NAME_FLEXACTIONBUTTON118 = "FlexBar Button 118";
991 BINDING_NAME_FLEXACTIONBUTTON119 = "FlexBar Button 119";
992 BINDING_NAME_FLEXACTIONBUTTON120 = "FlexBar Button 120";
993 BINDING_NAME_FLEXBAREVENT1 = "FlexBar Event 1";
994 BINDING_NAME_FLEXBAREVENT2 = "FlexBar Event 2";
995 BINDING_NAME_FLEXBAREVENT3 = "FlexBar Event 3";
996 BINDING_NAME_FLEXBAREVENT4 = "FlexBar Event 4";
997 BINDING_NAME_FLEXBAREVENT5 = "FlexBar Event 5";
998 BINDING_NAME_FLEXBAREVENT6 = "FlexBar Event 6";
999 BINDING_NAME_FLEXBAREVENT7 = "FlexBar Event 7";
1000 BINDING_NAME_FLEXBAREVENT8 = "FlexBar Event 8";
1001 BINDING_NAME_FLEXBAREVENT9 = "FlexBar Event 9";
1002 BINDING_NAME_FLEXBAREVENT10 = "FlexBar Event 10";
1003 BINDING_NAME_FLEXBAREVENT11 = "FlexBar Event 11";
1004 BINDING_NAME_FLEXBAREVENT12 = "FlexBar Event 12";
1005 BINDING_NAME_FLEXBAREVENT13 = "FlexBar Event 13";
1006 BINDING_NAME_FLEXBAREVENT14 = "FlexBar Event 14";
1007 BINDING_NAME_FLEXBAREVENT15 = "FlexBar Event 15";
1008 BINDING_NAME_FLEXBAREVENT16 = "FlexBar Event 16";
1009 BINDING_NAME_FLEXBAREVENT17 = "FlexBar Event 17";
1010 BINDING_NAME_FLEXBAREVENT18 = "FlexBar Event 18";
1011 BINDING_NAME_FLEXBAREVENT19 = "FlexBar Event 19";
1012 BINDING_NAME_FLEXBAREVENT20 = "FlexBar Event 20";
1013 BINDING_NAME_FLEXBAREVENT21 = "FlexBar Event 21";
1014 BINDING_NAME_FLEXBAREVENT22 = "FlexBar Event 22";
1015 BINDING_NAME_FLEXBAREVENT23 = "FlexBar Event 23";
1016 BINDING_NAME_FLEXBAREVENT24 = "FlexBar Event 24";
1017 BINDING_NAME_FLEXBAREVENT25 = "FlexBar Event 25";
1018 BINDING_NAME_FLEXBAREVENT26 = "FlexBar Event 26";
1019 BINDING_NAME_FLEXBAREVENT27 = "FlexBar Event 27";
1020 BINDING_NAME_FLEXBAREVENT28 = "FlexBar Event 28";
1021 BINDING_NAME_FLEXBAREVENT29 = "FlexBar Event 29";
1022 BINDING_NAME_FLEXBAREVENT30 = "FlexBar Event 30";