On Wed, Jul 13, 2011 at 3:04 PM, Mustafa Yontar <[email protected]>wrote:
> hi all;
>
> i want set layer height and with. How to set ?
>
> --
>
Which layer exactly ?
cocos.layer.Layer has no width nor height
cocos.layer.ColorLayer can receive keyword arguments width and height, so
you can
layer = cocos.layer.ColorLayer(red,green, blue, alpha, width=800,
height=600)
Note that modifying after creation the members width , height has no effect.
cocos.layer.ScrollableLayer can define and set px_width and px_height, like
layer = cocos.layer.ScrollableLayer()
layer.px_width = 800
layer.px_height = 600
Or, if you are subclasing you can
class MyScrollable( cocos.layer.ScrollableLayer ):
px_width = 800
px_height = 600
...
--
claudio
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en.