Commit dbc6976c authored by Simpy's avatar Simpy 🐹
Browse files

more single quotes

parent 9fafc907
......@@ -40,7 +40,7 @@ do -- other non-english locales require this
for k,v in pairs(_G.LOCALIZED_CLASS_NAMES_FEMALE) do E.UnlocalizedClasses[v] = k end
function E:UnlocalizedClassName(className)
return (className and className ~= "") and E.UnlocalizedClasses[className]
return (className and className ~= '') and E.UnlocalizedClasses[className]
end
end
......@@ -51,7 +51,7 @@ end
function E:ScanTooltipTextures(clean, grabTextures)
local essenceTextureID, textures, essences = 2975691
for i = 1, 10 do
local tex = _G["ElvUI_ScanTooltipTexture"..i]
local tex = _G['ElvUI_ScanTooltipTexture'..i]
local texture = tex and tex:GetTexture()
if texture then
if grabTextures then
......@@ -166,7 +166,7 @@ do
local widget = widgetID and C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo(widgetID)
if not widget then return end
local rank = tonumber(strmatch(widget.overrideBarText, "%d+"))
local rank = tonumber(strmatch(widget.overrideBarText, '%d+'))
if not rank then return end
local cur = widget.barValue - widget.barMin
......
......@@ -26,8 +26,8 @@ do
function E:StopHarlemShake()
E.isMassiveShaking = nil
StopMusic()
SetCVar("Sound_EnableAllSound", self.oldEnableAllSound)
SetCVar("Sound_EnableMusic", self.oldEnableMusic)
SetCVar('Sound_EnableAllSound', self.oldEnableAllSound)
SetCVar('Sound_EnableMusic', self.oldEnableMusic)
self:StopShakeHorizontal(ElvUI_StaticPopup1)
for _, object in pairs(self.massiveShakeObjects) do
......@@ -41,9 +41,9 @@ do
end
E.global.aprilFools = true
E:StaticPopup_Hide("HARLEM_SHAKE")
E:StaticPopup_Hide('HARLEM_SHAKE')
twipe(self.massiveShakeObjects)
DoEmote("Dance")
DoEmote('Dance')
end
function E:DoTheHarlemShake()
......@@ -56,21 +56,21 @@ do
end
end
E.massiveShakeTimer = E:ScheduleTimer("StopHarlemShake", 42.5)
SendChatMessage("DO THE HARLEM SHAKE!", "YELL")
E.massiveShakeTimer = E:ScheduleTimer('StopHarlemShake', 42.5)
SendChatMessage('DO THE HARLEM SHAKE!', 'YELL')
end
function E:BeginHarlemShake()
DoEmote("Dance")
DoEmote('Dance')
ElvUI_StaticPopup1Button1:Disable()
self:ShakeHorizontal(ElvUI_StaticPopup1)
self.oldEnableAllSound = GetCVar("Sound_EnableAllSound")
self.oldEnableMusic = GetCVar("Sound_EnableMusic")
self.oldEnableAllSound = GetCVar('Sound_EnableAllSound')
self.oldEnableMusic = GetCVar('Sound_EnableMusic')
SetCVar("Sound_EnableAllSound", 1)
SetCVar("Sound_EnableMusic", 1)
SetCVar('Sound_EnableAllSound', 1)
SetCVar('Sound_EnableMusic', 1)
PlayMusic(E.Media.Sounds.HarlemShake)
E:ScheduleTimer("DoTheHarlemShake", 15.5)
E:ScheduleTimer('DoTheHarlemShake', 15.5)
self.massiveShakeObjects = {}
tinsert(self.massiveShakeObjects, _G.GameTooltip)
......@@ -99,7 +99,7 @@ do
end
for i=1, NUM_PET_ACTION_SLOTS do
local button = _G["PetActionButton"..i]
local button = _G['PetActionButton'..i]
if button then
tinsert(self.massiveShakeObjects, button)
end
......@@ -107,7 +107,7 @@ do
end
function E:HarlemShakeToggle()
self:StaticPopup_Show("HARLEM_SHAKE")
self:StaticPopup_Show('HARLEM_SHAKE')
end
end
......@@ -158,8 +158,8 @@ do
if(self:HelloKittyFixCheck()) then
E:HelloKittyFix()
else
self.oldEnableAllSound = GetCVar("Sound_EnableAllSound")
self.oldEnableMusic = GetCVar("Sound_EnableMusic")
self.oldEnableAllSound = GetCVar('Sound_EnableAllSound')
self.oldEnableMusic = GetCVar('Sound_EnableMusic')
t.backdropcolor = {r = c.r, g = c.g, b = c.b}
c = self.db.general.backdropfadecolor
......@@ -202,10 +202,10 @@ do
self.db.unitframe.colors.health = {r = 223/255, g = 76/255, b = 188/255}
self.db.unitframe.colors.healthclass = false
SetCVar("Sound_EnableAllSound", 1)
SetCVar("Sound_EnableMusic", 1)
SetCVar('Sound_EnableAllSound', 1)
SetCVar('Sound_EnableMusic', 1)
PlayMusic(E.Media.Sounds.HelloKitty)
E:StaticPopup_Show("HELLO_KITTY_END")
E:StaticPopup_Show('HELLO_KITTY_END')
self.db.general.kittys = true
self:CreateKittys()
......@@ -266,42 +266,42 @@ do
_G.HelloKittyRight:Show()
return
end
local helloKittyLeft = CreateFrame("Frame", "HelloKittyLeft", _G.UIParent)
local helloKittyLeft = CreateFrame('Frame', 'HelloKittyLeft', _G.UIParent)
helloKittyLeft:SetSize(120, 128)
helloKittyLeft:SetMovable(true)
helloKittyLeft:EnableMouse(true)
helloKittyLeft:RegisterForDrag("LeftButton")
helloKittyLeft:Point("BOTTOMLEFT", _G.LeftChatPanel, "BOTTOMRIGHT", 2, -4)
helloKittyLeft.tex = helloKittyLeft:CreateTexture(nil, "OVERLAY")
helloKittyLeft:RegisterForDrag('LeftButton')
helloKittyLeft:Point('BOTTOMLEFT', _G.LeftChatPanel, 'BOTTOMRIGHT', 2, -4)
helloKittyLeft.tex = helloKittyLeft:CreateTexture(nil, 'OVERLAY')
helloKittyLeft.tex:SetAllPoints()
helloKittyLeft.tex:SetTexture(E.Media.Textures.HelloKitty)
helloKittyLeft.tex:SetTexCoord(0, 0, 0, 1, 0, 0, 0, 1)
helloKittyLeft.curFrame = 1
helloKittyLeft.countUp = true
helloKittyLeft:SetClampedToScreen(true)
helloKittyLeft:SetScript("OnDragStart", OnDragStart)
helloKittyLeft:SetScript("OnDragStop", OnDragStop)
helloKittyLeft:SetScript("OnUpdate", OnUpdate)
helloKittyLeft:SetScript('OnDragStart', OnDragStart)
helloKittyLeft:SetScript('OnDragStop', OnDragStop)
helloKittyLeft:SetScript('OnUpdate', OnUpdate)
local helloKittyRight = CreateFrame("Frame", "HelloKittyRight", _G.UIParent)
local helloKittyRight = CreateFrame('Frame', 'HelloKittyRight', _G.UIParent)
helloKittyRight:SetSize(120, 128)
helloKittyRight:SetMovable(true)
helloKittyRight:EnableMouse(true)
helloKittyRight:RegisterForDrag("LeftButton")
helloKittyRight:Point("BOTTOMRIGHT", _G.RightChatPanel, "BOTTOMLEFT", -2, -4)
helloKittyRight.tex = helloKittyRight:CreateTexture(nil, "OVERLAY")
helloKittyRight:RegisterForDrag('LeftButton')
helloKittyRight:Point('BOTTOMRIGHT', _G.RightChatPanel, 'BOTTOMLEFT', -2, -4)
helloKittyRight.tex = helloKittyRight:CreateTexture(nil, 'OVERLAY')
helloKittyRight.tex:SetAllPoints()
helloKittyRight.tex:SetTexture(E.Media.Textures.HelloKitty)
helloKittyRight.tex:SetTexCoord(0, 0, 0, 1, 0, 0, 0, 1)
helloKittyRight.curFrame = 10
helloKittyRight.countUp = false
helloKittyRight:SetClampedToScreen(true)
helloKittyRight:SetScript("OnDragStart", OnDragStart)
helloKittyRight:SetScript("OnDragStop", OnDragStop)
helloKittyRight:SetScript("OnUpdate", OnUpdate)
helloKittyRight:SetScript('OnDragStart', OnDragStart)
helloKittyRight:SetScript('OnDragStop', OnDragStop)
helloKittyRight:SetScript('OnUpdate', OnUpdate)
end
--When it bugged out for a user the command "/hellokittyfix" attempted to restore the changed settings to default
--When it bugged out for a user the command '/hellokittyfix' attempted to restore the changed settings to default
function E:HelloKittyFixCheck(secondCheck)
local t = self.db.tempSettings
if(not t and not secondCheck) then t = self.db.general end
......@@ -323,8 +323,8 @@ do
c = P.general.valuecolor
self.db.general.valuecolor = {r = c.r, g = c.g, b = c.b}
self.db.chat.panelBackdropNameLeft = ""
self.db.chat.panelBackdropNameRight = ""
self.db.chat.panelBackdropNameLeft = ''
self.db.chat.panelBackdropNameRight = ''
c = P.unitframe.colors.health
self.db.unitframe.colors.health = {r = c.r, g = c.g, b = c.b}
......@@ -352,7 +352,7 @@ do
if(_G.HelloKittyLeft and _G.HelloKittyLeft:IsShown()) then
self:RestoreHelloKitty()
else
self:StaticPopup_Show("HELLO_KITTY")
self:StaticPopup_Show('HELLO_KITTY')
end
end
end
local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local DT = E:GetModule("DataTexts")
local AB = E:GetModule("ActionBars")
local DT = E:GetModule('DataTexts')
local AB = E:GetModule('ActionBars')
--Lua functions
local _G = _G
......@@ -25,7 +25,7 @@ local GetCVarBool = GetCVarBool
function E:Grid(msg)
msg = msg and tonumber(msg)
if type(msg) == "number" and (msg <= 256 and msg >= 4) then
if type(msg) == 'number' and (msg <= 256 and msg >= 4) then
E.db.gridSize = msg
E:Grid_Show()
elseif ElvUIGrid and ElvUIGrid:IsShown() then
......@@ -37,17 +37,17 @@ end
function E:LuaError(msg)
msg = lower(msg)
if msg == "on" then
if msg == 'on' then
DisableAllAddOns()
EnableAddOn("ElvUI")
EnableAddOn("ElvUI_OptionsUI")
SetCVar("scriptErrors", 1)
EnableAddOn('ElvUI')
EnableAddOn('ElvUI_OptionsUI')
SetCVar('scriptErrors', 1)
ReloadUI()
elseif msg == "off" then
SetCVar("scriptErrors", 0)
E:Print("Lua errors off.")
elseif msg == 'off' then
SetCVar('scriptErrors', 0)
E:Print('Lua errors off.')
else
E:Print("/luaerror on - /luaerror off")
E:Print('/luaerror on - /luaerror off')
end
end
......@@ -55,39 +55,39 @@ function E:BGStats()
DT.ForceHideBGStats = nil
DT:LoadDataTexts()
E:Print(L["Battleground datatexts will now show again if you are inside a battleground."])
E:Print(L['Battleground datatexts will now show again if you are inside a battleground.'])
end
local function OnCallback(command)
_G.MacroEditBox:GetScript("OnEvent")(_G.MacroEditBox, "EXECUTE_CHAT_LINE", command)
_G.MacroEditBox:GetScript('OnEvent')(_G.MacroEditBox, 'EXECUTE_CHAT_LINE', command)
end
function E:DelayScriptCall(msg)
local secs, command = msg:match("^(%S+)%s+(.*)$")
local secs, command = msg:match('^(%S+)%s+(.*)$')
secs = tonumber(secs)
if (not secs) or (#command == 0) then
self:Print("usage: /in <seconds> <command>")
self:Print("example: /in 1.5 /say hi")
self:Print('usage: /in <seconds> <command>')
self:Print('example: /in 1.5 /say hi')
else
E:Delay(secs, OnCallback, command)
end
end
-- make this a locale later?
local MassKickMessage = "Guild Cleanup Results: Removed all guild members below rank %s, that have a minimal level of %s, and have not been online for at least: %s days."
local MassKickMessage = 'Guild Cleanup Results: Removed all guild members below rank %s, that have a minimal level of %s, and have not been online for at least: %s days.'
function E:MassGuildKick(msg)
local minLevel, minDays, minRankIndex = split(",", msg)
local minLevel, minDays, minRankIndex = split(',', msg)
minRankIndex = tonumber(minRankIndex)
minLevel = tonumber(minLevel)
minDays = tonumber(minDays)
if not minLevel or not minDays then
E:Print("Usage: /cleanguild <minLevel>, <minDays>, [<minRankIndex>]")
E:Print('Usage: /cleanguild <minLevel>, <minDays>, [<minRankIndex>]')
return
end
if minDays > 31 then
E:Print("Maximum days value must be below 32.")
E:Print('Maximum days value must be below 32.')
return
end
......@@ -99,7 +99,7 @@ function E:MassGuildKick(msg)
local name, _, rankIndex, level, _, _, note, officerNote, connected, _, classFileName = GetGuildRosterInfo(i)
local minLevelx = minLevel
if classFileName == "DEATHKNIGHT" then
if classFileName == 'DEATHKNIGHT' then
minLevelx = minLevelx + 55
end
......@@ -112,28 +112,28 @@ function E:MassGuildKick(msg)
end
end
SendChatMessage(format(MassKickMessage, GuildControlGetRankName(minRankIndex), minLevel, minDays), "GUILD")
SendChatMessage(format(MassKickMessage, GuildControlGetRankName(minRankIndex), minLevel, minDays), 'GUILD')
end
local num_frames = 0
local function OnUpdate()
num_frames = num_frames + 1
end
local f = CreateFrame("Frame")
local f = CreateFrame('Frame')
f:Hide()
f:SetScript("OnUpdate", OnUpdate)
f:SetScript('OnUpdate', OnUpdate)
local toggleMode, debugTimer, cpuImpactMessage = false, 0, "Consumed %sms per frame. Each frame took %sms to render."
local toggleMode, debugTimer, cpuImpactMessage = false, 0, 'Consumed %sms per frame. Each frame took %sms to render.'
function E:GetCPUImpact()
if not GetCVarBool("scriptProfile") then
E:Print("For `/cpuimpact` to work, you need to enable script profiling via: `/console scriptProfile 1` then reload. Disable after testing by setting it back to 0.")
if not GetCVarBool('scriptProfile') then
E:Print('For `/cpuimpact` to work, you need to enable script profiling via: `/console scriptProfile 1` then reload. Disable after testing by setting it back to 0.')
return
end
if not toggleMode then
ResetCPUUsage()
toggleMode, num_frames, debugTimer = true, 0, debugprofilestop()
self:Print("CPU Impact being calculated, type /cpuimpact to get results when you are ready.")
self:Print('CPU Impact being calculated, type /cpuimpact to get results when you are ready.')
f:Show()
else
f:Hide()
......@@ -141,115 +141,115 @@ function E:GetCPUImpact()
UpdateAddOnCPUUsage()
local per, passed =
((num_frames == 0 and 0) or (GetAddOnCPUUsage("ElvUI") / num_frames)),
((num_frames == 0 and 0) or (GetAddOnCPUUsage('ElvUI') / num_frames)),
((num_frames == 0 and 0) or (ms_passed / num_frames))
self:Print(format(cpuImpactMessage, per and per > 0 and format("%.3f", per) or 0, passed and passed > 0 and format("%.3f", passed) or 0))
self:Print(format(cpuImpactMessage, per and per > 0 and format('%.3f', per) or 0, passed and passed > 0 and format('%.3f', passed) or 0))
toggleMode = false
end
end
local BLIZZARD_ADDONS = {
"Blizzard_AchievementUI",
"Blizzard_AdventureMap",
"Blizzard_ArchaeologyUI",
"Blizzard_ArenaUI",
"Blizzard_ArtifactUI",
"Blizzard_AuctionUI",
"Blizzard_AuthChallengeUI",
"Blizzard_BarbershopUI",
"Blizzard_BattlefieldMinimap",
"Blizzard_BindingUI",
"Blizzard_BlackMarketUI",
"Blizzard_BoostTutorial",
"Blizzard_Calendar",
"Blizzard_ChallengesUI",
"Blizzard_ClassTrial",
"Blizzard_ClientSavedVariables",
"Blizzard_Collections",
"Blizzard_CombatLog",
"Blizzard_CombatText",
"Blizzard_CompactRaidFrames",
"Blizzard_CUFProfiles",
"Blizzard_DeathRecap",
"Blizzard_DebugTools",
"Blizzard_EncounterJournal",
"Blizzard_FlightMap",
"Blizzard_GarrisonTemplates",
"Blizzard_GarrisonUI",
"Blizzard_GlyphUI",
"Blizzard_GMChatUI",
"Blizzard_GMSurveyUI",
"Blizzard_GuildBankUI",
"Blizzard_GuildControlUI",
"Blizzard_GuildUI",
"Blizzard_InspectUI",
"Blizzard_ItemSocketingUI",
"Blizzard_ItemUpgradeUI",
"Blizzard_LookingForGuildUI",
"Blizzard_MacroUI",
"Blizzard_MapCanvas",
"Blizzard_MovePad",
"Blizzard_NamePlates",
"Blizzard_ObjectiveTracker",
"Blizzard_ObliterumUI",
"Blizzard_OrderHallUI",
"Blizzard_PetBattleUI",
"Blizzard_PVPUI",
"Blizzard_QuestChoice",
"Blizzard_RaidUI",
"Blizzard_SecureTransferUI",
"Blizzard_SharedMapDataProviders",
"Blizzard_SocialUI",
"Blizzard_StoreUI",
"Blizzard_TalentUI",
"Blizzard_TalkingHeadUI",
"Blizzard_TimeManager",
"Blizzard_TokenUI",
"Blizzard_TradeSkillUI",
"Blizzard_TrainerUI",
"Blizzard_Tutorial",
"Blizzard_TutorialTemplates",
"Blizzard_VoidStorageUI",
"Blizzard_WowTokenUI"
'Blizzard_AchievementUI',
'Blizzard_AdventureMap',
'Blizzard_ArchaeologyUI',
'Blizzard_ArenaUI',
'Blizzard_ArtifactUI',
'Blizzard_AuctionUI',
'Blizzard_AuthChallengeUI',
'Blizzard_BarbershopUI',
'Blizzard_BattlefieldMinimap',
'Blizzard_BindingUI',
'Blizzard_BlackMarketUI',
'Blizzard_BoostTutorial',
'Blizzard_Calendar',
'Blizzard_ChallengesUI',
'Blizzard_ClassTrial',
'Blizzard_ClientSavedVariables',
'Blizzard_Collections',
'Blizzard_CombatLog',
'Blizzard_CombatText',
'Blizzard_CompactRaidFrames',
'Blizzard_CUFProfiles',
'Blizzard_DeathRecap',
'Blizzard_DebugTools',
'Blizzard_EncounterJournal',
'Blizzard_FlightMap',
'Blizzard_GarrisonTemplates',
'Blizzard_GarrisonUI',
'Blizzard_GlyphUI',
'Blizzard_GMChatUI',
'Blizzard_GMSurveyUI',
'Blizzard_GuildBankUI',
'Blizzard_GuildControlUI',
'Blizzard_GuildUI',
'Blizzard_InspectUI',
'Blizzard_ItemSocketingUI',
'Blizzard_ItemUpgradeUI',
'Blizzard_LookingForGuildUI',
'Blizzard_MacroUI',
'Blizzard_MapCanvas',
'Blizzard_MovePad',
'Blizzard_NamePlates',
'Blizzard_ObjectiveTracker',
'Blizzard_ObliterumUI',
'Blizzard_OrderHallUI',
'Blizzard_PetBattleUI',
'Blizzard_PVPUI',
'Blizzard_QuestChoice',
'Blizzard_RaidUI',
'Blizzard_SecureTransferUI',
'Blizzard_SharedMapDataProviders',
'Blizzard_SocialUI',
'Blizzard_StoreUI',
'Blizzard_TalentUI',
'Blizzard_TalkingHeadUI',
'Blizzard_TimeManager',
'Blizzard_TokenUI',
'Blizzard_TradeSkillUI',
'Blizzard_TrainerUI',
'Blizzard_Tutorial',
'Blizzard_TutorialTemplates',
'Blizzard_VoidStorageUI',
'Blizzard_WowTokenUI'
}
function E:EnableBlizzardAddOns()
for _, addon in pairs(BLIZZARD_ADDONS) do
local reason = select(5, GetAddOnInfo(addon))
if reason == "DISABLED" then
if reason == 'DISABLED' then
EnableAddOn(addon)
E:Print("The following addon was re-enabled:", addon)
E:Print('The following addon was re-enabled:', addon)
end
end
end
function E:LoadCommands()
self:RegisterChatCommand("in", "DelayScriptCall")
self:RegisterChatCommand("ec", "ToggleOptionsUI")
self:RegisterChatCommand("elvui", "ToggleOptionsUI")
self:RegisterChatCommand("cpuimpact", "GetCPUImpact")
self:RegisterChatCommand('in', 'DelayScriptCall')
self:RegisterChatCommand('ec', 'ToggleOptionsUI')
self:RegisterChatCommand('elvui', 'ToggleOptionsUI')
self:RegisterChatCommand('cpuimpact', 'GetCPUImpact')
self:RegisterChatCommand("cpuusage", "GetTopCPUFunc")
self:RegisterChatCommand('cpuusage', 'GetTopCPUFunc')
-- args: module, showall, delay, minCalls
-- Example1: /cpuusage all
-- Example2: /cpuusage Bags true
-- Example3: /cpuusage UnitFrames nil 50 25
-- Note: showall, delay, and minCalls will default if not set
-- arg1 can be "all" this will scan all registered modules!
self:RegisterChatCommand("bgstats", "BGStats")
self:RegisterChatCommand("hellokitty", "HelloKittyToggle")
self:RegisterChatCommand("hellokittyfix", "HelloKittyFix")
self:RegisterChatCommand("harlemshake", "HarlemShakeToggle")
self:RegisterChatCommand("luaerror", "LuaError")
self:RegisterChatCommand("egrid", "Grid")
self:RegisterChatCommand("moveui", "ToggleMoveMode")
self:RegisterChatCommand("resetui", "ResetUI")
self:RegisterChatCommand("cleanguild", "MassGuildKick")
self:RegisterChatCommand("enableblizzard", "EnableBlizzardAddOns")
self:RegisterChatCommand("estatus", "ShowStatusReport")
-- self:RegisterChatCommand("aprilfools", "") --Don't need this until next april fools
-- arg1 can be 'all' this will scan all registered modules!
self:RegisterChatCommand('bgstats', 'BGStats')
self:RegisterChatCommand('hellokitty', 'HelloKittyToggle')
self:RegisterChatCommand('hellokittyfix', 'HelloKittyFix')
self:RegisterChatCommand('harlemshake', 'HarlemShakeToggle')
self:RegisterChatCommand('luaerror', 'LuaError')
self:RegisterChatCommand('egrid', 'Grid')
self:RegisterChatCommand('moveui', 'ToggleMoveMode')
self:RegisterChatCommand('resetui', 'ResetUI')
self:RegisterChatCommand('cleanguild', 'MassGuildKick')
self:RegisterChatCommand('enableblizzard', 'EnableBlizzardAddOns')
self:RegisterChatCommand('estatus', 'ShowStatusReport')
-- self:RegisterChatCommand('aprilfools', '') --Don't need this until next april fools
if E.private.actionbar.enable then
self:RegisterChatCommand("kb", AB.ActivateBindMode)
self:RegisterChatCommand('kb', AB.ActivateBindMode)
end
end
......@@ -68,9 +68,9 @@ function E:ToggleMoveMode(override, configType)
ElvUIMoverPopupWindow:Show()
if IsAddOnLoaded("ElvUI_OptionsUI") then
if IsAddOnLoaded('ElvUI_OptionsUI') then
if E.Libs.AceConfigDialog then
E.Libs.AceConfigDialog:Close("ElvUI")
E.Libs.AceConfigDialog:Close('ElvUI')
end
if not _G.GameTooltip:IsForbidden() then
......@@ -134,7 +134,7 @@ function E:Grid_Create()
local hStep = hStepheight / E.db.gridSize
grid.boxSize = E.db.gridSize
grid:SetPoint("CENTER", E.UIParent)
grid:SetPoint('CENTER', E.UIParent)
grid:SetSize(width, height)
grid:Show()
......@@ -148,7 +148,7 @@ function E:Grid_Create()
tx:SetDrawLayer('BACKGROUND', 0)
end
tx:ClearAllPoints()
tx:Point("TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0)
tx:Point('TOPLEFT', grid, 'TOPLEFT', i*wStep - (size/2), 0)
tx:Point('BOTTOMRIGHT', grid, 'BOTTOMLEFT', i*wStep + (size/2), 0)
end
......@@ -157,7 +157,7 @@ function E:Grid_Create()
tx:SetColorTexture(1, 0, 0)
tx:SetDrawLayer('BACKGROUND', 1)
tx:ClearAllPoints()
tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2))
tx:Point('TOPLEFT', grid, 'TOPLEFT', 0, -(height/2) + (size/2))
tx:Point('BOTTOMRIGHT', grid, 'TOPRIGHT', 0, -(height/2 + size/2))
end
......@@ -166,14 +166,14 @@ function E:Grid_Create()
tx:SetColorTexture(0, 0, 0)
tx:SetDrawLayer('BACKGROUND', 0)
tx:ClearAllPoints()
tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2))
tx:Point('TOPLEFT', grid, 'TOPLEFT', 0, -(height/2+i*hStep) + (size/2))
tx:Point('BOTTOMRIGHT', grid, 'TOPRIGHT', 0, -(height/2+i*hStep + size/2))
tx = E:Grid_GetRegion()
tx:SetColorTexture(0, 0, 0)
tx:SetDrawLayer('BACKGROUND', 0)
tx:ClearAllPoints()
tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2))
tx:Point('TOPLEFT', grid, 'TOPLEFT', 0, -(height/2-i*hStep) + (size/2))
tx:Point('BOTTOMRIGHT', grid, 'TOPRIGHT', 0, -(height/2-i*hStep + size/2))
end
end
......@@ -202,7 +202,7 @@ function E:NudgeMover(nudgeX, nudgeY)
local x, y, point = E:CalculateMoverPoints(mover, nudgeX, nudgeY)
mover:ClearAllPoints()
mover:Point(mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y)
mover:Point(mover.positionOverride or point, E.UIParent, mover.positionOverride and 'BOTTOMLEFT' or point, x, y)
E:SaveMoverPosition(mover.name)