var HZ_createRoom = jx.BaseView.extend({//红中麻将
ctor : function() {
this._super(); this.addLayout(res.HZ_createRoom_json, true); this.addClickListenerByName("imgX_0", this.hide.bind(this));//关闭按钮
this.addClickListenerByName("btn_OK", this.onBtnOK.bind(this));//确认按钮
//this.enableBtnTitleStroke(this.getComponentByName("btn_OK"));//确认文本颜色 this.addClickListenerByName("HZ_btn", this.HZ_btn.bind(this));//红中麻将
this.addClickListenerByName("JX_btn", this.JX_btn.bind(this));//江西麻将 this.HZ_blue = this.getComponentByName("HZ_blue");
this.HZ_yellow = this.getComponentByName("HZ_yellow");
this.JX_blue = this.getComponentByName("JX_blue");
this.JX_yellow = this.getComponentByName("JX_yellow"); //this.roundNum=1;
this.topType=1; //this.roundNum1 = this.getComponentByName("roundNum1");//房卡 this.topType1 = this.getComponentByName("topType1");
this.topType2 = this.getComponentByName("topType2"); this.addClickListenerByName("topTypeSet1", this.topTypeSet.bind(this,1));
this.addClickListenerByName("topTypeSet2", this.topTypeSet.bind(this,2)); this.refreshAll();
},
topTypeSet : function(value) {
this.topType=value;
this.refreshAll();
},
refreshAll : function() {
/*
this.roundNum1.setSelected(this.roundNum==1);
this.roundNum2.setSelected(this.roundNum==2); console.log( this.roundNum1); this.cardMod1.setSelected(this.cardMod==1); this.cancelWind1.setSelected(this.cancelWind);
this.catchKong1.setSelected(this.catchKong); this.ghostType2.setSelected(this.ghostType==2);
this.ghostType3.setSelected(this.ghostType==3); this.horseType1.setSelected(this.horseType==1);
this.horseType2.setSelected(this.horseType==2);
this.horseType3.setSelected(this.horseType==3);
this.horseType4.setSelected(this.horseType==4);
this.horseType5.setSelected(this.horseType==5);
*/
this.topType1.setSelected(this.topType==1);
this.topType2.setSelected(this.topType==2);
},
HZ_btn:function()
{ this.JX_blue.setVisible(true);
this.HZ_yellow.setVisible(true);
jx.utils.playEffect(sound.button_mp3);
if(this.jx_createRoom)
{
this.jx_createRoom.hide();
}
},
JX_btn:function()
{
this.HZ_yellow.setVisible(false);
this.JX_blue.setVisible(false);
jx.utils.playEffect(sound.button_mp3); this.jx_createRoom = new JX_createRoom();
//jx_createRoom.show();
this.addChild(this.jx_createRoom); },
onBtnOK: function()
{ var cb = this.cb;
this.hide(); // var result=""+this.roundNum+","+this.cardMod;
// if (this.seaMoon){
// result=result+",1";
// }else{
// result=result+",0";
// }
// if (this.cancelWind){
// result=result+",1";
// }else{
// result=result+",0";
// }
// if (this.catchKong){
// result=result+",1";
// }else{
// result=result+",0";
// }
// result=result+","+this.ghostType+","+this.horseType+","+this.topType;
// //console.log(result)
cb(true, result);
}, setCallback : function(cb)
{
this.cb = cb;
} });
HZ_createRoom.show = function(cb)
{
var dlg = new HZ_createRoom();
dlg.setCallback(cb);
dlg.show();
};

最新文章

  1. mysql 常用查询
  2. break和continue的区别以及标签label的使用
  3. A+B for Matrices 及 C++ transform的用法
  4. VMware vSphere 5.5的12个更新亮点(1)
  5. 【转】Appium根据xpath获取控件实例随笔
  6. java 集合大家族
  7. WinSock WSAEventSelect 模型总结
  8. Django restful 规范
  9. [机器学习] k近邻算法
  10. 删除一个存在的RabbitMQ队列
  11. Python打包方法——Pyinstaller
  12. windows安装 centos
  13. 莫烦tensorflow(3)-Variable
  14. LOJ 2585 「APIO2018」新家 ——线段树分治+二分答案
  15. Java初转型-SSM配置文件
  16. Web开发者工具下载
  17. sublime 一些常用功能和快捷键
  18. USACO 5.1 Starry Night
  19. voith项目配置服务程序
  20. 一道题浅析 i++,++i,i+1及(引用)&i的区别

热门文章

  1. [No0000116]SQLServer启用sa账户
  2. 【每日一题】 UVA - 1599 Ideal Path 字典序最短路
  3. 2017年蓝桥杯省赛A组c++第1题(走迷宫)
  4. 待选框、目标框select项目左右移动
  5. Page6:关于能控性、能观性、能测性及其判据(1)[Linear System Theory]
  6. [knowledge][ETA] Encrypted Traffic Analytics
  7. Delphi 打开网址
  8. flex布局 响应式布局
  9. java 大数据运算 BigInteger BigDecimal
  10. java System类的一些静态方法