mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Merge branch 'dev' into auras-work
This commit is contained in:
@@ -52,8 +52,7 @@ function E:FarmMode(msg)
|
||||
if E.private.general.minimap.enable ~= true then return end
|
||||
if msg and type(tonumber(msg)) == "number" and tonumber(msg) <= 500 and tonumber(msg) >= 20 then
|
||||
E.db.farmSize = tonumber(msg)
|
||||
FarmModeMap:SetWidth(tonumber(msg))
|
||||
FarmModeMap:SetHeight(tonumber(msg))
|
||||
E:Size(FarmModeMap, tonumber(msg))
|
||||
end
|
||||
|
||||
FarmMode()
|
||||
|
||||
+52
-66
@@ -114,30 +114,30 @@ function E:Grid_Create()
|
||||
else
|
||||
tx:SetTexture(0, 0, 0)
|
||||
end
|
||||
tx:SetPoint("TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0)
|
||||
tx:SetPoint("BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0)
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0)
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0)
|
||||
end
|
||||
height = GetScreenHeight()
|
||||
|
||||
do
|
||||
local tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
tx:SetTexture(1, 0, 0)
|
||||
tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2))
|
||||
tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2))
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2))
|
||||
end
|
||||
|
||||
for i = 1, floor((height/2)/hStep) do
|
||||
local tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2))
|
||||
tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2))
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2))
|
||||
|
||||
tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2))
|
||||
tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2))
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -166,7 +166,7 @@ function E:NudgeMover(nudgeX, nudgeY)
|
||||
local x, y, point = E:CalculateMoverPoints(mover, nudgeX, nudgeY)
|
||||
|
||||
mover:ClearAllPoints()
|
||||
mover:SetPoint(mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y)
|
||||
E:Point(mover, mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y)
|
||||
E:SaveMoverPosition(mover.name)
|
||||
|
||||
E:UpdateNudgeFrame(mover, x, y)
|
||||
@@ -200,10 +200,9 @@ function E:CreateMoverPopup()
|
||||
f:SetMovable(true)
|
||||
f:SetFrameLevel(99)
|
||||
f:SetClampedToScreen(true)
|
||||
f:SetWidth(360)
|
||||
f:SetHeight(170)
|
||||
E:Size(f, 360, 170)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
f:SetPoint("BOTTOM", UIParent, "CENTER", 0, 100)
|
||||
E:Point(f, "BOTTOM", UIParent, "CENTER", 0, 100)
|
||||
f:SetScript("OnHide", function()
|
||||
if ElvUIMoverPopupWindowDropDown then
|
||||
UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, "ALL")
|
||||
@@ -215,8 +214,8 @@ function E:CreateMoverPopup()
|
||||
|
||||
local header = CreateFrame("Button", nil, f)
|
||||
E:SetTemplate(header, "Default", true)
|
||||
header:SetWidth(100) header:SetHeight(25)
|
||||
header:SetPoint("CENTER", f, "TOP")
|
||||
E:Size(header, 100, 25)
|
||||
E:Point(header, "CENTER", f, "TOP")
|
||||
header:SetFrameLevel(header:GetFrameLevel() + 2)
|
||||
header:EnableMouse(true)
|
||||
header:RegisterForClicks("AnyUp", "AnyDown")
|
||||
@@ -225,15 +224,15 @@ function E:CreateMoverPopup()
|
||||
|
||||
local title = header:CreateFontString("OVERLAY")
|
||||
E:FontTemplate(title)
|
||||
title:SetPoint("CENTER", header, "CENTER")
|
||||
E:Point(title, "CENTER", header, "CENTER")
|
||||
title:SetText("ElvUI")
|
||||
|
||||
local desc = f:CreateFontString("ARTWORK")
|
||||
desc:SetFontObject("GameFontHighlight")
|
||||
desc:SetJustifyV("TOP")
|
||||
desc:SetJustifyH("LEFT")
|
||||
desc:SetPoint("TOPLEFT", 18, -32)
|
||||
desc:SetPoint("BOTTOMRIGHT", -18, 48)
|
||||
E:Point(desc, "TOPLEFT", 18, -32)
|
||||
E:Point(desc, "BOTTOMRIGHT", -18, 48)
|
||||
desc:SetText(L["DESC_MOVERCONFIG"])
|
||||
|
||||
local snapping = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate")
|
||||
@@ -262,8 +261,7 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
|
||||
local align = CreateFrame("EditBox", f:GetName().."EditBox", f, "InputBoxTemplate")
|
||||
align:SetWidth(32)
|
||||
align:SetHeight(17)
|
||||
E:Size(align, 32, 17)
|
||||
align:SetAutoFocus(false)
|
||||
align:SetScript("OnEscapePressed", function()
|
||||
this:SetText(E.db.gridSize)
|
||||
@@ -292,13 +290,13 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
|
||||
align.text = align:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
align.text:SetPoint("RIGHT", align, "LEFT", -4, 0)
|
||||
E:Point(align.text, "RIGHT", align, "LEFT", -4, 0)
|
||||
align.text:SetText(L["Grid Size:"])
|
||||
|
||||
--position buttons
|
||||
snapping:SetPoint("BOTTOMLEFT", 14, 10)
|
||||
lock:SetPoint("BOTTOMRIGHT", -14, 14)
|
||||
align:SetPoint("TOPRIGHT", lock, "TOPLEFT", -4, -2)
|
||||
E:Point(snapping, "BOTTOMLEFT", 14, 10)
|
||||
E:Point(lock, "BOTTOMRIGHT", -14, 14)
|
||||
E:Point(align, "TOPRIGHT", lock, "TOPLEFT", -4, -2)
|
||||
|
||||
S:HandleCheckBox(snapping)
|
||||
S:HandleButton(lock)
|
||||
@@ -314,20 +312,19 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
|
||||
local configMode = CreateFrame("Frame", f:GetName().."DropDown", f, "UIDropDownMenuTemplate")
|
||||
configMode:SetPoint("BOTTOMRIGHT", lock, "TOPRIGHT", 8, -5)
|
||||
E:Point(configMode, "BOTTOMRIGHT", lock, "TOPRIGHT", 8, -5)
|
||||
S:HandleDropDownBox(configMode, 148)
|
||||
configMode.text = configMode:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
configMode.text:SetPoint("RIGHT", configMode.backdrop, "LEFT", -2, 0)
|
||||
E:Point(configMode.text, "RIGHT", configMode.backdrop, "LEFT", -2, 0)
|
||||
configMode.text:SetText(L["Config Mode:"])
|
||||
|
||||
UIDropDownMenu_Initialize(configMode, ConfigMode_Initialize)
|
||||
|
||||
local nudgeFrame = CreateFrame("Frame", "ElvUIMoverNudgeWindow", E.UIParent)
|
||||
nudgeFrame:SetFrameStrata("DIALOG")
|
||||
nudgeFrame:SetWidth(200)
|
||||
nudgeFrame:SetHeight(110)
|
||||
E:Size(nudgeFrame, 200, 110)
|
||||
E:SetTemplate(nudgeFrame, "Transparent")
|
||||
nudgeFrame:SetPoint("TOP", ElvUIMoverPopupWindow, "BOTTOM", 0, -15)
|
||||
E:Point(nudgeFrame, "TOP", ElvUIMoverPopupWindow, "BOTTOM", 0, -15)
|
||||
nudgeFrame:SetFrameLevel(100)
|
||||
nudgeFrame:Hide()
|
||||
nudgeFrame:EnableMouse(true)
|
||||
@@ -336,19 +333,18 @@ function E:CreateMoverPopup()
|
||||
|
||||
header = CreateFrame("Button", "ElvUIMoverNudgeWindowHeader", nudgeFrame)
|
||||
E:SetTemplate(header, "Default", true)
|
||||
header:SetWidth(100) header:SetHeight(25)
|
||||
header:SetPoint("CENTER", nudgeFrame, "TOP")
|
||||
E:Size(header, 100, 25)
|
||||
E:Point(header, "CENTER", nudgeFrame, "TOP")
|
||||
header:SetFrameLevel(header:GetFrameLevel() + 2)
|
||||
|
||||
title = header:CreateFontString("OVERLAY")
|
||||
E:FontTemplate(title)
|
||||
title:SetPoint("CENTER", header, "CENTER")
|
||||
E:Point(title, "CENTER", header, "CENTER")
|
||||
title:SetText(L["Nudge"])
|
||||
header.title = title
|
||||
|
||||
local xOffset = CreateFrame("EditBox", nudgeFrame:GetName().."XEditBox", nudgeFrame, "InputBoxTemplate")
|
||||
xOffset:SetWidth(50)
|
||||
xOffset:SetHeight(17)
|
||||
E:Size(xOffset, 50, 17)
|
||||
xOffset:SetAutoFocus(false)
|
||||
xOffset.currentValue = 0
|
||||
xOffset:SetScript("OnEscapePressed", function()
|
||||
@@ -374,15 +370,14 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
|
||||
xOffset.text = xOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
xOffset.text:SetPoint("RIGHT", xOffset, "LEFT", -4, 0)
|
||||
E:Point(xOffset.text, "RIGHT", xOffset, "LEFT", -4, 0)
|
||||
xOffset.text:SetText("X:")
|
||||
xOffset:SetPoint("BOTTOMRIGHT", nudgeFrame, "CENTER", -6, 8)
|
||||
E:Point(xOffset, "BOTTOMRIGHT", nudgeFrame, "CENTER", -6, 8)
|
||||
nudgeFrame.xOffset = xOffset
|
||||
S:HandleEditBox(xOffset)
|
||||
|
||||
local yOffset = CreateFrame("EditBox", nudgeFrame:GetName().."YEditBox", nudgeFrame, "InputBoxTemplate")
|
||||
yOffset:SetWidth(50)
|
||||
yOffset:SetHeight(17)
|
||||
E:Size(yOffset, 50, 17)
|
||||
yOffset:SetAutoFocus(false)
|
||||
yOffset.currentValue = 0
|
||||
yOffset:SetScript("OnEscapePressed", function()
|
||||
@@ -408,17 +403,16 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
|
||||
yOffset.text = yOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
yOffset.text:SetPoint("RIGHT", yOffset, "LEFT", -4, 0)
|
||||
E:Point(yOffset.text, "RIGHT", yOffset, "LEFT", -4, 0)
|
||||
yOffset.text:SetText("Y:")
|
||||
yOffset:SetPoint("BOTTOMLEFT", nudgeFrame, "CENTER", 16, 8)
|
||||
E:Point(yOffset, "BOTTOMLEFT", nudgeFrame, "CENTER", 16, 8)
|
||||
nudgeFrame.yOffset = yOffset
|
||||
S:HandleEditBox(yOffset)
|
||||
|
||||
local resetButton = CreateFrame("Button", nudgeFrame:GetName().."ResetButton", nudgeFrame, "UIPanelButtonTemplate")
|
||||
resetButton:SetText(RESET)
|
||||
resetButton:SetPoint("TOP", nudgeFrame, "CENTER", 0, 2)
|
||||
resetButton:SetWidth(100)
|
||||
resetButton:SetHeight(25)
|
||||
E:Point(resetButton, "TOP", nudgeFrame, "CENTER", 0, 2)
|
||||
E:Size(resetButton, 100, 25)
|
||||
resetButton:SetScript("OnClick", function()
|
||||
if(ElvUIMoverNudgeWindow.child.textString) then
|
||||
E:ResetMovers(ElvUIMoverNudgeWindow.child.textString)
|
||||
@@ -428,16 +422,14 @@ function E:CreateMoverPopup()
|
||||
S:HandleButton(resetButton)
|
||||
-- Up Button
|
||||
local upButton = CreateFrame("Button", nudgeFrame:GetName().."PrevButton", nudgeFrame)
|
||||
upButton:SetWidth(26)
|
||||
upButton:SetHeight(26)
|
||||
upButton:SetPoint("BOTTOMRIGHT", nudgeFrame, "BOTTOM", -6, 4)
|
||||
E:Size(upButton, 26)
|
||||
E:Point(upButton, "BOTTOMRIGHT", nudgeFrame, "BOTTOM", -6, 4)
|
||||
upButton:SetScript("OnClick", function()
|
||||
E:NudgeMover(nil, 1)
|
||||
end)
|
||||
upButton.icon = upButton:CreateTexture(nil, "ARTWORK")
|
||||
upButton.icon:SetWidth(13)
|
||||
upButton.icon:SetHeight(13)
|
||||
upButton.icon:SetPoint("CENTER", 0, 0)
|
||||
E:Size(upButton.icon, 13)
|
||||
E:Point(upButton.icon, "CENTER", 0, 0)
|
||||
upButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
@@ -445,16 +437,14 @@ function E:CreateMoverPopup()
|
||||
S:HandleButton(upButton)
|
||||
-- Down Button
|
||||
local downButton = CreateFrame("Button", nudgeFrame:GetName().."DownButton", nudgeFrame)
|
||||
downButton:SetWidth(26)
|
||||
downButton:SetHeight(26)
|
||||
downButton:SetPoint("BOTTOMLEFT", nudgeFrame, "BOTTOM", 6, 4)
|
||||
E:Size(downButton, 26)
|
||||
E:Point(downButton, "BOTTOMLEFT", nudgeFrame, "BOTTOM", 6, 4)
|
||||
downButton:SetScript("OnClick", function()
|
||||
E:NudgeMover(nil, -1)
|
||||
end)
|
||||
downButton.icon = downButton:CreateTexture(nil, "ARTWORK")
|
||||
downButton.icon:SetWidth(13)
|
||||
downButton.icon:SetHeight(13)
|
||||
downButton.icon:SetPoint("CENTER", 0, 0)
|
||||
E:Size(downButton.icon, 13)
|
||||
E:Point(downButton.icon, "CENTER", 0, 0)
|
||||
downButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
@@ -462,16 +452,14 @@ function E:CreateMoverPopup()
|
||||
S:HandleButton(downButton)
|
||||
-- Left Button
|
||||
local leftButton = CreateFrame("Button", nudgeFrame:GetName().."LeftButton", nudgeFrame)
|
||||
leftButton:SetWidth(26)
|
||||
leftButton:SetHeight(26)
|
||||
leftButton:SetPoint("RIGHT", upButton, "LEFT", -6, 0)
|
||||
E:Size(leftButton, 26)
|
||||
E:Point(leftButton, "RIGHT", upButton, "LEFT", -6, 0)
|
||||
leftButton:SetScript("OnClick", function()
|
||||
E:NudgeMover(-1)
|
||||
end)
|
||||
leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK")
|
||||
leftButton.icon:SetWidth(13)
|
||||
leftButton.icon:SetHeight(13)
|
||||
leftButton.icon:SetPoint("CENTER", 0, 0)
|
||||
E:Size(leftButton.icon, 13)
|
||||
E:Point(leftButton.icon, "CENTER", 0, 0)
|
||||
leftButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
@@ -479,16 +467,14 @@ function E:CreateMoverPopup()
|
||||
S:HandleButton(leftButton)
|
||||
-- Right Button
|
||||
local rightButton = CreateFrame("Button", nudgeFrame:GetName().."RightButton", nudgeFrame)
|
||||
rightButton:SetWidth(26)
|
||||
rightButton:SetHeight(26)
|
||||
rightButton:SetPoint("LEFT", downButton, "RIGHT", 6, 0)
|
||||
E:Size(rightButton, 26)
|
||||
E:Point(rightButton, "LEFT", downButton, "RIGHT", 6, 0)
|
||||
rightButton:SetScript("OnClick", function()
|
||||
E:NudgeMover(1)
|
||||
end)
|
||||
rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK")
|
||||
rightButton.icon:SetWidth(13)
|
||||
rightButton.icon:SetHeight(13)
|
||||
rightButton.icon:SetPoint("CENTER", 0, 0)
|
||||
E:Size(rightButton.icon, 13)
|
||||
E:Point(rightButton.icon, "CENTER", 0, 0)
|
||||
rightButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
rightButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ function E:CreateCooldownTimer(parent)
|
||||
timer:SetScript("OnUpdate", function() Cooldown_OnUpdate(this, arg1) end)
|
||||
|
||||
local text = timer:CreateFontString(nil, "OVERLAY")
|
||||
text:SetPoint("CENTER", 1, 1)
|
||||
E:Point(text, "CENTER", 1, 1)
|
||||
text:SetJustifyH("CENTER")
|
||||
timer.text = text
|
||||
|
||||
|
||||
+18
-20
@@ -13,8 +13,7 @@ E.CreatedMovers = {}
|
||||
E.DisabledMovers = {}
|
||||
|
||||
local function SizeChanged(self)
|
||||
self.mover:SetWidth(self.dirtyWidth and self.dirtyWidth or self:GetWidth())
|
||||
self.mover:SetHeight(self.dirtyHeight and self.dirtyHeight or self:GetHeight())
|
||||
E:Size(self.mover, self.dirtyWidth and self.dirtyWidth or self:GetWidth(), self.dirtyHeight and self.dirtyHeight or self:GetHeight())
|
||||
end
|
||||
|
||||
local function GetPoint(obj)
|
||||
@@ -30,7 +29,7 @@ local function UpdateCoords(self)
|
||||
|
||||
local coordX, coordY = E:GetXYOffset(nudgeInversePoint, 1)
|
||||
ElvUIMoverNudgeWindow:ClearAllPoints()
|
||||
ElvUIMoverNudgeWindow:SetPoint(nudgePoint, mover, nudgeInversePoint, coordX, coordY)
|
||||
E:Point(ElvUIMoverNudgeWindow, nudgePoint, mover, nudgeInversePoint, coordX, coordY)
|
||||
E:UpdateNudgeFrame(mover, x, y)
|
||||
end
|
||||
|
||||
@@ -54,8 +53,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
f:RegisterForDrag("LeftButton", "RightButton")
|
||||
f:EnableMouseWheel(true)
|
||||
f:SetMovable(true)
|
||||
f:SetWidth(width)
|
||||
f:SetHeight(height)
|
||||
E:Size(f, width)
|
||||
E:SetTemplate(f, "Transparent", nil, nil, true)
|
||||
f:Hide()
|
||||
f.parent = parent
|
||||
@@ -67,7 +65,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
f.shouldDisable = shouldDisable
|
||||
|
||||
f:SetFrameLevel(parent:GetFrameLevel() + 1)
|
||||
if(overlay == true) then
|
||||
if overlay == true then
|
||||
f:SetFrameStrata("DIALOG")
|
||||
else
|
||||
f:SetFrameStrata("BACKGROUND")
|
||||
@@ -79,7 +77,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
local fs = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(fs)
|
||||
fs:SetJustifyH("CENTER")
|
||||
fs:SetPoint("CENTER", f)
|
||||
E:Point(fs, "CENTER", f)
|
||||
fs:SetText(text or name)
|
||||
fs:SetTextColor(unpack(E["media"].rgbvaluecolor))
|
||||
f:SetFontString(fs)
|
||||
@@ -87,7 +85,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
|
||||
if E.db["movers"] and E.db["movers"][name] then
|
||||
if type(E.db["movers"][name]) == "table" then
|
||||
f:SetPoint(E.db["movers"][name]["p"], E.UIParent, E.db["movers"][name]["p2"], E.db["movers"][name]["p3"], E.db["movers"][name]["p4"])
|
||||
E:Point(f, E.db["movers"][name]["p"], E.UIParent, E.db["movers"][name]["p2"], E.db["movers"][name]["p3"], E.db["movers"][name]["p4"])
|
||||
E.db["movers"][name] = GetPoint(f)
|
||||
f:ClearAllPoints()
|
||||
end
|
||||
@@ -100,10 +98,10 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
delim = ","
|
||||
end
|
||||
local point, anchor, secondaryPoint, x, y = split(delim, anchorString)
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
else
|
||||
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
end
|
||||
|
||||
local function OnDragStart(self)
|
||||
@@ -128,18 +126,18 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
local x, y, point = E:CalculateMoverPoints(self)
|
||||
self:ClearAllPoints()
|
||||
local overridePoint
|
||||
if(self.positionOverride) then
|
||||
if(self.positionOverride == "BOTTOM" or self.positionOverride == "TOP") then
|
||||
if self.positionOverride then
|
||||
if (self.positionOverride == "BOTTOM" or self.positionOverride == "TOP") then
|
||||
overridePoint = "BOTTOM"
|
||||
else
|
||||
overridePoint = "BOTTOMLEFT"
|
||||
end
|
||||
end
|
||||
|
||||
self:SetPoint(self.positionOverride or point, E.UIParent, overridePoint and overridePoint or point, x, y)
|
||||
if(self.positionOverride) then
|
||||
E:Point(self, self.positionOverride or point, E.UIParent, overridePoint and overridePoint or point, x, y)
|
||||
if self.positionOverride then
|
||||
self.parent:ClearAllPoints()
|
||||
self.parent:SetPoint(self.positionOverride, self, self.positionOverride)
|
||||
E:Point(self.parent, self.positionOverride, self, self.positionOverride)
|
||||
end
|
||||
|
||||
E:SaveMoverPosition(name)
|
||||
@@ -214,7 +212,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
|
||||
parent.mover = f
|
||||
|
||||
parent:ClearAllPoints()
|
||||
parent:SetPoint(point, f, 0, 0)
|
||||
E:Point(parent, point, f, 0, 0)
|
||||
|
||||
if postdrag ~= nil and type(postdrag) == "function" then
|
||||
f:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
@@ -413,7 +411,7 @@ function E:ResetMovers(arg)
|
||||
local f = _G[name]
|
||||
local point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"])
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
|
||||
for key, value in pairs(E.CreatedMovers[name]) do
|
||||
if key == "postdrag" and type(value) == "function" then
|
||||
@@ -430,7 +428,7 @@ function E:ResetMovers(arg)
|
||||
local f = _G[name]
|
||||
local point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"])
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
|
||||
if self.db.movers then
|
||||
self.db.movers[name] = nil
|
||||
@@ -468,11 +466,11 @@ function E:SetMoversPositions()
|
||||
end
|
||||
point, anchor, secondaryPoint, x, y = split(delim, anchorString)
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
elseif f then
|
||||
point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"])
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint(point, anchor, secondaryPoint, x, y)
|
||||
E:Point(f, point, anchor, secondaryPoint, x, y)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -35,11 +35,10 @@ function D:Initialize()
|
||||
E:CreateBackdrop(self.statusBar, "Default")
|
||||
self.statusBar:SetStatusBarTexture(E.media.normTex)
|
||||
self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15)
|
||||
self.statusBar:SetWidth(250)
|
||||
self.statusBar:SetWidth(18)
|
||||
E:Size(self.statusBar, 250, 18)
|
||||
self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(self.statusBar.text)
|
||||
self.statusBar.text:SetPoint("CENTER", 0, 0)
|
||||
E:Point(self.statusBar.text, "CENTER", 0, 0)
|
||||
self.statusBar:Hide()
|
||||
end
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ function E:DropDown(list, frame, xOffset, yOffset)
|
||||
|
||||
frame.buttons[i].text = frame.buttons[i]:CreateFontString(nil, "BORDER")
|
||||
frame.buttons[i].text:SetAllPoints()
|
||||
frame.buttons[i].text:FontTemplate()
|
||||
E:FontTemplate(frame.buttons[i].text)
|
||||
frame.buttons[i].text:SetJustifyH("LEFT")
|
||||
|
||||
frame.buttons[i]:SetScript("OnEnter", OnEnter)
|
||||
@@ -62,28 +62,26 @@ function E:DropDown(list, frame, xOffset, yOffset)
|
||||
end
|
||||
|
||||
frame.buttons[i]:Show()
|
||||
frame.buttons[i]:SetHeight(BUTTON_HEIGHT)
|
||||
frame.buttons[i]:SetWidth(BUTTON_WIDTH)
|
||||
E:Size(frame.buttons[i], BUTTON_WIDTH, BUTTON_HEIGHT)
|
||||
frame.buttons[i].text:SetText(list[i].text)
|
||||
frame.buttons[i].func = list[i].func
|
||||
frame.buttons[i]:SetScript("OnClick", OnClick)
|
||||
|
||||
if i == 1 then
|
||||
frame.buttons[i]:SetPoint("TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING)
|
||||
E:Point(frame.buttons[i], "TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING)
|
||||
else
|
||||
frame.buttons[i]:SetPoint("TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT")
|
||||
E:Point(frame.buttons[i], "TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT")
|
||||
end
|
||||
end
|
||||
|
||||
frame:SetHeight((getn(list) * BUTTON_HEIGHT) + PADDING * 2)
|
||||
frame:SetWidth(BUTTON_WIDTH + PADDING * 2)
|
||||
E:Size(frame, BUTTON_WIDTH + PADDING * 2, (getn(list) * BUTTON_HEIGHT) + PADDING * 2)
|
||||
|
||||
local UIScale = UIParent:GetScale()
|
||||
local x, y = GetCursorPosition()
|
||||
x = x/UIScale
|
||||
y = y/UIScale
|
||||
frame:ClearAllPoints()
|
||||
frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset)
|
||||
E:Point(frame, "TOPLEFT", UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset)
|
||||
|
||||
ToggleFrame(frame)
|
||||
end
|
||||
@@ -8,7 +8,7 @@ local LSM = LibStub("LibSharedMedia-3.0");
|
||||
local SetCVar = SetCVar
|
||||
|
||||
local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)
|
||||
if(not obj) then return end
|
||||
if not obj then return end
|
||||
|
||||
obj:SetFont(font, size, style)
|
||||
if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) end
|
||||
|
||||
+46
-58
@@ -34,9 +34,8 @@ local MAX_PAGE = 8
|
||||
|
||||
local function FCF_ResetChatWindows()
|
||||
ChatFrame1:ClearAllPoints()
|
||||
ChatFrame1:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95)
|
||||
ChatFrame1:SetWidth(430)
|
||||
ChatFrame1:SetHeight(120)
|
||||
E:Point(ChatFrame1, "BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95)
|
||||
E:Size(ChatFrame1, 430, 120)
|
||||
ChatFrame1.isInitialized = 0
|
||||
FCF_SetButtonSide(ChatFrame1, "left")
|
||||
FCF_SetChatWindowFontSize(ChatFrame1, 14)
|
||||
@@ -119,10 +118,10 @@ local function SetupChat()
|
||||
-- move general bottom left
|
||||
if i == 1 then
|
||||
frame:ClearAllPoints()
|
||||
frame:SetPoint("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3)
|
||||
E:Point(frame, "BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3)
|
||||
elseif i == 3 then
|
||||
frame:ClearAllPoints()
|
||||
frame:SetPoint("BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3)
|
||||
E:Point(frame, "BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3)
|
||||
end
|
||||
|
||||
FCF_StopDragging(frame)
|
||||
@@ -710,8 +709,7 @@ local function ResetAll()
|
||||
ElvUIInstallFrame.Desc1:SetText("")
|
||||
ElvUIInstallFrame.Desc2:SetText("")
|
||||
ElvUIInstallFrame.Desc3:SetText("")
|
||||
ElvUIInstallFrame:SetWidth(550)
|
||||
ElvUIInstallFrame:SetHeight(400)
|
||||
E:Size(ElvUIInstallFrame, 550, 400)
|
||||
end
|
||||
|
||||
local function SetPage(PageNum)
|
||||
@@ -830,8 +828,7 @@ local function SetPage(PageNum)
|
||||
InstallOption1Button:Show()
|
||||
InstallOption1Button:SetScript("OnClick", InstallComplete)
|
||||
InstallOption1Button:SetText(L["Finished"])
|
||||
ElvUIInstallFrame:SetWidth(550)
|
||||
ElvUIInstallFrame:SetHeight(350)
|
||||
E:Size(ElvUIInstallFrame, 550, 350)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -853,9 +850,8 @@ end
|
||||
function E:Install()
|
||||
if not InstallStepComplete then
|
||||
local imsg = CreateFrame("Frame", "InstallStepComplete", E.UIParent)
|
||||
imsg:SetWidth(418)
|
||||
imsg:SetHeight(72)
|
||||
imsg:SetPoint("TOP", 0, -190)
|
||||
E:Size(imsg, 418, 72)
|
||||
E:Point(imsg, "TOP", 0, -190)
|
||||
imsg:Hide()
|
||||
imsg:SetScript("OnShow", function()
|
||||
if this.message then
|
||||
@@ -873,7 +869,7 @@ function E:Install()
|
||||
|
||||
imsg.text = imsg:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE")
|
||||
imsg.text:SetPoint("BOTTOM", 0, 16)
|
||||
E:Point(imsg.text, "BOTTOM", 0, 16)
|
||||
imsg.text:SetTextColor(1, 0.82, 0)
|
||||
imsg.text:SetJustifyH("CENTER")
|
||||
end
|
||||
@@ -881,23 +877,21 @@ function E:Install()
|
||||
if not ElvUIInstallFrame then
|
||||
local f = CreateFrame("Button", "ElvUIInstallFrame", E.UIParent)
|
||||
f.SetPage = SetPage
|
||||
f:SetWidth(550)
|
||||
f:SetHeight(400)
|
||||
E:Size(f, 550, 400)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
f:SetPoint("CENTER", 0, 0)
|
||||
E:Point(f, "CENTER", 0, 0)
|
||||
f:SetFrameStrata("TOOLTIP")
|
||||
|
||||
f.Title = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Title, nil, 17, nil)
|
||||
f.Title:SetPoint("TOP", 0, -5)
|
||||
E:Point(f.Title, "TOP", 0, -5)
|
||||
f.Title:SetText(L["ElvUI Installation"])
|
||||
|
||||
f.Next = CreateFrame("Button", "InstallNextButton", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Next)
|
||||
E:SetTemplate(f.Next, "Default", true)
|
||||
f.Next:SetWidth(110)
|
||||
f.Next:SetHeight(25)
|
||||
f.Next:SetPoint("BOTTOMRIGHT", -5, 5)
|
||||
E:Size(f.Next, 110, 25)
|
||||
E:Point(f.Next, "BOTTOMRIGHT", -5, 5)
|
||||
f.Next:SetText(CONTINUE)
|
||||
f.Next:Disable()
|
||||
f.Next:SetScript("OnClick", NextPage)
|
||||
@@ -906,9 +900,8 @@ function E:Install()
|
||||
f.Prev = CreateFrame("Button", "InstallPrevButton", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Prev)
|
||||
E:SetTemplate(f.Prev, "Default", true)
|
||||
f.Prev:SetWidth(110)
|
||||
f.Prev:SetHeight(25)
|
||||
f.Prev:SetPoint("BOTTOMLEFT", 5, 5)
|
||||
E:Size(f.Prev, 110, 25)
|
||||
E:Point(f.Prev, "BOTTOMLEFT", 5, 5)
|
||||
f.Prev:SetText(PREV)
|
||||
f.Prev:Disable()
|
||||
f.Prev:SetScript("OnClick", PreviousPage)
|
||||
@@ -920,8 +913,8 @@ function E:Install()
|
||||
f.Status:SetStatusBarTexture(E["media"].normTex)
|
||||
E:RegisterStatusBar(f.Status)
|
||||
f.Status:SetMinMaxValues(0, MAX_PAGE)
|
||||
f.Status:SetPoint("TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
|
||||
f.Status:SetPoint("BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
|
||||
E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
|
||||
E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
|
||||
|
||||
f.Status.anim = CreateAnimationGroup(f.Status)
|
||||
f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress")
|
||||
@@ -930,90 +923,85 @@ function E:Install()
|
||||
|
||||
f.Status.text = f.Status:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Status.text)
|
||||
f.Status.text:SetPoint("CENTER", 0, 0)
|
||||
E:Point(f.Status.text, "CENTER", 0, 0)
|
||||
f.Status.text:SetText(format("%d / %d", CURRENT_PAGE, MAX_PAGE))
|
||||
|
||||
f.Option1 = CreateFrame("Button", "InstallOption1Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option1)
|
||||
f.Option1:SetWidth(160)
|
||||
f.Option1:SetHeight(30)
|
||||
f.Option1:SetPoint("BOTTOM", 0, 45)
|
||||
E:Size(f.Option1, 160, 30)
|
||||
E:Point(f.Option1, "BOTTOM", 0, 45)
|
||||
f.Option1:SetText("")
|
||||
f.Option1:Hide()
|
||||
E.Skins:HandleButton(f.Option1, true)
|
||||
|
||||
f.Option2 = CreateFrame("Button", "InstallOption2Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option2)
|
||||
f.Option2:SetWidth(110)
|
||||
f.Option2:SetHeight(30)
|
||||
f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45)
|
||||
E:Size(f.Option2, 110, 30)
|
||||
E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45)
|
||||
f.Option2:SetText("")
|
||||
f.Option2:Hide()
|
||||
f.Option2:SetScript("OnShow", function() f.Option1:SetWidth(110) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) end)
|
||||
f.Option2:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) end)
|
||||
f.Option2:SetScript("OnShow", function() E:Width(f.Option1, 110) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end)
|
||||
f.Option2:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) end)
|
||||
E.Skins:HandleButton(f.Option2, true)
|
||||
|
||||
f.Option3 = CreateFrame("Button", "InstallOption3Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option3)
|
||||
f.Option3:SetWidth(110)
|
||||
f.Option3:SetHeight(30)
|
||||
f.Option3:SetPoint("LEFT", f.Option2, "RIGHT", 4, 0)
|
||||
E:Size(f.Option3, 110, 30)
|
||||
E:Point(f.Option3, "LEFT", f.Option2, "RIGHT", 4, 0)
|
||||
f.Option3:SetText("")
|
||||
f.Option3:Hide()
|
||||
f.Option3:SetScript("OnShow", function() f.Option1:SetWidth(100) f.Option1:ClearAllPoints() f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0) f.Option2:SetWidth(100) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOM", f, "BOTTOM", 0, 45) end)
|
||||
f.Option3:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) f.Option2:SetWidth(110) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
f.Option3:SetScript("OnShow", function() E:Width(f.Option1, 100) f.Option1:ClearAllPoints() E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0) E:Width(f.Option2, 100) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOM", f, "BOTTOM", 0, 45) end)
|
||||
f.Option3:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) E:Width(f.Option2, 110) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
E.Skins:HandleButton(f.Option3, true)
|
||||
|
||||
f.Option4 = CreateFrame("Button", "InstallOption4Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option4)
|
||||
f.Option4:SetWidth(110)
|
||||
f.Option4:SetHeight(30)
|
||||
f.Option4:SetPoint("LEFT", f.Option3, "RIGHT", 4, 0)
|
||||
E:Size(f.Option4, 110, 30)
|
||||
E:Point(f.Option4, "LEFT", f.Option3, "RIGHT", 4, 0)
|
||||
f.Option4:SetText("")
|
||||
f.Option4:Hide()
|
||||
f.Option4:SetScript("OnShow", function()
|
||||
f.Option1:SetWidth(100)
|
||||
f.Option2:SetWidth(100)
|
||||
E:Width(f.Option1, 100)
|
||||
E:Width(f.Option2, 100)
|
||||
|
||||
f.Option1:ClearAllPoints()
|
||||
f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0)
|
||||
E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0)
|
||||
f.Option2:ClearAllPoints()
|
||||
f.Option2:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45)
|
||||
E:Point(f.Option2, "BOTTOMRIGHT", f, "BOTTOM", -4, 45)
|
||||
end)
|
||||
f.Option4:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) f.Option2:SetWidth(110) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
f.Option4:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) E:Width(f.Option2, 110) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
E.Skins:HandleButton(f.Option4, true)
|
||||
|
||||
f.SubTitle = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.SubTitle, nil, 15, nil)
|
||||
f.SubTitle:SetPoint("TOP", 0, -40)
|
||||
E:Point(f.SubTitle, "TOP", 0, -40)
|
||||
|
||||
f.Desc1 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc1)
|
||||
f.Desc1:SetPoint("TOPLEFT", 20, -75)
|
||||
f.Desc1:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc1, "TOPLEFT", 20, -75)
|
||||
E:Width(f.Desc1, f:GetWidth() - 40)
|
||||
|
||||
f.Desc2 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc2)
|
||||
f.Desc2:SetPoint("TOPLEFT", 20, -125)
|
||||
f.Desc2:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc2, "TOPLEFT", 20, -125)
|
||||
E:Width(f.Desc2, f:GetWidth() - 40)
|
||||
|
||||
f.Desc3 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc3)
|
||||
f.Desc3:SetPoint("TOPLEFT", 20, -175)
|
||||
f.Desc3:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc3, "TOPLEFT", 20, -175)
|
||||
E:Width(f.Desc3, f:GetWidth() - 40)
|
||||
|
||||
local close = CreateFrame("Button", "InstallCloseButton", f, "UIPanelCloseButton")
|
||||
close:SetPoint("TOPRIGHT", f, "TOPRIGHT")
|
||||
E:Point(close, "TOPRIGHT", f, "TOPRIGHT")
|
||||
close:SetScript("OnClick", function()
|
||||
f:Hide()
|
||||
end)
|
||||
E.Skins:HandleCloseButton(close)
|
||||
|
||||
f.tutorialImage = f:CreateTexture("InstallTutorialImage", "OVERLAY")
|
||||
f.tutorialImage:SetWidth(256)
|
||||
f.tutorialImage:SetHeight(128)
|
||||
E:Size(f.tutorialImage, 256, 128)
|
||||
f.tutorialImage:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo.tga")
|
||||
f.tutorialImage:SetPoint("BOTTOM", 0, 70)
|
||||
E:Point(f.tutorialImage, "BOTTOM", 0, 70)
|
||||
|
||||
end
|
||||
|
||||
|
||||
+44
-46
@@ -2,12 +2,12 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, Profi
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local abs, floor, min, max = math.abs, math.floor, math.min, math.max;
|
||||
local match = string.match;
|
||||
local abs, floor, min, max = math.abs, math.floor, math.min, math.max
|
||||
local match = string.match
|
||||
--WoW API / Variables
|
||||
local IsMacClient = IsMacClient;
|
||||
local GetCVar, SetCVar = GetCVar, SetCVar;
|
||||
local GetScreenHeight, GetScreenWidth = GetScreenHeight, GetScreenWidth;
|
||||
local IsMacClient = IsMacClient
|
||||
local GetCVar, SetCVar = GetCVar, SetCVar
|
||||
local GetScreenHeight, GetScreenWidth = GetScreenHeight, GetScreenWidth
|
||||
|
||||
local scale
|
||||
|
||||
@@ -17,56 +17,56 @@ function E:UIScale(event)
|
||||
self.screenwidth = self.global.screenwidth
|
||||
end
|
||||
|
||||
if(GetCVar("UIScale")) then
|
||||
self.global.uiScale = GetCVar("UIScale");
|
||||
if GetCVar("UIScale") then
|
||||
self.global.uiScale = GetCVar("UIScale")
|
||||
end
|
||||
|
||||
local minScale = self.global.general.minUiScale or 0.64;
|
||||
if(self.global.general.autoScale) then
|
||||
scale = max(minScale, min(1.00, 768/self.screenheight));
|
||||
local minScale = self.global.general.minUiScale or 0.64
|
||||
if self.global.general.autoScale then
|
||||
scale = max(minScale, min(1.00, 768/self.screenheight))
|
||||
else
|
||||
scale = max(minScale, min(1.00, self.global.uiScale or UIParent:GetScale() or 768/self.screenheight));
|
||||
scale = max(minScale, min(1.00, self.global.uiScale or UIParent:GetScale() or 768/self.screenheight))
|
||||
end
|
||||
|
||||
if self.screenwidth < 1600 then
|
||||
self.lowversion = true;
|
||||
self.lowversion = true
|
||||
elseif self.screenwidth >= 3840 and self.global.general.eyefinity then
|
||||
local width = self.screenwidth;
|
||||
local height = self.screenheight;
|
||||
local width = self.screenwidth
|
||||
local height = self.screenheight
|
||||
|
||||
-- because some user enable bezel compensation, we need to find the real width of a single monitor.
|
||||
-- I don't know how it really work, but i'm assuming they add pixel to width to compensate the bezel. :P
|
||||
|
||||
-- HQ resolution
|
||||
if width >= 9840 then width = 3280; end -- WQSXGA
|
||||
if width >= 7680 and width < 9840 then width = 2560; end -- WQXGA
|
||||
if width >= 5760 and width < 7680 then width = 1920; end -- WUXGA & HDTV
|
||||
if width >= 5040 and width < 5760 then width = 1680; end -- WSXGA+
|
||||
if width >= 7680 and width < 9840 then width = 2560 end -- WQXGA
|
||||
if width >= 5760 and width < 7680 then width = 1920 end -- WUXGA & HDTV
|
||||
if width >= 5040 and width < 5760 then width = 1680 end -- WSXGA+
|
||||
|
||||
-- adding height condition here to be sure it work with bezel compensation because WSXGA+ and UXGA/HD+ got approx same width
|
||||
if width >= 4800 and width < 5760 and height == 900 then width = 1600; end -- UXGA & HD+
|
||||
if width >= 4800 and width < 5760 and height == 900 then width = 1600 end -- UXGA & HD+
|
||||
|
||||
-- low resolution screen
|
||||
if width >= 4320 and width < 4800 then width = 1440; end -- WSXGA
|
||||
if width >= 4080 and width < 4320 then width = 1360; end -- WXGA
|
||||
if width >= 3840 and width < 4080 then width = 1224; end -- SXGA & SXGA (UVGA) & WXGA & HDTV
|
||||
if width >= 4320 and width < 4800 then width = 1440 end -- WSXGA
|
||||
if width >= 4080 and width < 4320 then width = 1360 end -- WXGA
|
||||
if width >= 3840 and width < 4080 then width = 1224 end -- SXGA & SXGA (UVGA) & WXGA & HDTV
|
||||
|
||||
-- yep, now set ElvUI to lower resolution if screen #1 width < 1600
|
||||
if width < 1600 then
|
||||
self.lowversion = true;
|
||||
self.lowversion = true
|
||||
end
|
||||
|
||||
-- register a constant, we will need it later for launch.lua
|
||||
self.eyefinity = width;
|
||||
self.eyefinity = width
|
||||
end
|
||||
|
||||
self.mult = 768/match(GetCVar("gxResolution"), "%d+x(%d+)")/scale;
|
||||
self.Spacing = self.PixelMode and 0 or self.mult;
|
||||
self.Border = (self.PixelMode and self.mult or self.mult*2);
|
||||
self.mult = 768/match(GetCVar("gxResolution"), "%d+x(%d+)")/scale
|
||||
self.Spacing = self.PixelMode and 0 or self.mult
|
||||
self.Border = (self.PixelMode and self.mult or self.mult*2)
|
||||
--Set UIScale, NOTE: SetCVar for UIScale can cause taints so only do this when we need to..
|
||||
if E.Round and E:Round(UIParent:GetScale(), 5) ~= E:Round(scale, 5) and (event == "PLAYER_LOGIN") then
|
||||
SetCVar("UseUIScale", 1);
|
||||
SetCVar("UIScale", scale);
|
||||
SetCVar("UseUIScale", 1)
|
||||
SetCVar("UIScale", scale)
|
||||
WorldMapFrame.hasTaint = true;
|
||||
end
|
||||
|
||||
@@ -78,21 +78,20 @@ function E:UIScale(event)
|
||||
|
||||
--Resize self.UIParent if Eyefinity is on.
|
||||
if self.eyefinity then
|
||||
local width = self.eyefinity;
|
||||
local height = self.screenheight;
|
||||
local width = self.eyefinity
|
||||
local height = self.screenheight
|
||||
|
||||
-- if autoscale is off, find a new width value of self.UIParent for screen #1.
|
||||
if not self.global.general.autoScale or height > 1200 then
|
||||
local h = UIParent:GetHeight();
|
||||
local ratio = self.screenheight / h;
|
||||
local w = self.eyefinity / ratio;
|
||||
local h = UIParent:GetHeight()
|
||||
local ratio = self.screenheight / h
|
||||
local w = self.eyefinity / ratio
|
||||
|
||||
width = w;
|
||||
height = h;
|
||||
width = w
|
||||
height = h
|
||||
end
|
||||
|
||||
self.UIParent:SetWidth(width);
|
||||
self.UIParent:SetHeight(height);
|
||||
E:Size(self.UIParent, width, height)
|
||||
else
|
||||
--[[Eyefinity Test mode
|
||||
Resize the E.UIParent to be smaller than it should be, all objects inside should relocate.
|
||||
@@ -100,17 +99,16 @@ function E:UIScale(event)
|
||||
]]
|
||||
--self.UIParent:SetSize(UIParent:GetWidth() - 250, UIParent:GetHeight() - 250);
|
||||
|
||||
self.UIParent:SetWidth(GetScreenWidth());
|
||||
self.UIParent:SetHeight(GetScreenHeight());
|
||||
E:Size(self.UIParent, GetScreenWidth(), GetScreenHeight())
|
||||
end
|
||||
|
||||
self.UIParent:ClearAllPoints();
|
||||
self.UIParent:SetPoint("CENTER", UIParent);
|
||||
self.UIParent:ClearAllPoints()
|
||||
E:Point(self.UIParent, "CENTER", UIParent)
|
||||
|
||||
self.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft()));
|
||||
self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight()));
|
||||
self.diffGetTop = E:Round(abs(UIParent:GetTop() - self.UIParent:GetTop()));
|
||||
self.diffGetBottom = E:Round(abs(UIParent:GetBottom() - self.UIParent:GetBottom()));
|
||||
self.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft()))
|
||||
self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight()))
|
||||
self.diffGetTop = E:Round(abs(UIParent:GetTop() - self.UIParent:GetTop()))
|
||||
self.diffGetBottom = E:Round(abs(UIParent:GetBottom() - self.UIParent:GetBottom()))
|
||||
|
||||
local change
|
||||
if E.Round then
|
||||
@@ -129,5 +127,5 @@ end
|
||||
|
||||
-- pixel perfect script of custom ui scale.
|
||||
function E:Scale(x)
|
||||
return self.mult*floor(x/self.mult+.5);
|
||||
return self.mult*floor(x/self.mult+.5)
|
||||
end
|
||||
@@ -93,8 +93,7 @@ local function ResetAll()
|
||||
f.Desc2:SetText("")
|
||||
f.Desc3:SetText("")
|
||||
f.Desc4:SetText("")
|
||||
f:SetWidth(550)
|
||||
f:SetHeight(400)
|
||||
E:Size(f, 550, 400)
|
||||
if f.StepTitles then
|
||||
for i = 1, getn(f.side.Lines) do f.side.Lines[i].text:SetText("") end
|
||||
end
|
||||
@@ -155,9 +154,8 @@ end
|
||||
|
||||
function PI:CreateStepComplete()
|
||||
local imsg = CreateFrame("Frame", "PluginInstallStepComplete", E.UIParent)
|
||||
imsg:SetWidth(418)
|
||||
imsg:SetHeight(72)
|
||||
imsg:SetPoint("TOP", 0, -190)
|
||||
E:Size(imsg, 418, 72)
|
||||
E:Point(imsg, "TOP", 0, -190)
|
||||
imsg:Hide()
|
||||
imsg:SetScript("OnShow", function(self)
|
||||
if self.message then
|
||||
@@ -175,31 +173,28 @@ function PI:CreateStepComplete()
|
||||
|
||||
imsg.bg = imsg:CreateTexture(nil, "BACKGROUND")
|
||||
imsg.bg:SetTexture([[Interface\LevelUp\LevelUpTex]])
|
||||
imsg.bg:SetPoint("BOTTOM", 0, 0)
|
||||
imsg.bg:SetWidth(326)
|
||||
imsg.bg:SetHeight(103)
|
||||
E:Point(imsg.bg, "BOTTOM", 0, 0)
|
||||
E:Size(imsg.bg, 326, 103)
|
||||
imsg.bg:SetTexCoord(0.00195313, 0.63867188, 0.03710938, 0.23828125)
|
||||
imsg.bg:SetVertexColor(1, 1, 1, 0.6)
|
||||
|
||||
imsg.lineTop = imsg:CreateTexture(nil, "BACKGROUND")
|
||||
imsg.lineTop:SetDrawLayer("BACKGROUND", 2)
|
||||
imsg.lineTop:SetTexture([[Interface\LevelUp\LevelUpTex]])
|
||||
imsg.lineTop:SetPoint("TOP", 0, 0)
|
||||
imsg.lineTop:SetWidth(418)
|
||||
imsg.lineTop:SetHeight(7)
|
||||
E:Point(imsg.lineTop, "TOP", 0, 0)
|
||||
E:Size(imsg.lineTop, 418, 7)
|
||||
imsg.lineTop:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
|
||||
|
||||
imsg.lineBottom = imsg:CreateTexture(nil, "BACKGROUND")
|
||||
imsg.lineBottom:SetDrawLayer("BACKGROUND", 2)
|
||||
imsg.lineBottom:SetTexture([[Interface\LevelUp\LevelUpTex]])
|
||||
imsg.lineBottom:SetPoint("BOTTOM", 0, 0)
|
||||
imsg.lineBottom:SetWidth(418)
|
||||
imsg.lineBottom:SetHeight(7)
|
||||
E:Point(imsg.lineBottom, "BOTTOM", 0, 0)
|
||||
E:Size(imsg.lineBottom, 418, 7)
|
||||
imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
|
||||
|
||||
imsg.text = imsg:CreateFontString(nil, "ARTWORK")
|
||||
E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE")
|
||||
imsg.text:SetPoint("BOTTOM", 0, 12)
|
||||
E:Point(imsg.text, "BOTTOM", 0, 12)
|
||||
imsg.text:SetTextColor(1, 0.82, 0)
|
||||
imsg.text:SetJustifyH("CENTER")
|
||||
end
|
||||
@@ -207,22 +202,20 @@ end
|
||||
function PI:CreateFrame()
|
||||
f = CreateFrame("Button", "PluginInstallFrame", E.UIParent)
|
||||
f.SetPage = SetPage
|
||||
f:SetWidth(550)
|
||||
f:SetHeight(400)
|
||||
E:Size(f, 550, 400)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
f:SetPoint("CENTER", 0, 0)
|
||||
E:Point(f, "CENTER", 0, 0)
|
||||
f:SetFrameStrata("TOOLTIP")
|
||||
|
||||
f.Title = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Title, nil, 17, nil)
|
||||
f.Title:SetPoint("TOP", 0, -5)
|
||||
E:Point(f.Title, "TOP", 0, -5)
|
||||
|
||||
f.Next = CreateFrame("Button", "PluginInstallNextButton", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Next)
|
||||
E:SetTemplate(f.Next, "Default", true)
|
||||
f.Next:SetWidth(110)
|
||||
f.Next:SetHeight(25)
|
||||
f.Next:SetPoint("BOTTOMRIGHT", -5, 5)
|
||||
E:Size(f.Next, 110, 25)
|
||||
E:Point(f.Next, "BOTTOMRIGHT", -5, 5)
|
||||
f.Next:SetText(CONTINUE)
|
||||
f.Next:Disable()
|
||||
f.Next:SetScript("OnClick", NextPage)
|
||||
@@ -231,9 +224,8 @@ function PI:CreateFrame()
|
||||
f.Prev = CreateFrame("Button", "PluginInstallPrevButton", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Prev)
|
||||
E:SetTemplate(f.Prev, "Default", true)
|
||||
f.Prev:SetWidth(110)
|
||||
f.Prev:SetHeight(25)
|
||||
f.Prev:SetPoint("BOTTOMLEFT", 5, 5)
|
||||
E:Size(f.Prev, 110, 25)
|
||||
E:Point(f.Prev, "BOTTOMLEFT", 5, 5)
|
||||
f.Prev:SetText(PREV)
|
||||
f.Prev:Disable()
|
||||
f.Prev:SetScript("OnClick", PreviousPage)
|
||||
@@ -244,8 +236,8 @@ function PI:CreateFrame()
|
||||
E:CreateBackdrop(f.Status, "Default", true)
|
||||
f.Status:SetStatusBarTexture(E["media"].normTex)
|
||||
f.Status:SetStatusBarColor(unpack(E["media"].rgbvaluecolor))
|
||||
f.Status:SetPoint("TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
|
||||
f.Status:SetPoint("BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
|
||||
E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
|
||||
E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
|
||||
-- Setup StatusBar Animation
|
||||
f.Status.anim = CreateAnimationGroup(f.Status)
|
||||
f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress")
|
||||
@@ -254,94 +246,89 @@ function PI:CreateFrame()
|
||||
|
||||
f.Status.text = f.Status:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Status.text)
|
||||
f.Status.text:SetPoint("CENTER", 0, 0)
|
||||
E:Point(f.Status.text, "CENTER", 0, 0)
|
||||
|
||||
f.Option1 = CreateFrame("Button", "PluginInstallOption1Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option1)
|
||||
f.Option1:SetWidth(160)
|
||||
f.Option1:SetHeight(30)
|
||||
f.Option1:SetPoint("BOTTOM", 0, 45)
|
||||
E:Size(f.Option1, 160, 30)
|
||||
E:Point(f.Option1, "BOTTOM", 0, 45)
|
||||
f.Option1:SetText("")
|
||||
f.Option1:Hide()
|
||||
E.Skins:HandleButton(f.Option1, true)
|
||||
|
||||
f.Option2 = CreateFrame("Button", "PluginInstallOption2Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option2)
|
||||
f.Option2:SetWidth(160)
|
||||
f.Option2:SetHeight(30)
|
||||
f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45)
|
||||
E:Size(f.Option2, 160, 30)
|
||||
E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45)
|
||||
f.Option2:SetText("")
|
||||
f.Option2:Hide()
|
||||
f.Option2:SetScript("OnShow", function() f.Option1:SetWidth(110); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) end)
|
||||
f.Option2:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45) end)
|
||||
f.Option2:SetScript("OnShow", function() E:Width(f.Option1, 110); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end)
|
||||
f.Option2:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45) end)
|
||||
E.Skins:HandleButton(f.Option2, true)
|
||||
|
||||
f.Option3 = CreateFrame("Button", "PluginInstallOption3Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option3)
|
||||
f.Option3:SetWidth(100)
|
||||
f.Option3:SetHeight(30)
|
||||
f.Option3:SetPoint("LEFT", f.Option2, "RIGHT", 4, 0)
|
||||
E:Size(f.Option3, 100, 30)
|
||||
E:Point(f.Option3, "LEFT", f.Option2, "RIGHT", 4, 0)
|
||||
f.Option3:SetText("")
|
||||
f.Option3:Hide()
|
||||
f.Option3:SetScript("OnShow", function() f.Option1:SetWidth(100); f.Option1:ClearAllPoints(); f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0); f.Option2:SetWidth(100); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOM", f, "BOTTOM", 0, 45) end)
|
||||
f.Option3:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45); f.Option2:SetWidth(110); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
f.Option3:SetScript("OnShow", function() E:Width(f.Option1, 100); f.Option1:ClearAllPoints(); E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0); E:Width(f.Option2, 100); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOM", f, "BOTTOM", 0, 45) end)
|
||||
f.Option3:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45); E:Width(f.Option2, 110); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
E.Skins:HandleButton(f.Option3, true)
|
||||
|
||||
f.Option4 = CreateFrame("Button", "PluginInstallOption4Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option4)
|
||||
f.Option4:SetWidth(100)
|
||||
f.Option4:SetHeight(30)
|
||||
f.Option4:SetPoint("LEFT", f.Option3, "RIGHT", 4, 0)
|
||||
E:Size(f.Option4, 100, 30)
|
||||
E:Point(f.Option4, "LEFT", f.Option3, "RIGHT", 4, 0)
|
||||
f.Option4:SetText("")
|
||||
f.Option4:Hide()
|
||||
f.Option4:SetScript("OnShow", function()
|
||||
f.Option1:SetWidth(100)
|
||||
f.Option2:SetWidth(100)
|
||||
E:Width(f.Option1, 100)
|
||||
E:Width(f.Option2, 100)
|
||||
|
||||
f.Option1:ClearAllPoints();
|
||||
f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0);
|
||||
E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0);
|
||||
f.Option2:ClearAllPoints();
|
||||
f.Option2:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45)
|
||||
E:Point(f.Option2, "BOTTOMRIGHT", f, "BOTTOM", -4, 45)
|
||||
end)
|
||||
f.Option4:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45); f.Option2:SetWidth(110); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
f.Option4:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45); E:Width(f.Option2, 110); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end)
|
||||
E.Skins:HandleButton(f.Option4, true)
|
||||
|
||||
f.SubTitle = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.SubTitle, nil, 15, nil)
|
||||
f.SubTitle:SetPoint("TOP", 0, -40)
|
||||
E:Point(f.SubTitle, "TOP", 0, -40)
|
||||
|
||||
f.Desc1 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc1)
|
||||
f.Desc1:SetPoint("TOPLEFT", 20, -75)
|
||||
f.Desc1:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc1, "TOPLEFT", 20, -75)
|
||||
E:Width(f.Desc1, f:GetWidth() - 40)
|
||||
|
||||
f.Desc2 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc2)
|
||||
f.Desc2:SetPoint("TOP", f.Desc1, "BOTTOM", 0, -20)
|
||||
f.Desc2:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc2, "TOP", f.Desc1, "BOTTOM", 0, -20)
|
||||
E:Width(f.Desc2, f:GetWidth() - 40)
|
||||
|
||||
f.Desc3 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc3)
|
||||
f.Desc3:SetPoint("TOP", f.Desc2, "BOTTOM", 0, -20)
|
||||
f.Desc3:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc3, "TOP", f.Desc2, "BOTTOM", 0, -20)
|
||||
E:Width(f.Desc3, f:GetWidth() - 40)
|
||||
|
||||
f.Desc4 = f:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Desc4)
|
||||
f.Desc4:SetPoint("TOP", f.Desc3, "BOTTOM", 0, -20)
|
||||
f.Desc4:SetWidth(f:GetWidth() - 40)
|
||||
E:Point(f.Desc4, "TOP", f.Desc3, "BOTTOM", 0, -20)
|
||||
E:Width(f.Desc4, f:GetWidth() - 40)
|
||||
|
||||
local close = CreateFrame("Button", "PluginInstallCloseButton", f, "UIPanelCloseButton")
|
||||
close:SetPoint("TOPRIGHT", f, "TOPRIGHT")
|
||||
E:Point(close, "TOPRIGHT", f, "TOPRIGHT")
|
||||
close:SetScript("OnClick", function() f:Hide() end)
|
||||
E.Skins:HandleCloseButton(close)
|
||||
|
||||
f.pending = CreateFrame("Frame", "PluginInstallPendingButton", f)
|
||||
f.pending:SetWidth(20)
|
||||
f.pending:SetHeight(20)
|
||||
f.pending:SetPoint("TOPLEFT", f, "TOPLEFT", 8, -8)
|
||||
E:Size(f.pending, 20)
|
||||
E:Point(f.pending, "TOPLEFT", f, "TOPLEFT", 8, -8)
|
||||
f.pending.tex = f.pending:CreateTexture(nil, "OVERLAY")
|
||||
f.pending.tex:SetPoint("TOPLEFT", f.pending, "TOPLEFT", 2, -2)
|
||||
f.pending.tex:SetPoint("BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
|
||||
E:Point(f.pending.tex, "TOPLEFT", f.pending, "TOPLEFT", 2, -2)
|
||||
E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
|
||||
f.pending.tex:SetTexture([[Interface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon]])
|
||||
E:CreateBackdrop(f.pending, "Transparent")
|
||||
f.pending:SetScript("OnEnter", function(self)
|
||||
@@ -358,17 +345,16 @@ function PI:CreateFrame()
|
||||
end)
|
||||
|
||||
f.tutorialImage = f:CreateTexture("PluginInstallTutorialImage", "OVERLAY")
|
||||
f.tutorialImage:SetWidth(256)
|
||||
f.tutorialImage:SetHeight(128)
|
||||
f.tutorialImage:SetPoint("BOTTOM", 0, 70)
|
||||
E:Size(f.tutorialImage, 256, 128)
|
||||
E:Point(f.tutorialImage, "BOTTOM", 0, 70)
|
||||
|
||||
f.side = CreateFrame("Frame", "PluginInstallTitleFrame", f)
|
||||
E:SetTemplate(f.side, "Transparent")
|
||||
f.side:SetPoint("TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
f.side:SetPoint("BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
f.side:SetWidth(140)
|
||||
E:Point(f.side, "TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
E:Point(f.side, "BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
E:Width(f.side, 140)
|
||||
f.side.text = f.side:CreateFontString(nil, "OVERLAY")
|
||||
f.side.text:SetPoint("TOP", f.side, "TOP", 0, -4)
|
||||
E:Point(f.side.text, "TOP", f.side, "TOP", 0, -4)
|
||||
f.side.text:SetFont(E["media"].normFont, 18, "OUTLINE")
|
||||
f.side.text:SetText(L["Steps"])
|
||||
f.side.Lines = {} --Table to keep shown lines
|
||||
@@ -376,15 +362,14 @@ function PI:CreateFrame()
|
||||
for i = 1, 18 do
|
||||
local button = CreateFrame("Button", nil, f)
|
||||
if i == 1 then
|
||||
button:SetPoint("TOP", f.side.text, "BOTTOM", 0, -6)
|
||||
E:Point(button, "TOP", f.side.text, "BOTTOM", 0, -6)
|
||||
else
|
||||
button:SetPoint("TOP", f.side.Lines[i - 1], "BOTTOM")
|
||||
E:Point(button, "TOP", f.side.Lines[i - 1], "BOTTOM")
|
||||
end
|
||||
button:SetWidth(130)
|
||||
button:SetHeight(BUTTON_HEIGHT)
|
||||
E:Size(button, 130, BUTTON_HEIGHT)
|
||||
button.text = button:CreateFontString(nil, "OVERLAY")
|
||||
button.text:SetPoint("TOPLEFT", button, "TOPLEFT", 2, -2)
|
||||
button.text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
|
||||
E:Point(button.text, "TOPLEFT", button, "TOPLEFT", 2, -2)
|
||||
E:Point(button.text, "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
|
||||
button.text:SetFont(E["media"].normFont, 14, "OUTLINE")
|
||||
button:SetScript("OnClick", function() if i <= f.MaxPage then SetPage(i, f.CurrentPage) end end)
|
||||
button.text:SetText("")
|
||||
@@ -439,15 +424,15 @@ function PI:RunInstall()
|
||||
f.Pages = db.Pages
|
||||
|
||||
PluginInstallFrame:Show()
|
||||
f:SetPoint("CENTER")
|
||||
E:Point(f, "CENTER")
|
||||
if db.StepTitles and getn(db.StepTitles) == f.MaxPage then
|
||||
f:SetPoint("CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0)
|
||||
f.side:SetWidth(db.StepTitleWidth or 140)
|
||||
E:Point(f, "CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0)
|
||||
E:Width(f.side, db.StepTitleWidth or 140)
|
||||
f.side:Show()
|
||||
|
||||
for i = 1, getn(f.side.Lines) do
|
||||
if db.StepTitles[i] then
|
||||
f.side.Lines[i]:SetWidth(db.StepTitleButtonWidth or 130)
|
||||
E:Width(f.side.Lines[i], db.StepTitleButtonWidth or 130)
|
||||
f.side.Lines[i].text:SetJustifyH(db.StepTitleTextJustification or "CENTER")
|
||||
f.side.Lines[i]:Show()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user