WoWInterface SVN OpenRDX

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/RDX/Designs/Texts
    from Rev 641 to Rev 645
    Reverse comparison

Rev 641 → Rev 645

StatusText.lua
60,6 → 60,9
]] .. objname .. [[:SetText("");
end
]]; end;
GeneratePaintCodeTest = function(objname) return [[
]] .. objname .. [[:SetText(VFLI.i18n("|cFFFF0000Dead|r"));
]]; end;
});
 
RDX.RegisterStatusTextType({
76,6 → 79,9
]] .. objname .. [[:SetText("");
end
]]; end;
GeneratePaintCodeTest = function(objname) return [[
]] .. objname .. [[:SetText(VFLI.i18n("|cFFFF0000Dead|r"));
]]; end;
});
 
RDX.RegisterStatusTextType({
100,6 → 106,10
]] .. objname .. [[:SetFormattedText("G:%d", unit:GetGroup());
end
]]; end;
GeneratePaintCodeTest = function(objname) return [[
RDX.SetStatusText(]] .. objname .. [[, 1, _white, nil);
]] .. objname .. [[:SetFormattedText("G:%d", 1);
]]; end;
});
 
RDX.RegisterStatusTextType({
221,6 → 231,10
RDX.SetStatusText(]] .. objname .. [[, 1, textcolor, nil);
]] .. objname .. [[:SetText(text);
]]; end;
GeneratePaintCodeTest = function(objname) return [[
RDX.SetStatusText(]] .. objname .. [[, 1, _white, nil);
]] .. objname .. [[:SetText("Boss");
]]; end;
});
 
RDX.RegisterStatusTextType({
512,6 → 526,7
name = "txt_status"; version = 1; multiple = true;
title = VFLI.i18n("Text Status");
category = VFLI.i18n("Texts");
test = true;
IsPossible = function(state)
if not state:Slot("DesignFrame") then return nil; end
if not state:Slot("Base") then return nil; end
573,11 → 588,18
]];
 
local paintCode = statusText[desc.ty].GeneratePaintCode(tname) .. colorExpr;
 
local paintCodeTest;
if statusText[desc.ty].GeneratePaintCodeTest then
paintCodeTest = statusText[desc.ty].GeneratePaintCodeTest(tname) .. colorExpr;
else
paintCodeTest = statusText[desc.ty].GeneratePaintCode(tname) .. colorExpr;
end
 
state:Attach(state:Slot("EmitCreate"), true, function(code) code:AppendCode(createCode); end);
state:Attach(state:Slot("EmitDestroy"), true, function(code) code:AppendCode(destroyCode); end);
state:Attach(state:Slot("EmitCleanup"), true, function(code) code:AppendCode(cleanupCode); end);
state:Attach(state:Slot("EmitPaint"), true, function(code) code:AppendCode(paintCode); end);
state:Attach(state:Slot("EmitPaint"), true, function(code) if desc.test then code:AppendCode(paintCodeTest); else code:AppendCode(paintCode); end end);
 
statusText[desc.ty].OnApply(desc, state);