StablexUI Custom Button with 3 Labels

119 views
Skip to first unread message

PSvils

unread,
Oct 3, 2013, 6:25:37 AM10/3/13
to haxe...@googlegroups.com
Hey!

I'm working with Stablex, and so far I really love the architecture of it (especially how there's no special List class, it's just a scroll container that you add elements to, very dynamic :) ).

I was wondering how I could go about making a custom button. The button needs 3 label fields (a main one, and 2 sub-labels), and I noticed that the Button class extends Text directly, so it seems like it functions best with just one (I tried to create a custom element and wrapping 3 <Text> inside a <Button>, but the button skin states didn't work then.

What would be the best way to achieve this? It would be cool if you could assign up/over/down skins to any element (or can you already?), since then you can make anything behave like a button, again very dynamic.

I hope this question isn't the result of a lack of me reading the docs, but I think I checked all of them, as well as browsed the samples, didn't see anything similar to what I need.

Thanks!

P.

Alexander Kuzmenko

unread,
Oct 3, 2013, 10:57:24 AM10/3/13
to haxe...@googlegroups.com
I usually use xml-based classes for such custom widgets. 
Here is example for html5 and flash. And here is source code for this example: https://github.com/RealyUniqueName/StablexUI-examples/tree/master/xml_based_custom_button

четверг, 3 октября 2013 г., 14:25:37 UTC+4 пользователь PSvils написал:
Reply all
Reply to author
Forward
0 new messages