Shestak UI
Go Back   Shestak UI > Interface Forums > English Community > Technical Support

Technical Support Ask for help or find solutions about ShestakUI.

Advertising

 
Thread Tools
Old 15.10.2011, 23:27   #1
 Junior Member User Information

Gleave's Avatar
Focus cast bar text/icon

Another option I was looking to get going is adding spell text to the enemy focus cast bar and an icon, this is not really essential it'd just be awesome for my priest in PVP Anyways if anyone is able to help me out that'd be awesome!
Old 15.10.2011, 23:27   #1.5 - Disable Ads

Advertise on this site

Old 16.10.2011, 00:45   #2
Shestak
 Junior Member User Information

Shestak's Avatar
Move castbar
In ShestakUI\Config\Positions.lua(~55+ lines):
lua Code [Select]:
["player_castbar"] = {"BOTTOMLEFT", "oUF_Player", "BOTTOMRIGHT", 58, 0},    -- Player Castbar
["target_castbar"] = {"CENTER", "oUF_Player_Castbar", "CENTER", -23, 35},   -- Target Castbar
["focus_castbar"] = {"CENTER", UIParent, "CENTER", 0, 250},     -- Focus Castbar icon
 

Change focus castbar
In ShestakUI\Modules\UnitFrames\Layout.lua find:
lua Code [Select]:
if unit == "player" then
    if C.unitframe.castbar_icon == true then
        self.Castbar:Point(unpack(C.position.unitframes.player_castbar))
        self.Castbar:Width(258)
    else
        self.Castbar:Point(C.position.unitframes.player_castbar[1], C.position.unitframes.player_castbar[2], C.position.unitframes.player_castbar[3], C.position.unitframes.player_castbar[4] - 23, C.position.unitframes.player_castbar[5])
        self.Castbar:Width(281)
    end
    self.Castbar:Height(16)
elseif unit == "target" then
    if C.unitframe.castbar_icon == true then
        if C.unitframe.plugins_swing == true then
            self.Castbar:Point(unpack(C.position.unitframes.target_castbar))
        else
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4], C.position.unitframes.target_castbar[5] - 12)
        end
        self.Castbar:Width(258)
    else
        if C.unitframe.plugins_swing == true then
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4] + 23, C.position.unitframes.target_castbar[5])
        else
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4] + 23, C.position.unitframes.target_castbar[5] - 12)
        end
        self.Castbar:Width(281)
    end
    self.Castbar:Height(16)
elseif unit == "arena" or unit == "boss" then
    self.Castbar:Point("TOPLEFT", self, "BOTTOMLEFT", 0, -7)
    self.Castbar:Width(150)
    self.Castbar:Height(16)
else
    self.Castbar:Point("TOPLEFT", self, "BOTTOMLEFT", 0, -7)
    self.Castbar:Width(105)
    self.Castbar:Height(5)
end
and change:
lua Code [Select]:
if unit == "player" then
    if C.unitframe.castbar_icon == true then
        self.Castbar:Point(unpack(C.position.unitframes.player_castbar))
        self.Castbar:Width(258)
    else
        self.Castbar:Point(C.position.unitframes.player_castbar[1], C.position.unitframes.player_castbar[2], C.position.unitframes.player_castbar[3], C.position.unitframes.player_castbar[4] - 23, C.position.unitframes.player_castbar[5])
        self.Castbar:Width(281)
    end
    self.Castbar:Height(16)
elseif unit == "target" then
    if C.unitframe.castbar_icon == true then
        if C.unitframe.plugins_swing == true then
            self.Castbar:Point(unpack(C.position.unitframes.target_castbar))
        else
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4], C.position.unitframes.target_castbar[5] - 12)
        end
        self.Castbar:Width(258)
    else
        if C.unitframe.plugins_swing == true then
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4] + 23, C.position.unitframes.target_castbar[5])
        else
            self.Castbar:Point(C.position.unitframes.target_castbar[1], C.position.unitframes.target_castbar[2], C.position.unitframes.target_castbar[3], C.position.unitframes.target_castbar[4] + 23, C.position.unitframes.target_castbar[5] - 12)
        end
        self.Castbar:Width(281)
    end
    self.Castbar:Height(16)
