SplitmediaLabsLimited / xui-old

1 stars 1 forks source link

make item inactive/active #6

Closed dabruhce closed 9 years ago

dabruhce commented 9 years ago

I know theres a newer version of the framework, but I haven't had a chance to port/look at it yet.

With this framework how difficult is it to enable/disable an item? For example if I wanted to make a Text item inactive on the scene?

I couldn't find anything that would do it in this api, is it possible or should I stop my search?

ghost commented 9 years ago

Yes, that's missing on this framework. You could however make use of the internal module to manually set it.

I would however recommend that you try out using the xjs framework since it's much more 'complete' than this framework :)

dabruhce commented 9 years ago

This doesn't actually work.

var slot = internal.Item.attach(id, 0); internal.Item.set('prop:visible', itemString, slot);

it updates the value, but the change doesnt get reflected in xsplit. ie. things dont disappear when set to 0. I'm looking at updating the fuctions I have with the new xjsframework version, will post any issues there.

ghost commented 9 years ago

Sorry, I made a mistake there. You should send a string '0' instead of a integer 0 to internal item set. ie. internal.Item.set('prop:visible', '0', slot);

But since you are migrating to xjs framework, it would be as simple as using setVisible(false);

dabruhce commented 9 years ago

oh tried set visible in new framework, so much cleaner. Ill check it out a bit more

ghost commented 9 years ago

Cool :) will close this then :D