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
|
||||
local assert = assert
|
||||
local error = error
|
||||
local geterrorhandler = geterrorhandler
|
||||
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 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
|
||||
string.gmatch = gfind
|
||||
string.gmatch = string.gfind
|
||||
|
||||
function difftime(time2, time1)
|
||||
if type(time2) ~= "number" then
|
||||
@@ -150,6 +119,34 @@ function string.split(delimiter, str)
|
||||
end
|
||||
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)
|
||||
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)
|
||||
|
||||
@@ -232,10 +232,8 @@ function GetInstanceInfo()
|
||||
local name = GetRealZoneText()
|
||||
|
||||
local difficulty = 1
|
||||
local difficultyName = DUNGEON_DIFFICULTY1
|
||||
local maxPlayers = GetMaxPlayersByType(instanceType, name)
|
||||
|
||||
difficultyName = format("%d %s", maxPlayers, difficultyName)
|
||||
local difficultyName = format("%d %s", maxPlayers, DUNGEON_DIFFICULTY1)
|
||||
|
||||
return name, instanceType, difficulty, difficultyName, maxPlayers
|
||||
end
|
||||
@@ -291,14 +289,14 @@ end
|
||||
|
||||
local function OnSizeChanged()
|
||||
local width, height = this:GetWidth(), this:GetHeight()
|
||||
|
||||
this.texturePointer.width = width
|
||||
this.texturePointer.height = height
|
||||
this.texturePointer:SetWidth(width)
|
||||
this.texturePointer:SetHeight(height)
|
||||
end
|
||||
|
||||
local function OnValueChanged()
|
||||
local value = arg1
|
||||
local function OnValueChanged(value)
|
||||
local _, max = this:GetMinMaxValues()
|
||||
|
||||
if this.texturePointer.verticalOrientation then
|
||||
|
||||
Reference in New Issue
Block a user