elseif unit == "arena" or unit == "boss" then
    self.Castbar:Point("TOPLEFT", self, "BOTTOMLEFT", 0, -7)
    self.Castbar:Width(150)
    self.Castbar:Height(16)
elseif unit == "focus" then
    self.Castbar:Point(FOCUS_CASTBAR_POSITION)
    self.Castbar:Width(281)
    self.Castbar:Height(16)
else
    self.Castbar:Point("TOPLEFT", self, "BOTTOMLEFT", 0, -7)
    self.Castbar:Width(105)
    self.Castbar:Height(5)
end
*FOCUS_CASTBAR_POSITION - set your positions

In ShestakUI\Modules\UnitFrames\Layout.lua find:
lua Code [Select]:
if unit == "focus" then
    self.Castbar.Button = CreateFrame("Frame", nil, self.Castbar)
    self.Castbar.Button:Height(65)
    self.Castbar.Button:Width(65)
    self.Castbar.Button:Point(unpack(C.position.unitframes.focus_castbar))
    self.Castbar.Button:SetTemplate("Default")

    self.Castbar.Icon = self.Castbar.Button:CreateTexture(nil, "ARTWORK")
    self.Castbar.Icon:Point("TOPLEFT", self.Castbar.Button, 2, -2)
    self.Castbar.Icon:Point("BOTTOMRIGHT", self.Castbar.Button, -2, 2)
    self.Castbar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)

    self.Castbar.Time = T.SetFontString(self.Castbar, C.font.unit_frames_font, C.font.unit_frames_font_size * 2, C.font.unit_frames_font_style)
    self.Castbar.Time:SetParent(self.Castbar.Button)
    self.Castbar.Time:Point("CENTER", self.Castbar.Icon, "CENTER", 0, 0)
    self.Castbar.Time:SetTextColor(1, 1, 1)
    self.Castbar.CustomTimeText = T.CustomCastTimeText
end
and change:
lua Code [Select]:
if unit == "focus" then
    self.Castbar.Button = CreateFrame("Frame", nil, self.Castbar)
    self.Castbar.Button:Height(65)
    self.Castbar.Button:Width(65)
    self.Castbar.Button:Point(unpack(C.position.unitframes.focus_castbar))
    self.Castbar.Button:SetTemplate("Default")

    self.Castbar.Icon = self.Castbar.Button:CreateTexture(nil, "ARTWORK")
    self.Castbar.Icon:Point("TOPLEFT", self.Castbar.Button, 2, -2)
    self.Castbar.Icon:Point("BOTTOMRIGHT", self.Castbar.Button, -2, 2)
    self.Castbar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
end

In ShestakUI\Modules\UnitFrames\Layout.lua find:
lua Code [Select]:
if unit == "player" or unit == "target" or unit == "arena" or unit == "boss" then
    self.Castbar.Time =
and change:
lua Code [Select]:
if unit == "player" or unit == "target" or unit == "arena" or unit == "boss" or unit == "focus" then
    self.Castbar.Time =
Old 16.10.2011, 02:17   #3
Gleave
 Junior Member User Information

Gleave's Avatar
Thanks so much! Love your work and this will make it much better for my preferences

Tags
castbar, focuscasbar

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
xCT (lightweight combat text) affli Technical Support 260 05.07.2014 22:10
Minimap Button Function and Text Under Skill Bar? nine7114 Technical Support 1 04.12.2011 17:05
How to make cast bar vertical or remove it partxdeux Technical Support 1 05.03.2011 05:06
How to make it show my focus' debuffs? karltong General Discussion 3 17.10.2010 19:06
Text combat Guaro Technical Support 1 20.07.2010 02:44


Mobile Style Русский English Deutsch Italian Chinese