0 Пользователей и 1 Гость просматривают эту тему.
обычно на стриме можно и увидеть список аддонов
[size=20pt]local addon = CreateFrame("Frame", nil, UIParent)local update = .25; -- time between updateslocal lastupdate = 0;local TF_forceshow = 0;local mainskillfocus = 0;local _function addon:new() local _, p_class = UnitClass("player"); if p_class == "HUNTER" or p_class == "ROGUE" or p_class == "WARRIOR" then self:RegisterEvent("ADDON_LOADED"); self:RegisterEvent("UNIT_POWER"); self:RegisterEvent("UNIT_MAXPOWER"); self:SetScript("OnEvent", self.onevent) self:SetScript("OnUpdate", self.update) endend-- event functionsfunction addon:onevent(event, data1, data2) if event == "ADDON_LOADED" and data1 == "Tarkumi_Focus" then SlashCmdList["TFOCUS"] = TFocus_slash; SLASH_TFOCUS1 = "/tfocus"; T_Focus_CreateFrames() T_FocusBar:EnableMouse(false); elseif ((event == "UNIT_POWER") and (data1 == "player") ) then if TF_forceshow == 1 then return end local pfocus = UnitPower("player") if ( (pfocus == UnitPowerMax("player")) and (not InCombatLockdown()) ) or UnitUsingVehicle("player") then T_FocusBar:Hide() else T_FocusBar:SetValue(pfocus) T_FocusBarText:SetText(pfocus) T_FocusBar:Show() end elseif (event == "UNIT_MAXPOWER") and (data1 == "player") then T_FocusBar:SetMinMaxValues(0, UnitPowerMax("player")) endendfunction addon:update(elapsed) lastupdate = lastupdate + elapsed; if lastupdate >= update then lastupdate = 0; if TF_forceshow == 1 then return end local pfocus = UnitPower("player") local _, p_class = UnitClass("player"); if ( (p_class == "WARRIOR") and (pfocus == 0 ) and (not InCombatLockdown()) ) or UnitUsingVehicle("player") then T_FocusBar:Hide() elseif ( (pfocus == UnitPowerMax("player")) and (not InCombatLockdown()) ) or UnitUsingVehicle("player") then T_FocusBar:Hide() else T_FocusBar:SetValue(pfocus) T_FocusBarText:SetText(pfocus) T_FocusBar:Show() end endendfunction TFocus_slash() if TF_forceshow == 0 then TF_forceshow = 1; T_FocusBar:EnableMouse(true); T_FocusBar:SetValue(100) T_FocusBarText:SetText("100") T_FocusBar:Show() DEFAULT_CHAT_FRAME:AddMessage("Frames are now forced to always show and movable."); else TF_forceshow = 0; T_FocusBar:EnableMouse(false); T_FocusBar:Hide() DEFAULT_CHAT_FRAME:AddMessage("Frames are now auto hide mode and cannot be moved."); endend-- Frame creatingfunction T_Focus_CreateFrames() T_FocusBar = CreateFrame("StatusBar", "T_FocusBar", UIParent) T_FocusBar:SetFrameStrata("LOW") T_FocusBar:SetStatusBarTexture("Interface\\Addons\\Tarkumi_Focus\\Statusbar\\Minimalist") T_FocusBar:GetStatusBarTexture():SetHorizTile(false) T_FocusBar:SetMinMaxValues(0, 100) T_FocusBar:SetValue(100) T_FocusBar:SetWidth(214) T_FocusBar:SetHeight(18) T_FocusBar:SetPoint("CENTER", 0, -151) T_FocusBar:SetStatusBarColor(1.0, 0.5, 0.25) T_FocusBar:SetBackdrop({ bgFile="Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0 } }) T_FocusBar:SetBackdropColor(0, 0, 0, 0.9) T_FocusBar:Hide() T_FocusBar:SetMovable(true) T_FocusBar:EnableMouse(false); T_FocusBar:SetScript("OnMouseDown", T_FocusBar.StartMoving) T_FocusBar:SetScript("OnMouseUp", function () T_FocusBar:StopMovingOrSizing() TFSettings.fx = T_FocusBar:GetLeft() TFSettings.fy = T_FocusBar:GetBottom() end) T_FocusBarText = T_FocusBar:CreateFontString(nil, "OVERLAY", T_FocusBar) T_FocusBarText:SetFont("Fonts\\FRIZQT__.TTF", 18, "OUTLINE") T_FocusBarText:SetPoint("CENTER") T_FocusBarText:SetJustifyH("CENTER") T_FocusBarText:SetTextColor(1, 1, 0) T_FocusBarText:SetText("100")end-- fire (hooksecurefunct here too)addon:new()[/size]
Подскажите, что нужно поменять в .lua, чтобы полоска отображалась постоянно.
-- T_FocusBar:Hide()