mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
rework of the gitter frames
This commit is contained in:
Binary file not shown.
+2
-3
@@ -30,7 +30,7 @@ pfUI:RegisterModule("group", function ()
|
||||
for i=1, 5 do
|
||||
if GetNumPartyMembers() >= i then
|
||||
pfUI.uf.group[i]:Show()
|
||||
if UnitIsConnected("party"..i) then
|
||||
if UnitIsConnected("party"..i) or not UnitName("raid" .. this.id) then
|
||||
pfUI.uf.group[i]:SetAlpha(1)
|
||||
else
|
||||
pfUI.uf.group[i]:SetAlpha(.25)
|
||||
@@ -110,7 +110,6 @@ pfUI:RegisterModule("group", function ()
|
||||
pfUI.uf.group[i].caption:SetPoint("LEFT",pfUI.uf.group[i].hp.bar, "LEFT", 10, 0)
|
||||
pfUI.uf.group[i].caption:SetJustifyH("LEFT")
|
||||
pfUI.uf.group[i].caption:SetFontObject(GameFontWhite)
|
||||
pfUI.uf.group[i].caption:SetText("Group"..i)
|
||||
|
||||
pfUI.uf.group[i].hp.leaderIcon = CreateFrame("Frame",nil,pfUI.uf.group[i].hp)
|
||||
pfUI.uf.group[i].hp.leaderIcon:SetWidth(10)
|
||||
@@ -172,7 +171,7 @@ pfUI:RegisterModule("group", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.group[i]:SetScript("OnUpdate", function ()
|
||||
if CheckInteractDistance("party" .. this.id, 4) then
|
||||
if CheckInteractDistance("party" .. this.id, 4) or not UnitName("raid" .. this.id) then
|
||||
this:SetAlpha(1)
|
||||
else
|
||||
this:SetAlpha(.5)
|
||||
|
||||
+55
-8
@@ -99,11 +99,51 @@ pfUI:RegisterModule("gui", function ()
|
||||
|
||||
if not pfUI.gitter then
|
||||
pfUI.gitter = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.gitter:SetAllPoints(WorldFrame)
|
||||
pfUI.gitter:SetFrameStrata("BACKGROUND")
|
||||
pfUI.gitter:SetPoint("TOPLEFT", 0, 0, "TOPLEFT")
|
||||
pfUI.gitter:SetPoint("BOTTOMRIGHT", 0, 0, "BOTTOMRIGHT")
|
||||
pfUI.gitter:SetBackdrop(pfUI.backdrop_gitter)
|
||||
pfUI.gitter:SetBackdropColor(0,0,0,1)
|
||||
|
||||
local size = 1
|
||||
local width = GetScreenWidth()
|
||||
local ratio = width / GetScreenHeight()
|
||||
local height = GetScreenHeight() * ratio
|
||||
|
||||
local wStep = width / 128
|
||||
local hStep = height / 128
|
||||
|
||||
for i = 0, 128 do
|
||||
local tx = pfUI.gitter:CreateTexture(nil, 'BACKGROUND')
|
||||
if i == 128 / 2 then
|
||||
tx:SetTexture(.2, 1, .8)
|
||||
else
|
||||
tx:SetTexture(0, 0, 0)
|
||||
end
|
||||
tx:SetPoint("TOPLEFT", pfUI.gitter, "TOPLEFT", i*wStep - (size/2), 0)
|
||||
tx:SetPoint('BOTTOMRIGHT', pfUI.gitter, 'BOTTOMLEFT', i*wStep + (size/2), 0)
|
||||
end
|
||||
|
||||
local height = GetScreenHeight()
|
||||
|
||||
for i = 0, 128 do
|
||||
local tx = pfUI.gitter:CreateTexture(nil, 'BACKGROUND')
|
||||
tx:SetTexture(.2, 1, .8)
|
||||
tx:SetPoint("TOPLEFT", pfUI.gitter, "TOPLEFT", 0, -(height/2) + (size/2))
|
||||
tx:SetPoint('BOTTOMRIGHT', pfUI.gitter, 'TOPRIGHT', 0, -(height/2 + size/2))
|
||||
end
|
||||
|
||||
for i = 1, floor((height/2)/hStep) do
|
||||
local tx = pfUI.gitter:CreateTexture(nil, 'BACKGROUND')
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetPoint("TOPLEFT", pfUI.gitter, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2))
|
||||
tx:SetPoint('BOTTOMRIGHT', pfUI.gitter, 'TOPRIGHT', 0, -(height/2+i*hStep + size/2))
|
||||
|
||||
tx = pfUI.gitter:CreateTexture(nil, 'BACKGROUND')
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetPoint("TOPLEFT", pfUI.gitter, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2))
|
||||
tx:SetPoint('BOTTOMRIGHT', pfUI.gitter, 'TOPRIGHT', 0, -(height/2-i*hStep + size/2))
|
||||
end
|
||||
|
||||
pfUI.gitter:Hide()
|
||||
end
|
||||
|
||||
@@ -123,10 +163,17 @@ pfUI:RegisterModule("gui", function ()
|
||||
frame.drag = CreateFrame("Frame", nil, frame)
|
||||
frame.drag:SetAllPoints(frame)
|
||||
frame.drag:SetFrameStrata("DIALOG")
|
||||
frame.drag.bg = frame.drag:CreateTexture()
|
||||
frame.drag.bg:SetAllPoints(frame.drag)
|
||||
frame.drag.bg:SetTexture(.2,1,.8,1)
|
||||
frame.drag:SetAlpha(.25)
|
||||
frame.drag:SetBackdrop(pfUI.backdrop_col)
|
||||
frame.drag:SetBackdropBorderColor(.2, 1, .8)
|
||||
frame.drag:SetBackdropColor(1,1,1,.75)
|
||||
frame.drag.text = frame.drag:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
frame.drag.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\arial.ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
frame.drag.text:ClearAllPoints()
|
||||
frame.drag.text:SetAllPoints(frame.drag)
|
||||
frame.drag.text:SetPoint("CENTER", 0, 0)
|
||||
frame.drag.text:SetFontObject(GameFontWhite)
|
||||
frame.drag.text:SetText(strsub(frame:GetName(),3))
|
||||
frame.drag:SetAlpha(1)
|
||||
end
|
||||
|
||||
frame.drag:SetScript("OnMouseDown",function()
|
||||
|
||||
+1
-2
@@ -78,7 +78,6 @@ pfUI:RegisterModule("raid", function ()
|
||||
pfUI.uf.raid[i].caption:SetPoint("CENTER",pfUI.uf.raid[i].hp.bar, "CENTER", 0, 0)
|
||||
pfUI.uf.raid[i].caption:SetJustifyH("CENTER")
|
||||
pfUI.uf.raid[i].caption:SetFontObject(GameFontWhite)
|
||||
pfUI.uf.raid[i].caption:SetText("Raid"..i)
|
||||
|
||||
pfUI.uf.raid[i].hp.leaderIcon = CreateFrame("Frame",nil,pfUI.uf.raid[i].hp)
|
||||
pfUI.uf.raid[i].hp.leaderIcon:SetWidth(10)
|
||||
@@ -178,7 +177,7 @@ pfUI:RegisterModule("raid", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.raid[i]:SetScript("OnUpdate", function ()
|
||||
if CheckInteractDistance("raid" .. this.id, 4) then
|
||||
if CheckInteractDistance("raid" .. this.id, 4) or not UnitName("raid" .. this.id) then
|
||||
this:SetAlpha(1)
|
||||
else
|
||||
this:SetAlpha(.5)
|
||||
|
||||
@@ -70,10 +70,6 @@ pfUI.backdrop = {
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
}
|
||||
|
||||
pfUI.backdrop_gitter = {
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\gitter", tile = true, tileSize = 8,
|
||||
}
|
||||
|
||||
pfUI.backdrop_col = {
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\bg", tile = true, tileSize = 8,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
|
||||
Reference in New Issue
Block a user