X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/ccc7128fcb1d394b28a553dd7d8c44c896d37f12..HEAD:/OmaAB/ActionBars.lua?ds=sidebyside diff --git a/OmaAB/ActionBars.lua b/OmaAB/ActionBars.lua index 2551e25..04f51d6 100644 --- a/OmaAB/ActionBars.lua +++ b/OmaAB/ActionBars.lua @@ -67,7 +67,6 @@ local settings = { bar = 5, start = 49, length = 12, - columns = 3, x = 1000, y = 840, }, @@ -118,11 +117,18 @@ local usingBonusbars = { }; local chars = { + ["Sylvanas"] = { + ["Vildana"] = {1, 2, 3, 4,}, + }, ["Stormreaver"] = { ["Vildan"] = {1, 2, 3, 4,}, ["Gedren"] = {1, 2, 3, 4,}, ["Gazden"] = {1, 2, 3, 4,}, ["Gedran"] = {1, 2, 3, 4,}, + ["Iled"] = {1, 2, 3, 4,}, + ["Gilden"] = {1, 2, 3, 4,}, + ["Gran"] = {1, 2, 3, 4,}, + ["Gedrin"] = {1, 2, 3, 4,}, }, }; @@ -257,11 +263,11 @@ local function updateState(button, slot) end local function updateGlow(button, slot) - local stype, id, _ = GetActionInfo(slot); + local stype, id = GetActionInfo(slot); if stype == "spell" and IsSpellOverlayed(id) then button.glow:Show(); elseif stype == "macro" then - local _, _, macroid = GetMacroSpell(id); + local macroid = GetMacroSpell(id); if macroid and IsSpellOverlayed(macroid) then button.glow:Show(); else @@ -273,11 +279,11 @@ local function updateGlow(button, slot) end local function startGlow(button, slot, spell) - local stype, id, _ = GetActionInfo(slot); + local stype, id = GetActionInfo(slot); if stype == "spell" and id == spell then button.glow:Show(); elseif stype == "macro" then - local _, _, macroid = GetMacroSpell(id); + local macroid = GetMacroSpell(id); if macroid and macroid == spell then button.glow:Show(); end @@ -286,11 +292,11 @@ local function startGlow(button, slot, spell) end local function stopGlow(button, slot, spell) - local stype, id, _ = GetActionInfo(slot); + local stype, id = GetActionInfo(slot); if stype == "spell" and id == spell then button.glow:Hide(); elseif stype == "macro" then - local _, _, macroid = GetMacroSpell(id); + local macroid = GetMacroSpell(id); if macroid and macroid == spell then button.glow:Hide(); end @@ -308,7 +314,7 @@ local function updateButton(button, slot) updateState(button, slot); updateCount(button, slot); updateGlow(button, slot); - if not IsConsumableAction(slot) and not IsStackableAction(slot) then + if not button.notext and not IsConsumableAction(slot) and not IsStackableAction(slot) then button.text:SetText(ssub(GetActionText(slot) or "", 1, 4)); button.text:Show(); end @@ -516,6 +522,7 @@ local function createActionBar(parent, config) secure.text = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal"); secure.text:SetPoint("BOTTOMLEFT", secure, "BOTTOMLEFT", 2, -1); secure.text:Hide(); + secure.notext = config.notext; secure.cd = CreateFrame("Cooldown", "OmaBTCD"..slot, secure, "CooldownFrameTemplate"); secure.cd:SetAllPoints(); secure:SetAttribute("type", "action"); @@ -543,6 +550,15 @@ end local function initialize() local _, class = UnitClass("player"); local name, realm = UnitFullName("player"); + if class == "MAGE" then + settings.Oma1.x = 750; + settings.Oma1.y = 386; + settings.Oma1.columns = 12; + settings.Oma1.size = 34; + settings.Oma1.notext = true; + settings.Oma2.x = 580; + settings.Oma2.y = 300; + end ActionBars:SetFrameStrata("LOW"); ActionBars:SetPoint("BOTTOMLEFT"); ActionBars:SetWidth(1); @@ -662,7 +678,6 @@ local events = { end end, ["PLAYER_LOGIN"] = function() - GameTooltip = _G["GameTooltip"]; initialize(); end, ["ADDON_LOADED"] = function(addon) @@ -673,7 +688,7 @@ local events = { end, }; events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -- TODO might change once tooltips are in +events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"]; events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"]; events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"];