hiloteam / Hilo

A Cross-end HTML5 Game development solution
https://hiloteam.github.io/
MIT License
5.93k stars 863 forks source link

BitmapText 的 width 和 height 无效。 #110

Closed ben-yip closed 6 years ago

ben-yip commented 6 years ago
06wj commented 6 years ago

你是要改大小么 用 scaleX 和 scaleY

ben-yip commented 6 years ago

嗯,因为我每个对象的宽高都是按实际舞台尺寸的百分比算的,width/height 无效的话,也能通过素材实际宽度把scaleX/Y算出来。

不过这算是bug吧,是实现上有难度吗

06wj commented 6 years ago

Hilo里面缩放必须用scale

ben-yip commented 6 years ago

缩放没问题,我说的是直接修改 BitmapText 的 width 和 height 无效的问题,因为其他的 View 可以呀

06wj commented 6 years ago

BitmapText是个容器 容器设置宽高是没用的