开发者

How to creating custom dialog boxes with cocos2d?

开发者 https://www.devze.com 2023-01-20 05:35 出处:网络
top http://i.imgur.com/LszAu.png middle http://i.imgur.com/j82Dr.png bottom http://i.imgur.com/OP9hu.png
  1. top http://i.imgur.com/LszAu.png

  2. middle http://i.imgur.com/j82Dr.png

  3. bottom http://i.imgur.com/OP9hu.png

dialog http://i.开发者_运维技巧imgur.com/ed3W2.png

How do i do with 1,2,3 to a dialog? And dialog can stretch with content? I hope you can write a simple example for me~~thanks!


It's not a simple answer. You need to create a custom layer and detect de text size to change the size of the layer. (in the middle image you apply a scale, the others remains unchanged)

You can take a look at this tutorial: Custom Dialog Boxes Cocos2D

0

精彩评论

暂无评论...
验证码 换一张
取 消