/trunk/RDX/Designs/Variables
end; |
ExposeFeature = function(desc, state, errs) |
if not desc then VFL.AddError(errs, VFLI.i18n("No descriptor.")); return nil; end |
if not desc.raColor5 then desc.raColor5 = _alphafull; end |
if (not RDXDAL.FindSet(desc.set1)) or (not RDXDAL.FindSet(desc.set2)) or (not RDXDAL.FindSet(desc.set3)) or (not RDXDAL.FindSet(desc.set4)) then |
VFL.AddError(errs, VFLI.i18n("Invalid set pointer.")); |
return nil; |
deColor_cf[2] = ]] .. Serialize(desc.raColor2) .. [[; |
deColor_cf[3] = ]] .. Serialize(desc.raColor3) .. [[; |
deColor_cf[4] = ]] .. Serialize(desc.raColor4) .. [[; |
deColor_cf[5] = ]] .. Serialize(desc.raColor5) .. [[; |
local deTex_cf = {}; |
deTex_cf[1] = ]] .. string.format("%q", desc.texture1.path) .. [[; |
decurseColor = deColor_cf[4]; |
decurseIcon = deTex_cf[4]; |
decurse_possible = true; |
else |
decurseColor = deColor_cf[5]; |
decurse_possible = false |
end |
]]); |
end |
local tsel4 = VFLUI.MakeTextureSelectButton(er4, desc.texture4); tsel4:Show(); |
er4:EmbedChild(tsel4); er4:Show(); |
ui:InsertFrame(er4); |
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Default"))); |
local er5 = VFLUI.EmbedRight(ui, VFLI.i18n("Default color")); |
local swatch_raColor5 = VFLUI.ColorSwatch:new(er5); |
swatch_raColor5:Show(); |
if desc and desc.raColor5 then swatch_raColor5:SetColor(VFL.explodeRGBA(desc.raColor5)); end |
er5:EmbedChild(swatch_raColor5); er5:Show(); |
ui:InsertFrame(er5); |
function ui:GetDescriptor() |
return { |
raColor2 = swatch_raColor2:GetColor(); |
raColor3 = swatch_raColor3:GetColor(); |
raColor4 = swatch_raColor4:GetColor(); |
raColor5 = swatch_raColor5:GetColor(); |
}; |
end |
raColor2 = _green; |
raColor3 = _yellow; |
raColor4 = _red; |
raColor5 = _alphafull; |
}; |
end; |
}); |