PHP код:
-------------------------------------------------------------------
-- Table library
local tab = table
foreach = tab.foreach
foreachi = tab.foreachi
getn = tab.getn
tinsert = tab.insert
tremove = tab.remove
sort = tab.sort
wipe = tab.wipe
-------------------------------------------------------------------
-- math library
local math = math
abs = math.abs
acos = function (x) return math.deg(math.acos(x)) end
asin = function (x) return math.deg(math.asin(x)) end
atan = function (x) return math.deg(math.atan(x)) end
atan2 = function (x,y) return math.deg(math.atan2(x,y)) end
ceil = math.ceil
cos = function (x) return math.cos(math.rad(x)) end
deg = math.deg
exp = math.exp
floor = math.floor
frexp = math.frexp
ldexp = math.ldexp
log = math.log
log10 = math.log10
max = math.max
min = math.min
mod = math.fmod
PI = math.pi
--??? pow = math.pow
rad = math.rad
random = math.random
--randomseed = math.randomseed
sin = function (x) return math.sin(math.rad(x)) end
sqrt = math.sqrt
tan = function (x) return math.tan(math.rad(x)) end
-------------------------------------------------------------------
-- string library
local str = string
strbyte = str.byte
strchar = str.char
strfind = str.find
format = str.format
gmatch = str.gmatch
gsub = str.gsub
strlen = str.len
strlower = str.lower
strmatch = str.match
strrep = str.rep
strrev = str.reverse
strsub = str.sub
strupper = str.upper
-------------------------------------------------------------------
-- Add custom string functions to the string table
str.trim = strtrim
str.split = strsplit
str.join = strjoin
str.replace = strreplace
compat.lua
0
-------------------------------------------------------------------
-- Table library
local tab = table
foreach = tab.foreach
foreachi = tab.foreachi
getn = tab.getn
tinsert = tab.insert
tremove = tab.remove
sort = tab.sort
wipe = tab.wipe
-------------------------------------------------------------------
-- math library
local math = math
abs = math.abs
acos = function (x) return math.deg(math.acos(x)) end
asin = function (x) return math.deg(math.asin(x)) end
atan = function (x) return math.deg(math.atan(x)) end
atan2 = function (x,y) return math.deg(math.atan2(x,y)) end
ceil = math.ceil
cos = function (x) return math.cos(math.rad(x)) end
deg = math.deg
exp = math.exp
floor = math.floor
frexp = math.frexp
ldexp = math.ldexp
log = math.log
log10 = math.log10
max = math.max
min = math.min
mod = math.fmod
PI = math.pi
--??? pow = math.pow
rad = math.rad
random = math.random
--randomseed = math.randomseed
sin = function (x) return math.sin(math.rad(x)) end
sqrt = math.sqrt
tan = function (x) return math.tan(math.rad(x)) end
-------------------------------------------------------------------
-- string library
local str = string
strbyte = str.byte
strchar = str.char
strfind = str.find
format = str.format
gmatch = str.gmatch
gsub = str.gsub
strlen = str.len
strlower = str.lower
strmatch = str.match
strrep = str.rep
strrev = str.reverse
strsub = str.sub
strupper = str.upper
-------------------------------------------------------------------
-- Add custom string functions to the string table
str.trim = strtrim
str.split = strsplit
str.join = strjoin
str.replace = strreplace
compat.lua
0
NORMAL_FONT_COLOR = {r=1.0, g=0.82, b=0};
HIGHLIGHT_FONT_COLOR = {r=1.0, g=1.0, b=1.0};
GRAY_FONT_COLOR = {r=0.5, g=0.5, b=0.5};
GREEN_FONT_COLOR = {r=0.1, g=1.0, b=0.1};
RED_FONT_COLOR = {r=1.0, g=0.1, b=0.1};
BLUE_FONT_COLOR = {r=0, g=0.749, b=0.953};
Interface\GlueXML\GlueFontStyles.xml:<Scripts>
0
Localize();
Interface\GlueXML\GlueLocalization.xml:<Scripts>
0
function _ERRORMESSAGE(message)
debuginfo();
if ( not ScriptErrors:IsShown() ) then
ScriptErrors_Message:SetText(message);
ScriptErrors:Show();
end
return message;
end
function message(text)
_ERRORMESSAGE(text);
end
seterrorhandler(_ERRORMESSAGE);
Interface\GlueXML\GlueBasicControls.xml:<Scripts>
0
function GlueTooltip_SetOwner(self, tooltip, xOffset, yOffset, myPoint, ownerPoint)
if ( not self ) then
return;
end
if ( not tooltip ) then
tooltip = GlueTooltip;
end
if ( not xOffset ) then
xOffset = 0;
end
if ( not yOffset ) then
yOffset = 0;
end
if ( not myPoint ) then
myPoint = "BOTTOMLEFT";
end
if ( not ownerPoint ) then
ownerPoint = "TOPRIGHT";
end
tooltip:SetPoint(myPoint, self, ownerPoint, xOffset, yOffset);
tooltip:Show();
end
function GlueTooltip_SetText(text, tooltip, r, g, b)
if ( not tooltip ) then
tooltip = GlueTooltip;
end
local textString = _G[tooltip:GetName().."TextLeft1"];
textString:SetText(text);
if ( r ) then
textString:SetTextColor(r, g, b);
end
textString:Show();
tooltip:SetWidth(textString:GetWidth()+25);
tooltip:SetHeight(textString:GetHeight()+20);
end
function GlueTooltip_SetFont(tooltip, font)
if ( not tooltip ) then
tooltip = GlueTooltip;
end
local textString = _G[tooltip:GetName().."TextLeft1"];
textString:SetFontObject(font);
local textString = _G[tooltip:GetName().."TextRight1"];
textString:SetFontObject(font);
local textString = _G[tooltip:GetName().."TextLeft2"];
textString:SetFontObject(font);
local textString = _G[tooltip:GetName().."TextRight2"];
textString:SetFontObject(font);
end
Interface\GlueXML\GlueTooltip.xml:<Scripts>
0
LocalizePost();
Interface\GlueXML\GlueLocalizationPost.xml:<Scripts>
0