레이블이 Castbar인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Castbar인 게시물을 표시합니다. 모든 게시물 표시

2018년 6월 5일 화요일

Nameplate Castbar

이름표 시전바 높이/폰트/아이콘 크기 변경
Lua
local _N = CreateFrame("Frame")
_N:RegisterEvent("NAME_PLATE_UNIT_ADDED")
_N:SetScript("OnEvent", function(self, event, unit)
if self:IsForbidden() then return end
    local p = C_NamePlate.GetNamePlateForUnit(unit).UnitFrame
--Castbar Height
    local defaultH = p.castBar:GetHeight()
    p.castBar:SetHeight(defaultH*2)
--Castbar Font
    local fontName, fontHeight, fontFlags = p.castBar.Text:GetFont()
    p.castBar.Text:SetFont(fontName, fontHeight*1.8)
--Castbar icon
    local defaultS = p.castBar.Icon:GetHeight()
    p.castBar.Icon:SetSize(defaultS*1.5,defaultS*1.5)
    p.castBar.Icon:SetPoint("RIGHT",p.castBar,"LEFT",0,0)
end)
p.castBar:SetHeight(2*defaultH) ->시전바 높이를 기본의 2배로
p.castBar.Text:SetFont(fontName, fontHeight*1.8) -> 시전바 글씨를 원래 크기의 1.8배로
p.castBar.Icon:SetSize(defaultS*1.5,defaultS*1.5) -> 시전바 아이콘 크기를 원래 크기의 1.5배로
p.castBar.Icon:SetPoint("RIGHT",p.castBar,"LEFT",0,0) -> 아이콘 위치 보정

높이 2배/ 폰트 1.8배 적용 예시



대상 시전바 / 주시대상 시전바

대상 시전바(Target)
/run TargetFrameSpellBar:SetScript("OnShow", nil)TargetFrameSpellBar:ClearAllPoints();TargetFrameSpellBar:SetPoint("CENTER",TargetFrame,"CENTER",0,100);TargetFrameSpellBar.SetPoint = function()end;
주시 시전바(Focus)
/run FocusFrameSpellBar:SetScript("OnShow", nil)FocusFrameSpellBar:ClearAllPoints();FocusFrameSpellBar:SetPoint("CENTER",FocusFrame,"CENTER",0,100);FocusFrameSpellBar.SetPoint = function()end;

유닛프레임에 종속시키기를 원하지 않을 경우 Target/FocusFrame 대신 UIParent 입력