mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
cosmetic
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
--Cache global variables
|
--Cache global variables
|
||||||
local assert = assert
|
|
||||||
local error = error
|
local error = error
|
||||||
local geterrorhandler = geterrorhandler
|
local geterrorhandler = geterrorhandler
|
||||||
local loadstring = loadstring
|
local loadstring = loadstring
|
||||||
@@ -12,38 +11,8 @@ local ceil, floor = math.ceil, math.floor
|
|||||||
local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
|
local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
|
||||||
local getn, setn, tinsert = table.getn, table.setn, table.insert
|
local getn, setn, tinsert = table.getn, table.setn, table.insert
|
||||||
|
|
||||||
local escapeSequences = {
|
|
||||||
["\a"] = "\\a", -- Bell
|
|
||||||
["\b"] = "\\b", -- Backspace
|
|
||||||
["\t"] = "\\t", -- Horizontal tab
|
|
||||||
["\n"] = "\\n", -- Newline
|
|
||||||
["\v"] = "\\v", -- Vertical tab
|
|
||||||
["\f"] = "\\f", -- Form feed
|
|
||||||
["\r"] = "\\r", -- Carriage return
|
|
||||||
["\\"] = "\\\\", -- Backslash
|
|
||||||
["\""] = "\\\"", -- Quotation mark
|
|
||||||
["|"] = "||",
|
|
||||||
[" "] = "%s",
|
|
||||||
|
|
||||||
[" "] = "%s",
|
|
||||||
["!"] = "\\!",
|
|
||||||
["#"] = "\\#",
|
|
||||||
["$"] = "\\$",
|
|
||||||
["%"] = "\\%",
|
|
||||||
["&"] = "\\&",
|
|
||||||
["'"] = "\\'",
|
|
||||||
["("] = "\\(",
|
|
||||||
[")"] = "\\)",
|
|
||||||
["*"] = "\\*",
|
|
||||||
["+"] = "\\+",
|
|
||||||
[","] = "\\,",
|
|
||||||
["-"] = "\\-",
|
|
||||||
["."] = "\\.",
|
|
||||||
["/"] = "\\/"
|
|
||||||
}
|
|
||||||
|
|
||||||
math.huge = 1/0
|
math.huge = 1/0
|
||||||
string.gmatch = gfind
|
string.gmatch = string.gfind
|
||||||
|
|
||||||
function difftime(time2, time1)
|
function difftime(time2, time1)
|
||||||
if type(time2) ~= "number" then
|
if type(time2) ~= "number" then
|
||||||
@@ -150,6 +119,34 @@ function string.split(delimiter, str)
|
|||||||
end
|
end
|
||||||
strsplit = string.split
|
strsplit = string.split
|
||||||
|
|
||||||
|
local escapeSequences = {
|
||||||
|
["\a"] = "\\a", -- Bell
|
||||||
|
["\b"] = "\\b", -- Backspace
|
||||||
|
["\t"] = "\\t", -- Horizontal tab
|
||||||
|
["\n"] = "\\n", -- Newline
|
||||||
|
["\v"] = "\\v", -- Vertical tab
|
||||||
|
["\f"] = "\\f", -- Form feed
|
||||||
|
["\r"] = "\\r", -- Carriage return
|
||||||
|
["\\"] = "\\\\", -- Backslash
|
||||||
|
["\""] = "\\\"", -- Quotation mark
|
||||||
|
["|"] = "||",
|
||||||
|
[" "] = "%s",
|
||||||
|
|
||||||
|
["!"] = "\\!",
|
||||||
|
["#"] = "\\#",
|
||||||
|
["$"] = "\\$",
|
||||||
|
["%"] = "\\%",
|
||||||
|
["&"] = "\\&",
|
||||||
|
["'"] = "\\'",
|
||||||
|
["("] = "\\(",
|
||||||
|
[")"] = "\\)",
|
||||||
|
["*"] = "\\*",
|
||||||
|
["+"] = "\\+",
|
||||||
|
[","] = "\\,",
|
||||||
|
["-"] = "\\-",
|
||||||
|
["."] = "\\.",
|
||||||
|
["/"] = "\\/"
|
||||||
|
}
|
||||||
function string.trim(str, chars)
|
function string.trim(str, chars)
|
||||||
if type(str) ~= "string" and type(str) ~= "number" then
|
if type(str) ~= "string" and type(str) ~= "number" then
|
||||||
error(format("bad argument #1 to 'trim' (string expected, got %s)", str and type(str) or "no value"), 2)
|
error(format("bad argument #1 to 'trim' (string expected, got %s)", str and type(str) or "no value"), 2)
|
||||||
|
|||||||
@@ -232,10 +232,8 @@ function GetInstanceInfo()
|
|||||||
local name = GetRealZoneText()
|
local name = GetRealZoneText()
|
||||||
|
|
||||||
local difficulty = 1
|
local difficulty = 1
|
||||||
local difficultyName = DUNGEON_DIFFICULTY1
|
|
||||||
local maxPlayers = GetMaxPlayersByType(instanceType, name)
|
local maxPlayers = GetMaxPlayersByType(instanceType, name)
|
||||||
|
local difficultyName = format("%d %s", maxPlayers, DUNGEON_DIFFICULTY1)
|
||||||
difficultyName = format("%d %s", maxPlayers, difficultyName)
|
|
||||||
|
|
||||||
return name, instanceType, difficulty, difficultyName, maxPlayers
|
return name, instanceType, difficulty, difficultyName, maxPlayers
|
||||||
end
|
end
|
||||||
@@ -291,14 +289,14 @@ end
|
|||||||
|
|
||||||
local function OnSizeChanged()
|
local function OnSizeChanged()
|
||||||
local width, height = this:GetWidth(), this:GetHeight()
|
local width, height = this:GetWidth(), this:GetHeight()
|
||||||
|
|
||||||
this.texturePointer.width = width
|
this.texturePointer.width = width
|
||||||
this.texturePointer.height = height
|
this.texturePointer.height = height
|
||||||
this.texturePointer:SetWidth(width)
|
this.texturePointer:SetWidth(width)
|
||||||
this.texturePointer:SetHeight(height)
|
this.texturePointer:SetHeight(height)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function OnValueChanged()
|
local function OnValueChanged(value)
|
||||||
local value = arg1
|
|
||||||
local _, max = this:GetMinMaxValues()
|
local _, max = this:GetMinMaxValues()
|
||||||
|
|
||||||
if this.texturePointer.verticalOrientation then
|
if this.texturePointer.verticalOrientation then
|
||||||
|
|||||||
Reference in New Issue
Block a user