Verified Commit 28b488db authored by Merathilis's avatar Merathilis

:SetPoint, :SetWidth, :SetHeight, :SetSize

parent d8011d9d
......@@ -100,8 +100,8 @@ function MER:CreateChangelog()
icon:CreateBackdrop("Transparent")
icon:Styling()
icon.bg = icon:CreateTexture(nil, "ARTWORK")
icon.bg:Point("TOPLEFT", 2, -2)
icon.bg:Point("BOTTOMRIGHT", -2, 2)
icon.bg:SetPoint("TOPLEFT", 2, -2)
icon.bg:SetPoint("BOTTOMRIGHT", -2, 2)
icon.bg:SetTexture(MER.LogoSmall)
icon.bg:SetBlendMode("ADD")
......@@ -115,7 +115,7 @@ function MER:CreateChangelog()
title.text:SetText(MER.Title.. "- ChangeLog "..format("|cff00c0fa%s|r", MER.Version))
local close = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
close:Point("BOTTOM", frame, "BOTTOM", 0, 10)
close:SetPoint("BOTTOM", frame, "BOTTOM", 0, 10)
close:SetText(CLOSE)
close:SetSize(80, 20)
close:SetScript("OnClick", function()
......
......@@ -108,8 +108,8 @@ function MER:DropDown(list, frame, MenuAnchor, FramePoint, xOffset, yOffset, par
btn.nohighlight = list[i].nohighlight
btn.text:SetJustifyH(justify or "LEFT")
btn:Show()
btn:Height(BUTTON_HEIGHT)
btn:Width(customWidth or BUTTON_WIDTH)
btn:SetHeight(BUTTON_HEIGHT)
btn:SetWidth(customWidth or BUTTON_WIDTH)
local icon = ""
if list[i].icon then
icon = "|T"..list[i].icon..":14:14:0:0:64:64:4:60:4:60|t "
......@@ -150,14 +150,14 @@ function MER:DropDown(list, frame, MenuAnchor, FramePoint, xOffset, yOffset, par
end
if i == 1 then
btn:Point("TOPLEFT", frame, "TOPLEFT", MARGIN, -PADDING)
btn:SetPoint("TOPLEFT", frame, "TOPLEFT", MARGIN, -PADDING)
else
btn:Point("TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT", 0, -((list[i-1].title or list[i].title) and TITLE_OFFSET or 0))
btn:SetPoint("TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT", 0, -((list[i-1].title or list[i].title) and TITLE_OFFSET or 0))
end
end
frame:Height((#list * BUTTON_HEIGHT) + PADDING * 2 + TitleCount * (2 * TITLE_OFFSET) - AddOffset * TITLE_OFFSET)
frame:Width(customWidth or (BUTTON_WIDTH + PADDING * 2))
frame:SetHeight((#list * BUTTON_HEIGHT) + PADDING * 2 + TitleCount * (2 * TITLE_OFFSET) - AddOffset * TITLE_OFFSET)
frame:SetWidth(customWidth or (BUTTON_WIDTH + PADDING * 2))
frame:ClearAllPoints()
if FramePoint == "CURSOR" then
......@@ -165,9 +165,9 @@ function MER:DropDown(list, frame, MenuAnchor, FramePoint, xOffset, yOffset, par
local x, y = GetCursorPosition();
x = x/UIScale
y = y/UIScale
frame:Point(MenuAnchor, UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset)
frame:SetPoint(MenuAnchor, UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset)
else
frame:Point(MenuAnchor, parent, FramePoint, xOffset, yOffset)
frame:SetPoint(MenuAnchor, parent, FramePoint, xOffset, yOffset)
end
end
ToggleFrame(frame)
......
......@@ -75,7 +75,7 @@ local function SetupChat()
if i == 3 and chatName == LOOT.." / "..TRADE then
FCF_UnDockFrame(frame)
frame:ClearAllPoints()
frame:Point("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3)
frame:SetPoint("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3)
FCF_SetWindowName(frame, LOOT)
FCF_DockFrame(frame)
if not frame.isLocked then
......
......@@ -8,7 +8,7 @@ E.PopupDialogs["MERATHILISUI_CREDITS"] = {
OnShow = function(self, data)
self.editBox:SetAutoFocus(false)
self.editBox.width = self.editBox:GetWidth()
self.editBox:Width(280)
self.editBox:SetWidth(280)
self.editBox:AddHistoryLine("text")
self.editBox.temptxt = data
self.editBox:SetText(data)
......@@ -16,7 +16,7 @@ E.PopupDialogs["MERATHILISUI_CREDITS"] = {
self.editBox:SetJustifyH("CENTER")
end,
OnHide = function(self)
self.editBox:Width(self.editBox.width or 50)
self.editBox:SetWidth(self.editBox.width or 50)
self.editBox.width = nil
self.temptxt = nil
end,
......
......@@ -28,7 +28,7 @@ function MERL:CreateChatButtons()
local ChatButton = CreateFrame("Frame", "mUIChatButton", _G["LeftChatPanel"].backdrop)
ChatButton:ClearAllPoints()
ChatButton:SetPoint("TOPLEFT", _G["LeftChatPanel"].backdrop, "TOPLEFT", 4, -8)
ChatButton:Size(13, 13)
ChatButton:SetSize(13, 13)
if E.db.chat.panelBackdrop == "HIDEBOTH" or E.db.chat.panelBackdrop == "LEFT" then
ChatButton:SetAlpha(0)
else
......@@ -104,18 +104,18 @@ function MERL:CreateSeparators()
local ltabseparator = CreateFrame('Frame', 'LeftChatTabSeparator', _G.LeftChatPanel, 'BackdropTemplate')
ltabseparator:SetFrameStrata('BACKGROUND')
ltabseparator:SetFrameLevel(_G.LeftChatPanel:GetFrameLevel() + 2)
ltabseparator:Height(1)
ltabseparator:Point('TOPLEFT', _G.LeftChatPanel, 5, -24)
ltabseparator:Point('TOPRIGHT', _G.LeftChatPanel, -5, -24)
ltabseparator:SetHeight(1)
ltabseparator:SetPoint('TOPLEFT', _G.LeftChatPanel, 5, -24)
ltabseparator:SetPoint('TOPRIGHT', _G.LeftChatPanel, -5, -24)
ltabseparator:SetTemplate('Transparent')
--Right Chat Tab Separator
local rtabseparator = CreateFrame('Frame', 'RightChatTabSeparator', _G.RightChatPanel, 'BackdropTemplate')
rtabseparator:SetFrameStrata('BACKGROUND')
rtabseparator:SetFrameLevel(_G.RightChatPanel:GetFrameLevel() + 2)
rtabseparator:Height(1)
rtabseparator:Point('TOPLEFT', _G.RightChatPanel, 5, -24)
rtabseparator:Point('TOPRIGHT', _G.RightChatPanel, -5, -24)
rtabseparator:SetHeight(1)
rtabseparator:SetPoint('TOPLEFT', _G.RightChatPanel, 5, -24)
rtabseparator:SetPoint('TOPRIGHT', _G.RightChatPanel, -5, -24)
rtabseparator:SetTemplate('Transparent')
MERL:UpdateSeperators()
......@@ -145,8 +145,8 @@ function MERL:ToggleChatPanels()
local panelHeight = E.db.chat.panelHeight
local rightHeight = E.db.chat.separateSizes and E.db.chat.panelHeightRight
_G.LeftChatMover:Height(panelHeight)
_G.RightChatMover:Height((rightHeight or panelHeight))
_G.LeftChatMover:SetHeight(panelHeight)
_G.RightChatMover:SetHeight((rightHeight or panelHeight))
end
hooksecurefunc(LO, "ToggleChatPanels", MERL.ToggleChatPanels)
......@@ -154,8 +154,8 @@ function MERL:RefreshChatMovers()
local Left = _G.LeftChatPanel:GetPoint()
local Right = _G.RightChatPanel:GetPoint()
_G.LeftChatPanel:Point(Left, _G.LeftChatMover, 0, 0)
_G.RightChatPanel:Point(Right, _G.RightChatMover, 0, 0)
_G.LeftChatPanel:SetPoint(Left, _G.LeftChatMover, 0, 0)
_G.RightChatPanel:SetPoint(Right, _G.RightChatMover, 0, 0)
end
hooksecurefunc(LO, "RefreshChatMovers", MERL.RefreshChatMovers)
......
......@@ -220,7 +220,7 @@ end
local function CreateButton(name, size)
if _G[name] then
_G[name]:Size(size)
_G[name]:SetSize(size)
_G[name].Count:FontTemplate(nil, module.db.countFontSize, "OUTLINE")
_G[name].HotKey:FontTemplate(nil, module.db.bindFontSize, "OUTLINE")
......@@ -228,7 +228,7 @@ local function CreateButton(name, size)
end
local AutoButton = CreateFrame("Button", name, E.UIParent, "SecureActionButtonTemplate")
AutoButton:Size(size)
AutoButton:SetSize(size, size)
AutoButton:StyleButton()
if not useMasque then
AutoButton:CreateBackdrop()
......@@ -240,25 +240,25 @@ local function CreateButton(name, size)
AutoButton:RegisterForClicks("AnyUp")
AutoButton.Texture = AutoButton:CreateTexture(nil, "OVERLAY", nil)
AutoButton.Texture:Point("TOPLEFT", AutoButton, "TOPLEFT", 2, -2)
AutoButton.Texture:Point("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", -2, 2)
AutoButton.Texture:SetPoint("TOPLEFT", AutoButton, "TOPLEFT", 2, -2)
AutoButton.Texture:SetPoint("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", -2, 2)
AutoButton.Texture:SetTexCoord(unpack(E.TexCoords))
AutoButton.Count = AutoButton:CreateFontString(nil, "OVERLAY")
AutoButton.Count:FontTemplate(nil, module.db.countFontSize, "OUTLINE")
AutoButton.Count:SetTextColor(1, 1, 1, 1)
AutoButton.Count:Point("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", 0, 0)
AutoButton.Count:SetPoint("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", 0, 0)
AutoButton.Count:SetJustifyH("CENTER")
AutoButton.HotKey = AutoButton:CreateFontString(nil, "OVERLAY")
AutoButton.HotKey:FontTemplate(nil, module.db.bindFontSize, "OUTLINE")
AutoButton.HotKey:SetTextColor(1, 1, 1)
AutoButton.HotKey:Point("TOPRIGHT", AutoButton, "TOPRIGHT", 0, 0)
AutoButton.HotKey:SetPoint("TOPRIGHT", AutoButton, "TOPRIGHT", 0, 0)
AutoButton.HotKey:SetJustifyH("RIGHT")
AutoButton.Cooldown = CreateFrame("Cooldown", nil, AutoButton, "CooldownFrameTemplate")
AutoButton.Cooldown:Point("TOPLEFT", AutoButton, "TOPLEFT", 2, -2)
AutoButton.Cooldown:Point("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", -2, 2)
AutoButton.Cooldown:SetPoint("TOPLEFT", AutoButton, "TOPLEFT", 2, -2)
AutoButton.Cooldown:SetPoint("BOTTOMRIGHT", AutoButton, "BOTTOMRIGHT", -2, 2)
AutoButton.Cooldown:SetSwipeColor(1, 1, 1, 1)
AutoButton.Cooldown:SetDrawBling(false)
......@@ -661,14 +661,14 @@ function module:UpdateAutoButton()
f:ClearAllPoints()
if i == 1 then
f:Point("LEFT", _G["AutoButtonAnchor"..index], "LEFT", 0, 0)
f:SetPoint("LEFT", _G["AutoButtonAnchor"..index], "LEFT", 0, 0)
elseif (i - 1) % buttonsPerRow == 0 then
f:Point("TOP", lastColumnButton, "BOTTOM", 0, -3)
f:SetPoint("TOP", lastColumnButton, "BOTTOM", 0, -3)
else
if db[btype.."Direction"] == "RIGHT" then
f:Point("LEFT", lastButton, "RIGHT", db[btype.."Space"], 0)
f:SetPoint("LEFT", lastButton, "RIGHT", db[btype.."Space"], 0)
elseif db[btype.."Direction"] == "LEFT" then
f:Point("RIGHT", lastButton, "LEFT", -(db[btype.."Space"]), 0)
f:SetPoint("RIGHT", lastButton, "LEFT", -(db[btype.."Space"]), 0)
end
end
......@@ -698,20 +698,20 @@ function module:Initialize()
local AutoButtonAnchor1 = CreateFrame("Frame", "AutoButtonAnchor1", UIParent)
AutoButtonAnchor1:SetClampedToScreen(true)
AutoButtonAnchor1:Point("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 90)
AutoButtonAnchor1:Size(module.db.questAutoButtons.questNum > 0 and module.db.questAutoButtons.questSize * module.db.questAutoButtons.questNum or 260, module.db.questAutoButtons.questNum > 0 and module.db.questAutoButtons.questSize or 40)
AutoButtonAnchor1:SetPoint("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 90)
AutoButtonAnchor1:SetSize(module.db.questAutoButtons.questNum > 0 and module.db.questAutoButtons.questSize * module.db.questAutoButtons.questNum or 260, module.db.questAutoButtons.questNum > 0 and module.db.questAutoButtons.questSize or 40)
E:CreateMover(AutoButtonAnchor1, "MER_AutoButtonAnchor1Mover", L["AutoButton Quest"], nil, nil, nil, "ALL,ACTIONBARS,MERATHILISUI", function() return module.db.enable end, 'mui,modules,actionbars,autoButtons')
local AutoButtonAnchor2 = CreateFrame("Frame", "AutoButtonAnchor2", UIParent)
AutoButtonAnchor2:SetClampedToScreen(true)
AutoButtonAnchor2:Point("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 48)
AutoButtonAnchor2:Size(module.db.slotAutoButtons.slotNum > 0 and module.db.slotAutoButtons.slotSize * module.db.slotAutoButtons.slotNum or 260, module.db.slotAutoButtons.slotNum > 0 and module.db.slotAutoButtons.slotSize or 40)
AutoButtonAnchor2:SetPoint("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 48)
AutoButtonAnchor2:SetSize(module.db.slotAutoButtons.slotNum > 0 and module.db.slotAutoButtons.slotSize * module.db.slotAutoButtons.slotNum or 260, module.db.slotAutoButtons.slotNum > 0 and module.db.slotAutoButtons.slotSize or 40)
E:CreateMover(AutoButtonAnchor2, "MER_AutoButtonAnchor2Mover", L["AutoButton Inventory"], nil, nil, nil, "ALL,ACTIONBARS,MERATHILISUI", function() return module.db["enable"] end, 'mui,modules,actionbars,autoButtons')
local AutoButtonAnchor3 = CreateFrame("Frame", "AutoButtonAnchor3", UIParent)
AutoButtonAnchor3:SetClampedToScreen(true)
AutoButtonAnchor3:Point("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 4)
AutoButtonAnchor3:Size(module.db.usableAutoButtons.usableNum > 0 and module.db.usableAutoButtons.usableSize * module.db.usableAutoButtons.usableNum or 260, module.db.usableAutoButtons.usableNum > 0 and module.db.usableAutoButtons.usableSize or 40)
AutoButtonAnchor3:SetPoint("BOTTOMLEFT", _G.RightChatPanel or _G.LeftChatPanel, "TOPLEFT", 0, 4)
AutoButtonAnchor3:SetSize(module.db.usableAutoButtons.usableNum > 0 and module.db.usableAutoButtons.usableSize * module.db.usableAutoButtons.usableNum or 260, module.db.usableAutoButtons.usableNum > 0 and module.db.usableAutoButtons.usableSize or 40)
E:CreateMover(AutoButtonAnchor3, "MER_AutoButtonAnchor3Mover", L["AutoButton Usables"], nil, nil, nil, "ALL,ACTIONBARS,MERATHILISUI", function() return module.db["enable"] end, 'mui,modules,actionbars,autoButtons')
self:UpdateAutoButton()
......
......@@ -563,7 +563,7 @@ function module:CreateMicroBar()
microBar:EnableMouse(true)
microBar:SetSize(400, 26)
microBar:SetScale(module.db.scale or 1)
microBar:Point("TOP", E.UIParent, "TOP", 0, -19)
microBar:SetPoint("TOP", E.UIParent, "TOP", 0, -19)
E.FrameLocks[microBar] = true
local IconPath = "Interface\\AddOns\\ElvUI_MerathilisUI\\media\\textures\\icons\\"
......
......@@ -218,7 +218,7 @@ function module:BuildInformation()
-- Gradiation
frame.Gradiation = CreateFrame('Frame', nil, frame)
frame.Gradiation:Size(110, _G["Character"..slotName]:GetHeight()+4)
frame.Gradiation:SetSize(110, _G["Character"..slotName]:GetHeight()+4)
frame.Gradiation:SetFrameLevel(_G["CharacterModelFrame"]:GetFrameLevel() - 1)
frame.Gradiation.Texture = frame.Gradiation:CreateTexture(nil, "OVERLAY")
......@@ -235,7 +235,7 @@ function module:BuildInformation()
-- Transmog Info
frame.Transmog = CreateFrame('Button', nil, frame)
frame.Transmog:Size(12)
frame.Transmog:SetSize(12, 12)
frame.Transmog:SetScript('OnEnter', self.Transmog_OnEnter)
frame.Transmog:SetScript('OnLeave', self.Transmog_OnLeave)
......@@ -245,22 +245,22 @@ function module:BuildInformation()
frame.Transmog.Texture:SetVertexColor(1, .5, 1)
if id <= 7 or id == 17 or id == 11 then -- Left Size
frame.Transmog:Point("TOPLEFT", _G["Character"..slotName], "TOPLEFT", -2, 2)
frame.Transmog:SetPoint("TOPLEFT", _G["Character"..slotName], "TOPLEFT", -2, 2)
frame.Transmog.Texture:SetTexCoord(0, 1, 1, 0)
elseif id <= 16 then -- Right Side
frame.Transmog:Point("TOPRIGHT", _G["Character"..slotName], "TOPRIGHT", 2, 2)
frame.Transmog:SetPoint("TOPRIGHT", _G["Character"..slotName], "TOPRIGHT", 2, 2)
frame.Transmog.Texture:SetTexCoord(1, 0, 1, 0)
elseif id == 18 then -- Main Hand
frame.Transmog:Point("BOTTOMRIGHT", _G["Character"..slotName], "BOTTOMRIGHT", 2, -2)
frame.Transmog:SetPoint("BOTTOMRIGHT", _G["Character"..slotName], "BOTTOMRIGHT", 2, -2)
frame.Transmog.Texture:SetTexCoord(1, 0, 0, 1)
elseif id == 19 then -- Off Hand
frame.Transmog:Point("BOTTOMLEFT", _G["Character"..slotName], "BOTTOMLEFT", -2, -2)
frame.Transmog:SetPoint("BOTTOMLEFT", _G["Character"..slotName], "BOTTOMLEFT", -2, -2)
frame.Transmog.Texture:SetTexCoord(0, 1, 0, 1)
end
-- Illusion Info
frame.Illusion = CreateFrame('Button', nil, frame)
frame.Illusion:Size(14)
frame.Illusion:SetSize(14, 14)
frame.Illusion:SetPoint('CENTER', _G["Character"..slotName], 'BOTTOM', 0, -2)
frame.Illusion:SetScript('OnEnter', self.Illusion_OnEnter)
frame.Illusion:SetScript('OnLeave', self.Illusion_OnLeave)
......
......@@ -15,18 +15,18 @@ function module:CreateAlert()
local alert = CreateFrame('Frame', 'MER_AlertFrame', E.UIParent)
alert:SetClampedToScreen(true)
alert:SetSize(300, 65)
alert:Point('TOP', 0, -280)
alert:SetPoint('TOP', 0, -280)
alert:Hide()
alert.Bg = alert:CreateTexture(nil, "BACKGROUND")
alert.Bg:SetTexture('Interface\\LevelUp\\MinorTalents')
alert.Bg:Point('TOP')
alert.Bg:SetPoint('TOP')
alert.Bg:SetSize(400, 60)
alert.Bg:SetTexCoord(0, 400/512, 341/512, 407/512)
alert.Bg:SetVertexColor(1, 1, 1, 0.4)
alert.text = alert:CreateFontString(nil)
alert.text:Point('CENTER', 0, -1)
alert.text:SetPoint('CENTER', 0, -1)
self.alert = alert
end
......
......@@ -12,15 +12,15 @@ local hooksecurefunc = hooksecurefunc
local PANEL_HEIGHT = 22
local ChatTabFrame = CreateFrame("Frame", "MER_RightChatTopDT", _G.RightChatPanel)
ChatTabFrame:Height(PANEL_HEIGHT)
ChatTabFrame:Width(411)
ChatTabFrame:SetHeight(PANEL_HEIGHT)
ChatTabFrame:SetWidth(411)
ChatTabFrame:SetFrameStrata("LOW")
E.FrameLocks["MER_RightChatTopDT"] = true
DT:RegisterPanel(ChatTabFrame, 3, "ANCHOR_TOPLEFT", 3, 4)
function MER:InitDataTexts()
MER_RightChatTopDT:Point("TOPRIGHT", _G.RightChatTab, "TOPRIGHT", 0, E.mult)
MER_RightChatTopDT:Point("BOTTOMLEFT", _G.RightChatTab, "BOTTOMLEFT", 0, E.mult)
MER_RightChatTopDT:SetPoint("TOPRIGHT", _G.RightChatTab, "TOPRIGHT", 0, E.mult)
MER_RightChatTopDT:SetPoint("BOTTOMLEFT", _G.RightChatTab, "BOTTOMLEFT", 0, E.mult)
hooksecurefunc(DT, "UpdatePanelInfo", function(DT, panelName, panel)
if not panel then return end
......
......@@ -259,7 +259,7 @@ function module:CreateLocationPanel()
-- Location Text
loc_panel.Text = loc_panel:CreateFontString(nil, "BACKGROUND")
loc_panel.Text:FontTemplate(E.LSM:Fetch('font', module.db.font), module.db.fontSize, module.db.fontOutline)
loc_panel.Text:Point("CENTER", 0, 0)
loc_panel.Text:SetPoint("CENTER", 0, 0)
loc_panel.Text:SetWordWrap(false)
E.FrameLocks[loc_panel] = true
......@@ -268,13 +268,13 @@ function module:CreateLocationPanel()
loc_panel.Xcoord:SetPoint("RIGHT", loc_panel, "LEFT", 1 - 2*E.Spacing, 0)
loc_panel.Xcoord.Text = loc_panel.Xcoord:CreateFontString(nil, "BACKGROUND")
loc_panel.Xcoord.Text:FontTemplate(E.LSM:Fetch('font', module.db.font), module.db.fontSize, module.db.fontOutline)
loc_panel.Xcoord.Text:Point("CENTER", 0, 0)
loc_panel.Xcoord.Text:SetPoint("CENTER", 0, 0)
loc_panel.Ycoord = CreateFrame('Frame', "MER_LocPanel_Y", loc_panel)
loc_panel.Ycoord:SetPoint("LEFT", loc_panel, "RIGHT", -1 + 2*E.Spacing, 0)
loc_panel.Ycoord.Text = loc_panel.Ycoord:CreateFontString(nil, "BACKGROUND")
loc_panel.Ycoord.Text:FontTemplate(E.LSM:Fetch('font', module.db.font), module.db.fontSize, module.db.fontOutline)
loc_panel.Ycoord.Text:Point("CENTER", 0, 0)
loc_panel.Ycoord.Text:SetPoint("CENTER", 0, 0)
module:Resize()
......@@ -364,7 +364,7 @@ function module:UpdateCoords(elapsed)
displayLine = subZoneText
end
loc_panel.Text:SetText(displayLine)
if module.db.autowidth then loc_panel:Width(loc_panel.Text:GetStringWidth() + 10) end
if module.db.autowidth then loc_panel:SetWidth(loc_panel.Text:GetStringWidth() + 10) end
--Location Colorings
if displayLine ~= "" then
......@@ -400,13 +400,13 @@ end
function module:Resize()
if module.db.autowidth then
loc_panel:Size(loc_panel.Text:GetStringWidth() + 10, module.db.height)
loc_panel:SetSize(loc_panel.Text:GetStringWidth() + 10, module.db.height)
else
loc_panel:Size(module.db.width, module.db.height)
loc_panel:SetSize(module.db.width, module.db.height)
end
loc_panel.Text:Width(module.db.width - 18)
loc_panel.Xcoord:Size(module.db.fontSize * 3, module.db.height)
loc_panel.Ycoord:Size(module.db.fontSize * 3, module.db.height)
loc_panel.Text:SetWidth(module.db.width - 18)
loc_panel.Xcoord:SetSize(module.db.fontSize * 3, module.db.height)
loc_panel.Ycoord:SetSize(module.db.fontSize * 3, module.db.height)
end
function module:Fonts()
......
......@@ -16,7 +16,7 @@ local BAR_HEIGHT = 22
function module:SkinMiniMap()
_G.Minimap:SetMaskTexture('Interface\\AddOns\\ElvUI_MerathilisUI\\media\\textures\\rectangle')
_G.Minimap:Size(E.MinimapSize, E.MinimapSize)
_G.Minimap:SetSize(E.MinimapSize, E.MinimapSize)
_G.Minimap:SetHitRectInsets(0, 0, (E.MinimapSize/6.1)*E.mult, (E.MinimapSize/6.1)*E.mult)
_G.Minimap:SetClampRectInsets(0, 0, 0, 0)
......@@ -24,18 +24,18 @@ function module:SkinMiniMap()
--*Relocated Minimap to MMHolder
_G.Minimap:ClearAllPoints()
--_G.Minimap:Point("TOPRIGHT", _G.MMHolder, "TOPRIGHT", -E.Border, E.Border)
--_G.Minimap:SetPoint("TOPRIGHT", _G.MMHolder, "TOPRIGHT", -E.Border, E.Border)
--*Below sets mover to same size of minimap, I didn't do this on purpose due to people moving the minimap in an area not good
_G.Minimap:Point("TOPRIGHT", _G.MMHolder, "TOPRIGHT", -E.Border, (E.MinimapSize/6.1)+E.Border)
_G.Minimap:SetPoint("TOPRIGHT", _G.MMHolder, "TOPRIGHT", -E.Border, (E.MinimapSize/6.1)+E.Border)
if _G.Minimap.location then
module:UpdateLocationText()
end
_G.MinimapPanel:ClearAllPoints()
_G.MinimapPanel:Point('TOPLEFT', _G.Minimap, 'BOTTOMLEFT', -1, (E.MinimapSize/6.1)-1)
_G.MinimapPanel:Point('BOTTOMRIGHT', _G.Minimap, 'BOTTOMRIGHT', 1, ((E.MinimapSize/6.1)-BAR_HEIGHT)-1)
_G.MinimapPanel:SetPoint('TOPLEFT', _G.Minimap, 'BOTTOMLEFT', -1, (E.MinimapSize/6.1)-1)
_G.MinimapPanel:SetPoint('BOTTOMRIGHT', _G.Minimap, 'BOTTOMRIGHT', 1, ((E.MinimapSize/6.1)-BAR_HEIGHT)-1)
if _G.Minimap.backdrop then
_G.Minimap.backdrop:SetOutside(_G.Minimap, 1, -(E.MinimapSize/6.1)+1)
......@@ -44,9 +44,9 @@ end
function module:UpdateMoverSize()
if E.db.datatexts.panels.MinimapPanel.enable then
_G.MMHolder:Height((_G.Minimap:GetHeight() + (_G.MinimapPanel and (_G.MinimapPanel:GetHeight() + E.Border) or 24)) + E.Spacing*3-((E.MinimapSize/6.1)))
_G.MMHolder:SetHeight((_G.Minimap:GetHeight() + (_G.MinimapPanel and (_G.MinimapPanel:GetHeight() + E.Border) or 24)) + E.Spacing*3-((E.MinimapSize/6.1)))
else
_G.MMHolder:Height((_G.Minimap:GetHeight() + E.Border + E.Spacing*3)-(E.MinimapSize/6.1))
_G.MMHolder:SetHeight((_G.Minimap:GetHeight() + E.Border + E.Spacing*3)-(E.MinimapSize/6.1))
end
end
......@@ -86,7 +86,7 @@ end
function module:UpdateLocationText()
_G.Minimap.location:ClearAllPoints()
_G.Minimap.location:Point('TOP', _G.Minimap, 'TOP', 0, -22)
_G.Minimap.location:SetPoint('TOP', _G.Minimap, 'TOP', 0, -22)
end
function module:Initialize()
......
......@@ -75,8 +75,8 @@ local function Initialize()
AFK.AFKMode.chat:SetPoint("TOPLEFT", AFK.AFKMode.top, "BOTTOMLEFT", 4, -10)
AFK.AFKMode.Panel = CreateFrame('Frame', nil, AFK.AFKMode)
AFK.AFKMode.Panel:Point('BOTTOM', E.UIParent, 'BOTTOM', 0, 100)
AFK.AFKMode.Panel:Size((GetScreenWidth()/2), 80)
AFK.AFKMode.Panel:SetPoint('BOTTOM', E.UIParent, 'BOTTOM', 0, 100)
AFK.AFKMode.Panel:SetSize((GetScreenWidth()/2), 80)
AFK.AFKMode.Panel:CreateBackdrop('Transparent')
AFK.AFKMode.Panel:SetFrameStrata('FULLSCREEN')
AFK.AFKMode.Panel:Styling()
......@@ -86,29 +86,29 @@ local function Initialize()
AFK.AFKMode.Panel.ignoreBackdropColors = true
AFK.AFKMode.PanelIcon = CreateFrame('Frame', nil, AFK.AFKMode.Panel)
AFK.AFKMode.PanelIcon:Size(70)
AFK.AFKMode.PanelIcon:Point('CENTER', AFK.AFKMode.Panel, 'TOP', 0, 0)
AFK.AFKMode.PanelIcon:SetSize(70, 70)
AFK.AFKMode.PanelIcon:SetPoint('CENTER', AFK.AFKMode.Panel, 'TOP', 0, 0)
AFK.AFKMode.PanelIcon.Texture = AFK.AFKMode.PanelIcon:CreateTexture(nil, 'ARTWORK')
AFK.AFKMode.PanelIcon.Texture:Point('TOPLEFT', 2, -2)
AFK.AFKMode.PanelIcon.Texture:Point('BOTTOMRIGHT', -2, 2)
AFK.AFKMode.PanelIcon.Texture:SetPoint('TOPLEFT', 2, -2)
AFK.AFKMode.PanelIcon.Texture:SetPoint('BOTTOMRIGHT', -2, 2)
AFK.AFKMode.PanelIcon.Texture:SetTexture('Interface\\AddOns\\ElvUI_MerathilisUI\\media\\textures\\mUI1.tga')
AFK.AFKMode.MERVersion = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.MERVersion:Point('CENTER', AFK.AFKMode.Panel, 'CENTER', 0, -10)
AFK.AFKMode.MERVersion:SetPoint('CENTER', AFK.AFKMode.Panel, 'CENTER', 0, -10)
AFK.AFKMode.MERVersion:FontTemplate(nil, 24, 'OUTLINE')
AFK.AFKMode.MERVersion:SetText(MER.Title.."|cFF00c0fa"..MER.Version.."|r")
AFK.AFKMode.DateText = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.DateText:Point('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, 24)
AFK.AFKMode.DateText:SetPoint('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, 24)
AFK.AFKMode.DateText:FontTemplate(nil, 15, 'OUTLINE')
AFK.AFKMode.ClockText = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.ClockText:Point('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, 0)
AFK.AFKMode.ClockText:SetPoint('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, 0)
AFK.AFKMode.ClockText:FontTemplate(nil, 20, 'OUTLINE')
AFK.AFKMode.AFKTimer = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.AFKTimer:Point('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, -26)
AFK.AFKMode.AFKTimer:SetPoint('RIGHT', AFK.AFKMode.Panel, 'RIGHT', -5, -26)
AFK.AFKMode.AFKTimer:FontTemplate(nil, 16, 'OUTLINE')
-- Dynamic time & date
......@@ -124,19 +124,19 @@ local function Initialize()
end)
AFK.AFKMode.PlayerName = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.PlayerName:Point('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, 20)
AFK.AFKMode.PlayerName:SetPoint('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, 20)
AFK.AFKMode.PlayerName:FontTemplate(nil, 26, 'OUTLINE')
AFK.AFKMode.PlayerName:SetTextColor(unpack(E["media"].rgbvaluecolor))
AFK.AFKMode.PlayerName:SetText(E.myname)
AFK.AFKMode.Guild = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.Guild:Point('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, 0)
AFK.AFKMode.Guild:SetPoint('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, 0)
AFK.AFKMode.Guild:FontTemplate(nil, 18, 'OUTLINE')
local color = E:ClassColor(E.myclass)
local coloredClass = ("|cff%02x%02x%02x%s"):format(color.r * 255, color.g * 255, color.b * 255, E.myLocalizedClass:gsub("%-.+", "*"))
AFK.AFKMode.PlayerInfo = AFK.AFKMode.Panel:CreateFontString(nil, 'OVERLAY')
AFK.AFKMode.PlayerInfo:Point('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, -20)
AFK.AFKMode.PlayerInfo:SetPoint('LEFT', AFK.AFKMode.Panel, 'LEFT', 5, -20)
AFK.AFKMode.PlayerInfo:FontTemplate(nil, 15, 'OUTLINE')
AFK.AFKMode.PlayerInfo:SetText(_G.LEVEL .. ' ' .. E.mylevel .. ' '.. E.myLocalizedFaction .. ' ' .. coloredClass)
......
......@@ -29,16 +29,16 @@ function module:Initialize()
-- Location Frame
BFM.FlightMode.top.location:CreateBackdrop("Transparent")
BFM.FlightMode.top.location:Point("TOP", BFM.FlightMode.top, "CENTER", 0, -25)
BFM.FlightMode.top.location:Height(30)
BFM.FlightMode.top.location:SetPoint("TOP", BFM.FlightMode.top, "CENTER", 0, -25)
BFM.FlightMode.top.location:SetHeight(30)
-- Coords X frame
BFM.FlightMode.top.location.x:CreateBackdrop("Transparent")
BFM.FlightMode.top.location.x:Height(30)
BFM.FlightMode.top.location.x:SetHeight(30)
-- Coords Y frame
BFM.FlightMode.top.location.y:CreateBackdrop("Transparent")
BFM.FlightMode.top.location.y:Height(30)
BFM.FlightMode.top.location.y:SetHeight(30)
-- Top Frame
BFM.FlightMode.top:Styling()
......@@ -56,13 +56,13 @@ function module:Initialize()
-- MerathilisUI Logo
BFM.FlightMode.bottom.logo = BFM.FlightMode:CreateTexture(nil, "OVERLAY")
BFM.FlightMode.bottom.logo:Size(180, 90)
BFM.FlightMode.bottom.logo:Point("CENTER", BFM.FlightMode.bottom, "CENTER", 0, 45)
BFM.FlightMode.bottom.logo:SetSize(180, 90)
BFM.FlightMode.bottom.logo:SetPoint("CENTER", BFM.FlightMode.bottom, "CENTER", 0, 45)
BFM.FlightMode.bottom.logo:SetTexture("Interface\\AddOns\\ElvUI_MerathilisUI\\media\\textures\\mUI.tga")
-- MerathilisUI Version
BFM.FlightMode.bottom.merathilisui = CreateFrame("Frame", nil, BFM.FlightMode.bottom)
BFM.FlightMode.bottom.merathilisui:Point("CENTER", BFM.FlightMode.bottom, "CENTER", -10, 0)
BFM.FlightMode.bottom.merathilisui:SetPoint("CENTER", BFM.FlightMode.bottom, "CENTER", -10, 0)
BFM.FlightMode.bottom.merathilisui:CreateBackdrop("Transparent")
BFM.FlightMode.bottom.merathilisui:Styling()
BFM.FlightMode.bottom.merathilisui:SetSize(70,30)
......
......@@ -35,13 +35,13 @@ function MI:CreateSplash()
frame:Hide()
local tex = frame:CreateTexture()
tex:Point("CENTER", frame, "CENTER")
tex:SetPoint("CENTER", frame, "CENTER")
tex:SetTexture("Interface\\AddOns\\ElvUI_MerathilisUI\\media\\textures\\mUI1_Shadow.tga")
tex:Size(125, 125)
tex:SetSize(125, 125)
local version = MER:CreateText(frame, "OVERLAY", 14, nil, "CENTER")
version:FontTemplate(nil, 14, nil)
version:Point("TOP", tex, "BOTTOM", 0, 10)
version:SetPoint("TOP", tex, "BOTTOM", 0, 10)