StablexUI icon indicating copy to clipboard operation
StablexUI copied to clipboard

Dynamic Skin

Open delahee opened this issue 10 years ago • 2 comments

I am discovering the lib and I am already very happy with it.

I feel like there is no "runtime " way to change the skin definitions, can you add a RtXml.regSkin, please ( or have i missed something) ?

(we need for our next productions)

I think I can do it myself but I 'd like to gain more knowledge before that :)

Thx

delahee avatar Jul 01 '14 12:07 delahee

All you need to do is

UIbuilder.skins.set('skinName', function() {
    var skin = new Paint();
    skin.color = 0xFF0000;
    return skin;
});

RealyUniqueName avatar Jul 01 '14 12:07 RealyUniqueName

Yep, I know, I just thought a unified api for "dynamic xml" loading would be nice :) I'll go with this solution in the mean time but I am pretty sure i'll hack some file solution :)

delahee avatar Jul 01 '14 13:07 delahee