View Single Post
03-08-12, 05:40 AM   #28
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Came up with somthing about the OnClick.

But it does't work for the other buttons the: AftermathhUIFrameSub2:ButtonClicked() Cause i have no idea what it should be named.

And also if you press on the button twice it spawns more check buttons.

LUA Code:
  1. AftermathhUIFrameSub1:SetScript("OnClick", function()
  2.  
  3. Checkbox(AftermathhUIFrame, 1, 14, -95, "Show PvP Icon.", AftermathhUI.ouf.showpvpicon)
  4. Checkbox(AftermathhUIFrame, 2, 14, -115, "Show Buffs.", AftermathhUI.ouf.showbuffs, ShowBuffs_OnClick)
  5. Checkbox(AftermathhUIFrame, 3, 14, -135, "Show Debuffs.", AftermathhUI.ouf.showdebuffs)
  6. Checkbox(AftermathhUIFrame, 4, 14, -155, "Only Show Player Debuffs.", AftermathhUI.ouf.onlyshowplayerdebuffs)
  7. Checkbox(AftermathhUIFrame, 5, 14, -175, "Show Aggroo.", AftermathhUI.ouf.showaggroo)
  8. Checkbox(AftermathhUIFrame, 6, 14, -195, "Show Debuff Highlight", AftermathhUI.ouf.showdebuffhighlight)
  9. Checkbox(AftermathhUIFrame, 7, 14, -215, "Tooltip On Mouseover (Player etc).", AftermathhUI.ouf.tooltiponouf)
  10. Checkbox(AftermathhUIFrame, 8, 14, -235, "Show Role Icon.", AftermathhUI.ouf.showroleicon)
  11. Checkbox(AftermathhUIFrame, 9, 14, -255, "Show Boss Frames.", AftermathhUI.ouf.bossframes)
  12. Checkbox(AftermathhUIFrame, 10, 14, -275, "Show Party Frames.", AftermathhUI.ouf.showparty)
  13. Checkbox(AftermathhUIFrame, 11, 14, -295, "Tooltip On Mouseover (Raidframes).", AftermathhUI.ouf.tooltiponraid)
  14. Checkbox(AftermathhUIFrame, 12, 14, -315, "Highlight On Mouseover (Raidframes).", AftermathhUI.ouf.highlightontarget)
  15. Checkbox(AftermathhUIFrame, 13, 14, -335, "Make Raid Frames Vertical.", AftermathhUI.ouf.raidframesvertical)
  16. Checkbox(AftermathhUIFrame, 14, 14, -355, "Aura Watch (Raidframes).", AftermathhUI.ouf.aurawatch)
  17. Checkbox(AftermathhUIFrame, 15, 14, -375, "Raid Debuffs.", AftermathhUI.ouf.raiddebuffs)
  18. Checkbox(AftermathhUIFrame, 16, 14, -395, "Show Aggro On Raidframes.", AftermathhUI.ouf.showaggroonraidframes)
  19. Checkbox(AftermathhUIFrame, 17, 14, -415, "Experiance Bar.", AftermathhUI.ouf.expbar)
  20. Checkbox(AftermathhUIFrame, 18, 14, -435, "Reputation Bar.", AftermathhUI.ouf.repbar)
  21. Checkbox(AftermathhUIFrame, 19, 14, -455, "Moveable Frames.", AftermathhUI.ouf.moveableframes)
  22. Checkbox(AftermathhUIFrame, 20, 14, -475, "Totembar from oUF.", AftermathhUI.ouf.totembar)
  23. Checkbox(AftermathhUIFrame, 21, 14, -495, "Heal Prediction.", AftermathhUI.ouf.healprediction)
  24. Checkbox(AftermathhUIFrame, 22, 14, -515, "Combat Feedback.", AftermathhUI.ouf.combatfeedback)
  25.  
  26. --- Coulum 2
  27.  
  28. Checkbox(AftermathhUIFrame, 23, 350, -95, "Classcolor on Castbar.", AftermathhUI.ouf.castbarclasscolor)
  29. Checkbox(AftermathhUIFrame, 24, 350, -115, "Show Safe Zone.", AftermathhUI.ouf.showsafezone)
  30. Checkbox(AftermathhUIFrame, 25, 350, -135, "Show Latency.", AftermathhUI.ouf.showlatency)
  31. Checkbox(AftermathhUIFrame, 26, 350, -155, "Target Castbar Icon.", AftermathhUI.ouf.targetcastbaricon)
  32. Checkbox(AftermathhUIFrame, 27, 350, -175, "Focus Castbar Icon.", AftermathhUI.ouf.focuscastbaricon)
  33. Checkbox(AftermathhUIFrame, 28, 350, -195, "Show Interrupt Highlight.", AftermathhUI.ouf.showinterrupthighlight)
  34.  
  35.     for i = 1, 28 do
  36.         if not AftermathhUIFrameSub2:ButtonClicked() or AftermathhUIFrameSub3:ButtonClicked() then
  37.             _G["AfterCheckBoxButton"..i]:Show()
  38.         else
  39.             _G["AfterCheckBoxButton"..i]:Hide()
  40.         end
  41.     end
  42. end)
  Reply With Quote