from retail

This commit is contained in:
Bunny67
2020-06-09 23:31:40 +03:00
parent 7a5876526d
commit de72394bda
32 changed files with 313 additions and 291 deletions
@@ -27,7 +27,7 @@ local colorScheme = {
[IndentationLib.tokens.TOKEN_COMMENT_LONG] = "|c0000aa00",
[IndentationLib.tokens.TOKEN_NUMBER] = "|c00ff9900",
[IndentationLib.tokens.TOKEN_STRING] = "|c00999999",
-- ellipsis, curly braces, table acces
-- ellipsis, curly braces, table access
["..."] = tableColor,
["{"] = tableColor,
["}"] = tableColor,
+10 -10
View File
@@ -875,20 +875,20 @@ local function ConstructMoverSizer(parent)
end
local regionScale = self.moving.region:GetScale()
self.text:SetText(("(%.2f, %.2f)"):format(dX*1/regionScale, dY*1/regionScale))
local midx = (distance / 2) * cos(angle)
local midy = (distance / 2) * sin(angle)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
local midX = (distance / 2) * cos(angle)
local midY = (distance / 2) * sin(angle)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midX, midY)
local left, right, top, bottom, centerX, centerY = frame:GetLeft(), frame:GetRight(), frame:GetTop(), frame:GetBottom(), frame:GetCenter()
if (midx > 0 and (self.text:GetRight() or 0) > (left or 0))
or (midx < 0 and (self.text:GetLeft() or 0) < (right or 0))
if (midX > 0 and (self.text:GetRight() or 0) > (left or 0))
or (midX < 0 and (self.text:GetLeft() or 0) < (right or 0))
then
if midy > 0 and (self.text:GetTop() or 0) > (top or 0) then
midy = midy - ((self.text:GetTop() or 0) - (bottom or 0))
elseif midy < 0 and (self.text:GetBottom() or 0) < (top or 0) then
midy = midy + ((top or 0) - (self.text:GetBottom() or 0))
if midY > 0 and (self.text:GetTop() or 0) > (top or 0) then
midY = midY - ((self.text:GetTop() or 0) - (bottom or 0))
elseif midY < 0 and (self.text:GetBottom() or 0) < (top or 0) then
midY = midY + ((top or 0) - (self.text:GetBottom() or 0))
end
end
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midX, midY)
if self.isMoving then
if mover.align then
local ctrlDown = IsControlKeyDown()
@@ -226,13 +226,13 @@ function WeakAuras.CreateFrame()
local title = CreateFrame("Frame", nil, frame)
local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
local titleText = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
titletext:SetText("WeakAuras " .. WeakAuras.versionString)
titleText:SetText("WeakAuras " .. WeakAuras.versionString)
local titlebg = CreateDecorationWide(frame, max(120, titletext:GetWidth()))
titlebg:SetPoint("TOP", 0, 24)
titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
local titleBG = CreateDecorationWide(frame, max(120, titleText:GetWidth()))
titleBG:SetPoint("TOP", 0, 24)
titleText:SetPoint("TOP", titleBG, "TOP", 0, -14)
local function commitWindowChanges()
@@ -265,8 +265,8 @@ function WeakAuras.CreateFrame()
frame:StopMovingOrSizing()
commitWindowChanges()
end)
title:SetPoint("BOTTOMLEFT", titlebg, "BOTTOMLEFT", -25, 0)
title:SetPoint("TOPRIGHT", titlebg, "TOPRIGHT", 25, 0)
title:SetPoint("BOTTOMLEFT", titleBG, "BOTTOMLEFT", -25, 0)
title:SetPoint("TOPRIGHT", titleBG, "TOPRIGHT", 25, 0)
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMLEFT")
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMRIGHT")
@@ -562,7 +562,7 @@ function WeakAuras.CreateFrame()
return status.offset, status.offset + self.scrollframe:GetHeight()
end
-- override SetScroll to make childrens visible as needed
-- override SetScroll to make children visible as needed
local oldSetScroll = buttonsScroll.SetScroll
buttonsScroll.SetScroll = function(self, value)
if self:GetScrollPos() ~= value then
@@ -329,7 +329,7 @@ local function ConstructTextEditor(frame)
local heading1 = AceGUI:Create("Heading")
heading1:SetText(L["Premade Snippets"])
heading1:SetRelativeWidth(1)
heading1:SetRelativeWidth(0.7)
frame:AddChild(heading1)
-- Iterate premade snippets and make buttons for them