cc.Label

默认创建的label无法修改宽高属性

  原因是overflow默认为none,为none时自动计算大小,改为clamp或者shrink就可以了

Label字体如何加粗

  richtext通过粗体标签来加粗字体

  可以用label._sgNode.enableBold(true)就是加粗了

Label字体如何修改颜色

  在代码中以node.color访问

  以cc.Color.RED枚举赋值

  或new cc.Color(r,g,b,a)实例赋值

  或

    var color = cc.Color.BLACK;

    color.fromHEX(“#ff0000”);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2021-08-11
猜你喜欢
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
相关资源
相似解决方案