mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 03:06:01 +00:00
api: clean up and documentation
This commit is contained in:
+13
-13
@@ -51,7 +51,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.clock.timerFrame:SetWidth(120)
|
||||
pfUI.panel.clock.timerFrame:SetHeight(35)
|
||||
pfUI.panel.clock.timerFrame:SetPoint("TOP", 0, -100)
|
||||
pfUI.utils:UpdateMovable(pfUI.panel.clock.timerFrame)
|
||||
pfUI.api:UpdateMovable(pfUI.panel.clock.timerFrame)
|
||||
|
||||
pfUI.panel.clock.timerFrame.text = pfUI.panel.clock.timerFrame:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
pfUI.panel.clock.timerFrame.text:SetFontObject(GameFontWhite)
|
||||
@@ -115,13 +115,13 @@ pfUI:RegisterModule("panel", function ()
|
||||
GameTooltip:AddDoubleLine("Active Addons", "|cffffffff" .. active .. "|cff555555 / |cffffffff" .. GetNumAddOns())
|
||||
GameTooltip:AddLine(" ")
|
||||
local nin, nout, nping = GetNetStats()
|
||||
GameTooltip:AddDoubleLine("Network Down", "|cffffffff" .. round(nin,1) .. "KB/s")
|
||||
GameTooltip:AddDoubleLine("Network Up", "|cffffffff" .. round(nout,1) .. "KB/s")
|
||||
GameTooltip:AddDoubleLine("Network Down", "|cffffffff" .. pfUI.api.round(nin,1) .. "KB/s")
|
||||
GameTooltip:AddDoubleLine("Network Up", "|cffffffff" .. pfUI.api.round(nout,1) .. "KB/s")
|
||||
GameTooltip:AddDoubleLine("Network Latency", "|cffffffff" .. nping .. "ms")
|
||||
GameTooltip:AddLine(" ")
|
||||
GameTooltip:AddDoubleLine("Graphic Renderer", "|cffffffff" .. GetCVar("gxApi"))
|
||||
GameTooltip:AddDoubleLine("Screen Resolution", "|cffffffff" .. GetCVar("gxResolution"))
|
||||
GameTooltip:AddDoubleLine("UI-Scale", "|cffffffff" .. round(UIParent:GetEffectiveScale(),2))
|
||||
GameTooltip:AddDoubleLine("UI-Scale", "|cffffffff" .. pfUI.api.round(UIParent:GetEffectiveScale(),2))
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
@@ -301,7 +301,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
GameTooltip_SetDefaultAnchor(GameTooltip, this)
|
||||
GameTooltip:AddLine("|cffffffff" .. real)
|
||||
GameTooltip:AddLine(sub)
|
||||
GameTooltip:AddLine("|cffaaaaaa" .. round(posX*100,1) .. " / " .. round(posY*100,1))
|
||||
GameTooltip:AddLine("|cffaaaaaa" .. pfUI.api.round(posX*100,1) .. " / " .. pfUI.api.round(posY*100,1))
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
@@ -366,14 +366,14 @@ pfUI:RegisterModule("panel", function ()
|
||||
end
|
||||
|
||||
pfUI.panel.left:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.left, default_border, nil, true)
|
||||
pfUI.api:CreateBackdrop(pfUI.panel.left, default_border, nil, true)
|
||||
|
||||
pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left)
|
||||
pfUI.panel.left.hide:ClearAllPoints()
|
||||
pfUI.panel.left.hide:SetWidth(12)
|
||||
pfUI.panel.left.hide:SetHeight(pfUI.panel.left:GetHeight())
|
||||
pfUI.panel.left.hide:SetPoint("LEFT", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.left.hide, default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.panel.left.hide, default_border)
|
||||
pfUI.panel.left.hide.texture = pfUI.panel.left.hide:CreateTexture("pfPanelLeftHide")
|
||||
pfUI.panel.left.hide.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\left")
|
||||
pfUI.panel.left.hide.texture:ClearAllPoints()
|
||||
@@ -432,14 +432,14 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.right:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -5, 5)
|
||||
end
|
||||
pfUI.panel.right:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.right, default_border, nil, true)
|
||||
pfUI.api:CreateBackdrop(pfUI.panel.right, default_border, nil, true)
|
||||
|
||||
pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right)
|
||||
pfUI.panel.right.hide:ClearAllPoints()
|
||||
pfUI.panel.right.hide:SetWidth(12)
|
||||
pfUI.panel.right.hide:SetHeight(pfUI.panel.right:GetHeight())
|
||||
pfUI.panel.right.hide:SetPoint("RIGHT", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.right.hide, default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.panel.right.hide, default_border)
|
||||
pfUI.panel.right.hide.texture = pfUI.panel.right.hide:CreateTexture("pfPanelRightHide")
|
||||
pfUI.panel.right.hide.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\right")
|
||||
pfUI.panel.right.hide.texture:ClearAllPoints()
|
||||
@@ -487,8 +487,8 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.right.right.text:SetFontObject(GameFontWhite)
|
||||
|
||||
pfUI.panel.minimap = CreateFrame("Button", "pfPanelMinimap", UIParent)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.minimap, default_border)
|
||||
pfUI.utils:UpdateMovable(pfUI.panel.minimap)
|
||||
pfUI.api:CreateBackdrop(pfUI.panel.minimap, default_border)
|
||||
pfUI.api:UpdateMovable(pfUI.panel.minimap)
|
||||
pfUI.panel.minimap:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
if pfUI.minimap then
|
||||
pfUI.panel.minimap:SetPoint("TOP", pfUI.minimap, "BOTTOM", 0 , -default_border*3)
|
||||
@@ -507,7 +507,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
if pfUI_config.panel.micro.enable == "1" then
|
||||
pfUI.panel.microbutton = CreateFrame("Frame", "pfPanelMicroButton", UIParent)
|
||||
pfUI.panel.microbutton:SetPoint("TOP", 0, 0)
|
||||
pfUI.utils:UpdateMovable(pfUI.panel.microbutton)
|
||||
pfUI.api:UpdateMovable(pfUI.panel.microbutton)
|
||||
pfUI.panel.microbutton:SetHeight(23)
|
||||
pfUI.panel.microbutton:SetWidth(145)
|
||||
pfUI.panel.microbutton:SetFrameStrata("BACKGROUND")
|
||||
@@ -534,7 +534,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
button.frame:SetScale(1.4)
|
||||
button.frame:SetPoint("TOPLEFT", button, "TOPLEFT", 1, -16)
|
||||
button.frame:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -1, 1)
|
||||
pfUI.utils:CreateBackdrop(button.frame, default_border)
|
||||
pfUI.api:CreateBackdrop(button.frame, default_border)
|
||||
button:Show()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user