View Single Post
02-14-12, 04:10 PM   #5
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Playing with a thought here, but I'm not sure which word to use by the "elseif" (line 11), the hotkey hiding works, but the macro part doesn't.

LUA Code:
  1. local macrohide = 1
  2. local hotkeyhide = 1
  3.  
  4. local actionButtonHotkey = {}
  5. -- Just creating a blank table for just ActionButtonHotKeys
  6.  
  7. if (hotkeyhide == 1) then
  8.     for i=1,12 do
  9.     actionButtonHotkey[i] = _G[format("ActionButton%dHotKey",i)];
  10.     end
  11.         elseif (macrohide == 1) then
  12.         for i=1,12 do
  13.         actionButtonHotkey[i] = _G[format("ActionButton%dName",i)];
  14.     end
  15. end
  16.  
  17. -- Iterate over 1 through 12 and store all of these frames into the blank table we created earlier
  18.  
  19. for k,v in pairs(actionButtonHotkey) do
  20.    v:SetAlpha(0);
  21. end

Bonus question off-topic: Which program do you use for writing such code?
  Reply With Quote