cocos2d-js-v3.6.1
cocos studio v2.3.2
1.字体Text选择微软雅黑,字体号等
Pro_difen = ccui.helper.seekWidgetByName(m_mainScene,"Pro_difen"); //底分
Text_difen = ccui.helper.seekWidgetByName(Pro_difen,"Text_difen"); //底分
Text_difen.setFontName("Microsoft Yahei");
Text_difen.setFontSize(30);
2.修改text的值
Text_time_me.setString(this.left_time_count.toString());
3.按钮显示灰色,不可点击
然后代码中处理:
BTN_buchu = ccui.helper.seekWidgetByName(poker_layer_chupai,"BTN_buchu");
BTN_buchu.addTouchEventListener(this.btnListen);
BTN_buchu.setBright(false); BTN_buchu.setTouchEnabled(false);//设置不出按钮灰色,点击失效