это cActionBars + rActionBarStyler
я туда только классовые настройки дописывал, чтоб стенсбар имел длину нормальную (мне, например, не надо чтоб у роги стенсбар в длину был как у пала), в остальном все в дефолтном состоянии
пысы
кто не узнал - это слегка переделанный oUF_Fav)
rActionButtonStyler мб?
а у тебя какой скейл у баров? у мну просто на 1 все круто, начинаю уменьшать бордер плывет.
по идее надо через прозрачный фрейм делать, но что то все никак=\
Добавлено через 4 минуты
у меня после патча проблема:
на скрине не особо видно, но статусбар текстура теперь почему-то не выглядит цельной, а буд-то разделена на полоски 0о
self.Health:GetStatusBarTexture():SetHorizTile(fal se) спасло отца русской демократии)
Last edited by korn3r_renamed_606982_12032020; 27.03.2010 at 23:00.
Reason: Добавлено сообщение
bar1scale = 0.80
bar2scale = 0.80
bar3scale = 0.80
bar45scale = 0.80
petscale = 0.90
shapeshiftscale = 1
micromenuscale = 1
bagscale = 1
local frame_positions = {
[2] = { a = "BOTTOM", x = 48.1, y = 14 }, --fbar1
[3] = { a = "BOTTOM", x = -182, y = 49 }, --fbar2
[5] = { a = "BOTTOM", x = -182, y = 92 }, --fbar3
[6] = { a = "RIGHT", x = -1, y = 10 }, --fbar45
[7] = { a = "BOTTOMRIGHT", x = 5, y = -5 }, --bags
[8] = { a = "BOTTOMRIGHT", x = 10, y = -8 }, --micromenu
[9] = { a = "BOTTOM", x = 400, y = 55 }, --petbar
[10] = { a = "BOTTOM", x = 0, y = 70 }, --shapeshift
[11] = { a = "CENTER", x = -290, y = -50 }, --my own vehicle exit button
}
---------------------------------------------------
-- CONFIG END
---------------------------------------------------
-- Only edit stuff below if you _know_ what you are doing.
---------------------------------------------------
-- CREATE ALL THE HOLDER FRAMES
---------------------------------------------------
-- Frame to hold the ActionBar1 and the BonusActionBar
local fbar1 = CreateFrame("Frame","rABS_Bar1Holder",UIParent)
fbar1:SetWidth(518)
fbar1:SetHeight(58)
fbar1:SetPoint(frame_positions[2].a,frame_positions[2].x,frame_positions[2].y)
fbar1:Show()
-- Frame to hold the MultibarLeft
local fbar2 = CreateFrame("Frame","rABS_Bar2Holder",UIParent)
fbar2:SetWidth(58)
fbar2:SetHeight(58)
fbar2:SetFrameStrata("LOW")
fbar2:SetPoint(frame_positions[3].a,frame_positions[3].x,frame_positions[3].y)
fbar2:Show()
-- Frame to hold the MultibarRight
local fbar3 = CreateFrame("Frame","rABS_Bar3Holder",UIParent)
fbar3:SetWidth(58)
fbar3:SetHeight(58)
fbar3:SetPoint(frame_positions[5].a,frame_positions[5].x,frame_positions[5].y)
fbar3:Show()
-- Frame to hold the right bars
local fbar45 = CreateFrame("Frame","rABS_Bar45Holder",UIParent)
fbar45:SetWidth(100)
fbar45:SetHeight(518)
fbar45:SetPoint(frame_positions[6].a,frame_positions[6].x,frame_positions[6].y)
-- Frame to hold the bag buttons
local fbag = CreateFrame("Frame","rABS_BagHolder",UIParent)
fbag:SetWidth(220)
fbag:SetHeight(60)
fbag:SetPoint(frame_positions[7].a,frame_positions[7].x,frame_positions[7].y)
fbag:Show()
-- Frame to hold the micro menu
local fmicro = CreateFrame("Frame","rABS_MicroMenuHolder",UIParen t)
fmicro:SetWidth(263)
fmicro:SetHeight(30)
fmicro:SetPoint(frame_positions[8].a,frame_positions[8].x,frame_positions[8].y)
fmicro:Show()
-- Frame to hold the pet bars
local fpet = CreateFrame("Frame","rABS_PetBarHolder",UIParent)
fpet:SetWidth(400) -- size the width here
fpet:SetHeight(53) -- size the height here
fpet:SetPoint(frame_positions[9].a,frame_positions[9].x,frame_positions[9].y)
-- Frame to hold the shapeshift bars
local fshift = CreateFrame("Frame","rABS_ShapeShiftHolder",UIPare nt)
fshift:SetWidth(260) -- size the width here
fshift:SetHeight(50) -- size the height here
fshift:SetPoint(frame_positions[10].a,frame_positions[10].x,frame_positions[10].y)
---------------------------------------------------
-- CREATE MY OWN VEHICLE EXIT BUTTON
---------------------------------------------------
local fveb = CreateFrame("Frame","rABS_VEBHolder",UIParent)
fveb:SetWidth(40) -- size the width here
fveb:SetHeight(40) -- size the height here
fveb:SetPoint(frame_positions[11].a,frame_positions[11].x,frame_positions[11].y)
local veb = CreateFrame("BUTTON", "rABS_VehicleExitButton", fveb, "SecureActionButtonTemplate");
veb:SetWidth(30)
veb:SetHeight(30)
veb:SetPoint("CENTER",0,0)
veb:RegisterForClicks("AnyUp")
veb:SetNormalTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Up")
veb:SetPushedTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Down")
veb:SetHighlightTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Down")
veb:SetScript("OnClick", function(self) VehicleExit() end)
veb:RegisterEvent("UNIT_ENTERING_VEHICLE")
veb:RegisterEvent("UNIT_ENTERED_VEHICLE")
veb:RegisterEvent("UNIT_EXITING_VEHICLE")
veb:RegisterEvent("UNIT_EXITED_VEHICLE")
veb:SetScript("OnEvent", function(self,event,...)
local arg1 = ...;
if(((event=="UNIT_ENTERING_VEHICLE") or (event=="UNIT_ENTERED_VEHICLE")) and arg1 == "player") then
veb:SetAlpha(1)
elseif(((event=="UNIT_EXITING_VEHICLE") or (event=="UNIT_EXITED_VEHICLE")) and arg1 == "player") then
veb:SetAlpha(0)
end
end)
veb:SetAlpha(0)
---------------------------------------------------
-- MOVE STUFF INTO POSITION
---------------------------------------------------
local i,f
--bar1
for i=1, 12 do
_G["ActionButton"..i]:SetParent(fbar1);
end
ActionButton1:ClearAllPoints()
ActionButton1:SetPoint("BOTTOMLEFT",fbar1,"BOTTOML EFT",0,0);
for i=2, 12 do
local b = _G["ActionButton"..i]
local b2 = _G["ActionButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT",padding,0)
end
--bonus bar
BonusActionBarFrame:SetParent(fbar1)
BonusActionBarFrame:SetWidth(0.01)
BonusActionBarTexture0:Hide()
BonusActionBarTexture1:Hide()
BonusActionButton1:ClearAllPoints()
BonusActionButton1:SetPoint("BOTTOMLEFT", fbar1, "BOTTOMLEFT", 0, 0);
for i=2, 12 do
local b = _G["BonusActionButton"..i]
local b2 = _G["BonusActionButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT",padding,0)
end
--bar2
MultiBarBottomLeft:SetParent(fbar2)
MultiBarBottomLeftButton1:ClearAllPoints()
MultiBarBottomLeftButton1:SetPoint("BOTTOMLEFT", fbar2, "BOTTOMLEFT", 0, 0);
for i=2, 12 do
local b = _G["MultiBarBottomLeftButton"..i]
local b2 = _G["MultiBarBottomLeftButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT",padding,0)
end
--bar3
MultiBarBottomRight:SetParent(fbar3)
MultiBarBottomRightButton1:ClearAllPoints()
MultiBarBottomRightButton1:SetPoint("BOTTOMLEFT", fbar3, "BOTTOMLEFT", 0, 0);
for i=2, 12 do
local b = _G["MultiBarBottomRightButton"..i]
local b2 = _G["MultiBarBottomRightButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT",padding,0)
end
--bags
local BagButtons = {
MainMenuBarBackpackButton,
CharacterBag0Slot,
CharacterBag1Slot,
CharacterBag2Slot,
CharacterBag3Slot,
KeyRingButton,
}
local function rABS_MoveBagButtons()
for _, f in pairs(BagButtons) do
f:SetParent(fbag);
end
MainMenuBarBackpackButton:ClearAllPoints();
MainMenuBarBackpackButton:SetPoint("BOTTOMRIGHT", -15, 15);
end
rABS_MoveBagButtons();
--mircro menu
local MicroButtons = {
CharacterMicroButton,
SpellbookMicroButton,
TalentMicroButton,
AchievementMicroButton,
QuestLogMicroButton,
SocialsMicroButton,
PVPMicroButton,
LFGMicroButton,
MainMenuMicroButton,
HelpMicroButton,
}
local function rABS_MoveMicroButtons(skinName)
for _, f in pairs(MicroButtons) do
f:SetParent(fmicro);
end
CharacterMicroButton:ClearAllPoints();
CharacterMicroButton:SetPoint("BOTTOMLEFT", 5, 5);
SocialsMicroButton:ClearAllPoints();
SocialsMicroButton:SetPoint("LEFT", QuestLogMicroButton, "RIGHT", -3, 0);
end
hooksecurefunc("VehicleMenuBar_MoveMicroButtons", rABS_MoveMicroButtons);
rABS_MoveMicroButtons();
--shift
ShapeshiftBarFrame:SetParent(fshift)
ShapeshiftBarFrame:SetWidth(0.01)
ShapeshiftButton1:ClearAllPoints()
ShapeshiftButton1:SetPoint("BOTTOMLEFT",fshift,"BO TTOMLEFT",0,0)
local function rABS_MoveShapeshift()
ShapeshiftButton1:SetPoint("BOTTOMLEFT",fshift,"BO TTOMLEFT",0,0)
end
for i=2, 10 do
local b = _G["ShapeshiftButton"..i]
local b2 = _G["ShapeshiftButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT",stancepadding,0)
end
hooksecurefunc("ShapeshiftBar_Update", rABS_MoveShapeshift);
--possess bar
PossessBarFrame:SetParent(fshift)
PossessButton1:ClearAllPoints()
PossessButton1:SetPoint("BOTTOMLEFT", fshift, "BOTTOMLEFT", 0, 0);
--pet
PetActionBarFrame:SetParent(fpet)
PetActionBarFrame:SetWidth(0.01)
PetActionButton1:ClearAllPoints()
PetActionButton1:SetPoint("BOTTOMLEFT",fpet,"BOTTO MLEFT",0,0)
for i=2, 10 do
local b = _G["PetActionButton"..i]
local b2 = _G["PetActionButton"..i-1]
b:ClearAllPoints()
b:SetPoint("LEFT",b2,"RIGHT", petpadding ,0)
end
for i=2, 12 do
local b = _G["MultiBarLeftButton"..i]
local b2 = _G["MultiBarLeftButton"..i-1]
b:ClearAllPoints()
b:SetPoint("TOP",b2,"BOTTOM",0,1)
end
for i=2, 12 do
local b = _G["MultiBarRightButton"..i]
local b2 = _G["MultiBarRightButton"..i-1]
b:ClearAllPoints()
b:SetPoint("TOP",b2,"BOTTOM",0,1)
end
---------------------------------------------------
-- ACTIONBUTTONS MUST BE HIDDEN
---------------------------------------------------
-- hide actionbuttons when the bonusbar is visible (rogue stealth and such)
local function rABS_showhideactionbuttons(alpha)
local f = "ActionButton"
for i=1, 12 do
_G[f..i]:SetAlpha(alpha)
end
end
BonusActionBarFrame:HookScript("OnShow", function(self) rABS_showhideactionbuttons(0) end)
BonusActionBarFrame:HookScript("OnHide", function(self) rABS_showhideactionbuttons(1) end)
if BonusActionBarFrame:IsShown() then
rABS_showhideactionbuttons(0)
end
---------------------------------------------------
-- ON MOUSEOVER STUFF
---------------------------------------------------
--functions
local function rABS_showhidebar1(alpha)
if BonusActionBarFrame:IsShown() then
for i=1, 12 do
local pb = _G["BonusActionButton"..i]
pb:SetAlpha(alpha)
end
else
for i=1, 12 do
local pb = _G["ActionButton"..i]
pb:SetAlpha(alpha)
end
end
end
local function rABS_showhidebar2(alpha)
if MultiBarBottomLeft:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarBottomLeftButton"..i]
pb:SetAlpha(alpha)
end
end
end
local function rABS_showhidebar3(alpha)
if MultiBarBottomRight:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarBottomRightButton"..i]
pb:SetAlpha(alpha)
end
end
end
local function rABS_showhideshapeshift(alpha)
for i=1, NUM_SHAPESHIFT_SLOTS do
local pb = _G["ShapeshiftButton"..i]
pb:SetAlpha(alpha)
end;
end
local function rABS_showhidepet(alpha)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(alpha)
end;
end
local function rABS_showhiderightbar(alpha)
if MultiBarLeft:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(alpha)
end
end
if MultiBarRight:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(alpha)
end
end
end
local function rABS_showhidemicro(alpha)
for _, frame in pairs(MicroButtons) do
frame:SetAlpha(alpha)
end
end
local function rABS_showhidebags(alpha)
for _, frame in pairs(BagButtons) do
frame:SetAlpha(alpha)
end
end
--calls
if bar1_on_mouseover == 1 then
fbar1:EnableMouse(true)
fbar1:SetScript("OnEnter", function(self) rABS_showhidebar1(1) end)
fbar1:SetScript("OnLeave", function(self) rABS_showhidebar1(0) end)
for i=1, 12 do
local pb = _G["ActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar1(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar1(0) end)
local pb = _G["BonusActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar1(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar1(0) end)
end
end
if bar2_on_mouseover == 1 then
fbar2:EnableMouse(true)
fbar2:SetScript("OnEnter", function(self) rABS_showhidebar2(1) end)
fbar2:SetScript("OnLeave", function(self) rABS_showhidebar2(0) end)
for i=1, 12 do
local pb = _G["MultiBarBottomLeftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar2(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar2(0) end)
end
end
if bar3_on_mouseover == 1 then
fbar3:EnableMouse(true)
fbar3:SetScript("OnEnter", function(self) rABS_showhidebar3(1) end)
fbar3:SetScript("OnLeave", function(self) rABS_showhidebar3(0) end)
for i=1, 12 do
local pb = _G["MultiBarBottomRightButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar3(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar3(0) end)
end
end
if shapeshift_on_mouseover == 1 then
fshift:EnableMouse(true)
fshift:SetScript("OnEnter", function(self) rABS_showhideshapeshift(1) end)
fshift:SetScript("OnLeave", function(self) rABS_showhideshapeshift(0) end)
for i=1, NUM_SHAPESHIFT_SLOTS do
local pb = _G["ShapeshiftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhideshapeshift(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhideshapeshift(0) end)
end
end
if petbar_on_mouseover == 1 then
fpet:EnableMouse(true)
fpet:SetScript("OnEnter", function(self) rABS_showhidepet(1) end)
fpet:SetScript("OnLeave", function(self) rABS_showhidepet(0) end)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidepet(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidepet(0) end)
end
end
if rightbars_on_mouseover == 1 then
fbar45:EnableMouse(true)
fbar45:SetScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
fbar45:SetScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
end
end
if micromenu_on_mouseover == 1 then
fmicro:EnableMouse(true)
fmicro:SetScript("OnEnter", function(self) rABS_showhidemicro(1) end)
fmicro:SetScript("OnLeave", function(self) rABS_showhidemicro(0) end)
for _, f in pairs(MicroButtons) do
f:SetAlpha(0)
f:HookScript("OnEnter", function(self) rABS_showhidemicro(1) end)
f:HookScript("OnLeave", function(self) rABS_showhidemicro(0) end)
end
end
if bags_on_mouseover == 1 then
fbag:EnableMouse(true)
fbag:SetScript("OnEnter", function(self) rABS_showhidebags(1) end)
fbag:SetScript("OnLeave", function(self) rABS_showhidebags(0) end)
for _, f in pairs(BagButtons) do
f:SetAlpha(0)
f:HookScript("OnEnter", function(self) rABS_showhidebags(1) end)
f:HookScript("OnLeave", function(self) rABS_showhidebags(0) end)
end
end
---------------------------------------------------
-- MAKE THE DEFAULT BARS UNVISIBLE
---------------------------------------------------
local FramesToHide = {
MainMenuBar,
VehicleMenuBar,
}
local function rABS_HideDefaultFrames()
for _, f in pairs(FramesToHide) do
f:SetScale(0.001)
f:SetAlpha(0)
end
end
rABS_HideDefaultFrames();
-- func
local function rABS_MoveThisFrame(f,moveit,lock)
if moveit == 1 then
f:SetMovable(true)
f:SetUserPlaced(true)
if lock ~= 1 then
f:EnableMouse(true)
f:RegisterForDrag("LeftButton","RightButton")
f:SetScript("OnDragStart", function(self) if IsShiftKeyDown() and IsAltKeyDown() then self:StartMoving() end end)
f:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
end
else
f:IsUserPlaced(false)
end
end
if hide_bags == 1 then
fbag:SetScale(0.001)
fbag:SetAlpha(0)
end
if hide_micro == 1 then
fmicro:SetScale(0.001)
fmicro:SetAlpha(0)
end
if hide_shapeshift == 1 then
fshift:SetScale(0.001)
fshift:SetAlpha(0)
end
if hide_pet == 1 then
fpet:SetScale(0.001)
fpet:SetAlpha(0)
end
if myname == "Lunan\195\187eva" or myname == "R\195\166v" then
fbar3:SetScale(0.001)
fbar3:SetAlpha(0)
else
end
local _G = _G
local rb2_normal_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\gl oss"
local rb2_flash_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\fl ash"
local rb2_hover_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\ho ver"
local rb2_pushed_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\pu shed"
local rb2_checked_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\ch ecked"
local rb2_equipped_texture = "Interface\\AddOns\\rActionButtonStyler\\media\\gl oss_grey"
local button_font = "Fonts\\font.TTF"
local hide_hotkey = 1
local use_dominos = 0
local color = { r = 0, g = 0, b = 0, }
local color_equipped = { r = 0, g = 0, b = 0, }
local range_color = { r = 0.8, g = 0.1, b = 0.1, }
local mana_color = { r = 0.1, g = 0.3, b = 1, }
local usable_color = { r = 1, g = 1, b = 1, }
local unusable_color = { r = 0.4, g = 0.4, b = 0.4, }
local update_timer = 1
--initial style func
local function rActionButtonStyler_AB_style(self)
local action = self.action
local name = self:GetName()
local bu = _G[name]
local ic = _G[name.."Icon"]
local co = _G[name.."Count"]
local bo = _G[name.."Border"]
local ho = _G[name.."HotKey"]
local cd = _G[name.."Cooldown"]
local na = _G[name.."Name"]
local fl = _G[name.."Flash"]
local nt = _G[name.."NormalTexture"]
ic:SetTexCoord(0.1,0.9,0.1,0.9)
ic:SetPoint("TOPLEFT", bu, "TOPLEFT", 2, -2)
ic:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", -2, 2)
if ( IsEquippedAction(action) ) then
bu:SetNormalTexture(rb2_equipped_texture)
nt:SetVertexColor(color_equipped.r,color_equipped. g,color_equipped.b,1)
else
bu:SetNormalTexture(rb2_normal_texture)
nt:SetVertexColor(color.r,color.g,color.b,1)
end
end
--style pet buttons
local function rActionButtonStyler_AB_stylepet()
for i=1, NUM_PET_ACTION_SLOTS do
local name = "PetActionButton"..i
local bu = _G[name]
local ic = _G[name.."Icon"]
local fl = _G[name.."Flash"]
local nt = _G[name.."NormalTexture2"]
ic:SetTexCoord(0.1,0.9,0.1,0.9)
ic:SetPoint("TOPLEFT", bu, "TOPLEFT", 3, -3)
ic:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", -3, 3)
end
end
--style shapeshift buttons
local function rActionButtonStyler_AB_styleshapeshift()
for i=1, NUM_SHAPESHIFT_SLOTS do
local name = "ShapeshiftButton"..i
local bu = _G[name]
local ic = _G[name.."Icon"]
local fl = _G[name.."Flash"]
local nt = _G[name.."NormalTexture"]
nt:ClearAllPoints()
nt:SetPoint("TOPLEFT", bu, "TOPLEFT", 0, 0)
nt:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", 0, 0)
ic:SetTexCoord(0.1,0.9,0.1,0.9)
ic:SetPoint("TOPLEFT", bu, "TOPLEFT", 2, -2)
ic:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", -2, 2)
end
end
--fix the grid display
--the default function has a bug and once you move a button the alpha stays at 0.5, this gets fixed here
local function rActionButtonStyler_AB_fixgrid(button)
local name = button:GetName()
local action = button.action
local nt = _G[name.."NormalTexture"]
if ( IsEquippedAction(action) ) then
nt:SetVertexColor(color_equipped.r,color_equipped. g,color_equipped.b,1)
else
nt:SetVertexColor(color.r,color.g,color.b,1)
end
end
--update the button colors onUpdateUsable
local function rActionButtonStyler_AB_usable(self)
local name = self:GetName()
local action = self.action
local nt = _G[name.."NormalTexture"]
local icon = _G[name.."Icon"]
if ( IsEquippedAction(action) ) then
nt:SetVertexColor(color_equipped.r,color_equipped. g,color_equipped.b,1)
else
nt:SetVertexColor(color.r,color.g,color.b,1)
end
local isUsable, notEnoughMana = IsUsableAction(action)
if (ActionHasRange(action) and IsActionInRange(action) == 0) then
icon:SetVertexColor(range_color.r,range_color.g,ra nge_color.b,1)
return
elseif (notEnoughMana) then
icon:SetVertexColor(mana_color.r,mana_color.g,mana _color.b,1)
return
elseif (isUsable) then
icon:SetVertexColor(usable_color.r,usable_color.g, usable_color.b,1)
return
else
icon:SetVertexColor(unusable_color.r,unusable_colo r.g,unusable_color.b,1);
return
end
end
--rewrite of the onupdate func
--much less cpu usage needed
local function rActionButtonStyler_AB_onupdate(self,elapsed)
local t = self.rABS_range
if (not t) then
self.rABS_range = 0
return
end
t = t + elapsed
if (t<update_timer) then
self.rABS_range = t
return
else
self.rABS_range = 0
rActionButtonStyler_AB_usable(self)
end
end
--hotkey func
--is only needed when you want to hide the hotkeys and use the default barmod (Dominos does not need this)
local function rActionButtonStyler_AB_hotkey(self, actionButtonType)
if (not actionButtonType) then
actionButtonType = "ACTIONBUTTON";
end
local hotkey = _G[self:GetName().."HotKey"]
local key = GetBindingKey(actionButtonType..self:GetID()) or GetBindingKey("CLICK "..self:GetName()..":LeftButton");
local text = GetBindingText(key, "KEY_", 1);
hotkey:SetText(text);
hotkey:Hide()
end
--call the special func to hide hotkeys after entering combat with the default actionbar
if hide_hotkey == 1 and use_dominos == 0 then
hooksecurefunc("ActionButton_UpdateHotkeys", rActionButtonStyler_AB_hotkey)
end