diff --git a/HealBot_Options.lua b/HealBot_Options.lua index fa84b2c..0e28039 100644 --- a/HealBot_Options.lua +++ b/HealBot_Options.lua @@ -294,43 +294,43 @@ function HealBot_SetSkinColours() HealBot_Config.babortcolb[HealBot_Config.Current_Skin], HealBot_Config.babortcola[HealBot_Config.Current_Skin]); - local borderStyle = HealBot_Config.bborder[HealBot_Config.Current_Skin] or 2 - if borderStyle == 0 then - HealBot_Action:SetBackdropBorderColor(0,0,0,0); - elseif borderStyle == 1 then - HealBot_Action:SetBackdrop({ - bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", - edgeFile = "Interface\\Buttons\\WHITE8X8", - tile = true, tileSize = 8, edgeSize = 1, - insets = { left = 1, right = 1, top = 1, bottom = 1 } - }) - HealBot_Action:SetBackdropColor( - HealBot_Config.backcolr[HealBot_Config.Current_Skin], - HealBot_Config.backcolg[HealBot_Config.Current_Skin], - HealBot_Config.backcolb[HealBot_Config.Current_Skin], - HealBot_Config.backcola[HealBot_Config.Current_Skin]); - HealBot_Action:SetBackdropBorderColor( - HealBot_Config.borcolr[HealBot_Config.Current_Skin], - HealBot_Config.borcolg[HealBot_Config.Current_Skin], - HealBot_Config.borcolb[HealBot_Config.Current_Skin], - HealBot_Config.borcola[HealBot_Config.Current_Skin]); - else - HealBot_Action:SetBackdrop({ - bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", - edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", - tile = true, tileSize = 8, edgeSize = 16, - insets = { left = 4, right = 4, top = 4, bottom = 4 } - }) - HealBot_Action:SetBackdropColor( - HealBot_Config.backcolr[HealBot_Config.Current_Skin], - HealBot_Config.backcolg[HealBot_Config.Current_Skin], - HealBot_Config.backcolb[HealBot_Config.Current_Skin], - HealBot_Config.backcola[HealBot_Config.Current_Skin]); - HealBot_Action:SetBackdropBorderColor( - HealBot_Config.borcolr[HealBot_Config.Current_Skin], - HealBot_Config.borcolg[HealBot_Config.Current_Skin], - HealBot_Config.borcolb[HealBot_Config.Current_Skin], - HealBot_Config.borcola[HealBot_Config.Current_Skin]); + local borderStyle = HealBot_Config.bborder[HealBot_Config.Current_Skin] or 2 + if borderStyle == 0 then + HealBot_Action:SetBackdropBorderColor(0,0,0,0); + elseif borderStyle == 1 then + HealBot_Action:SetBackdrop({ + bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + edgeFile = "Interface\\Buttons\\WHITE8X8", + tile = true, tileSize = 8, edgeSize = 1, + insets = { left = 1, right = 1, top = 1, bottom = 1 } + }) + HealBot_Action:SetBackdropColor( + HealBot_Config.backcolr[HealBot_Config.Current_Skin], + HealBot_Config.backcolg[HealBot_Config.Current_Skin], + HealBot_Config.backcolb[HealBot_Config.Current_Skin], + HealBot_Config.backcola[HealBot_Config.Current_Skin]); + HealBot_Action:SetBackdropBorderColor( + HealBot_Config.borcolr[HealBot_Config.Current_Skin], + HealBot_Config.borcolg[HealBot_Config.Current_Skin], + HealBot_Config.borcolb[HealBot_Config.Current_Skin], + HealBot_Config.borcola[HealBot_Config.Current_Skin]); + else + HealBot_Action:SetBackdrop({ + bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", + tile = true, tileSize = 8, edgeSize = 16, + insets = { left = 4, right = 4, top = 4, bottom = 4 } + }) + HealBot_Action:SetBackdropColor( + HealBot_Config.backcolr[HealBot_Config.Current_Skin], + HealBot_Config.backcolg[HealBot_Config.Current_Skin], + HealBot_Config.backcolb[HealBot_Config.Current_Skin], + HealBot_Config.backcola[HealBot_Config.Current_Skin]); + HealBot_Action:SetBackdropBorderColor( + HealBot_Config.borcolr[HealBot_Config.Current_Skin], + HealBot_Config.borcolg[HealBot_Config.Current_Skin], + HealBot_Config.borcolb[HealBot_Config.Current_Skin], + HealBot_Config.borcola[HealBot_Config.Current_Skin]); end HealBot_EnTextColorpickt:SetTextHeight(btextheight); @@ -1344,6 +1344,7 @@ end function HealBot_Options_Click_OnTextChanged(this) local class=UnitClass("Player"); + if not HealBot_Config.KeyCombo[class] then HealBot_Config.KeyCombo[class] = {} end local combo = HealBot_Config.KeyCombo[class] local button = HealBot_Options_ComboClass_Button() combo[button] = this:GetText() @@ -1352,6 +1353,7 @@ end function HealBot_Options_Shift_OnTextChanged(this) local class=UnitClass("Player"); + if not HealBot_Config.KeyCombo[class] then HealBot_Config.KeyCombo[class] = {} end local combo = HealBot_Config.KeyCombo[class] local button = HealBot_Options_ComboClass_Button() combo["Shift"..button] = this:GetText() @@ -1360,6 +1362,7 @@ end function HealBot_Options_Ctrl_OnTextChanged(this) local class=UnitClass("Player"); + if not HealBot_Config.KeyCombo[class] then HealBot_Config.KeyCombo[class] = {} end local combo = HealBot_Config.KeyCombo[class] local button = HealBot_Options_ComboClass_Button() combo["Ctrl"..button] = this:GetText() @@ -1368,6 +1371,7 @@ end function HealBot_Options_ShiftCtrl_OnTextChanged(this) local class=UnitClass("Player"); + if not HealBot_Config.KeyCombo[class] then HealBot_Config.KeyCombo[class] = {} end local combo = HealBot_Config.KeyCombo[class] local button = HealBot_Options_ComboClass_Button() combo["ShiftCtrl"..button] = this:GetText()