This commit is contained in:
libccy 2015-10-31 11:20:59 +08:00
parent 37b8ca7dbe
commit 5844ae922c
2 changed files with 23 additions and 13 deletions

View File

@ -1,9 +1,2 @@
1.4.0
弹出菜单改进
选项菜单
游戏速度选项
游戏未正常载入时可重置游戏
导入/导出游戏数据
可禁用单个武将/卡牌
作弊、换人、输入js命令
修正国战明置bug
game.print命令在命令输入框中输出结果

View File

@ -1313,7 +1313,7 @@
'<div style="margin:10px">角色操作</div><ul style="margin-top:0"><li>受到伤害<br>player.damage(source,<br>num)'+
'<li>回复体力<br>player.recover(num)<li>摸牌<br>player.draw(num)<li>获得牌<br>player.gain(cards)<li>弃牌<br>player.discard(cards)'+
'<li>使用卡牌<br>player.useCard(card,<br>targets)<li>死亡<br>player.die()<li>复活<br>player.revive(hp)</ul>'+
'<div style="margin:10px">游戏操作</div><ul style="margin-top:0"><li>在历史中记录<br>game.log(str)<li>游戏结束<br>game.over(bool)'+
'<div style="margin:10px">游戏操作</div><ul style="margin-top:0"><li>在命令输入框中输出结果<br>game.print(str)<li>游戏结束<br>game.over(bool)'+
'<li>角色资料<br>lib.character<li>卡牌资料<br>lib.card'
},
setPopped:function(node,func,width,height){
@ -1356,6 +1356,12 @@
node.addEventListener('mousemove',ui.click.mousemove);
return node;
},
setScroll:function(node){
node.ontouchstart=ui.click.touchStart;
node.ontouchmove = ui.click.touchScroll;
node.style.WebkitOverflowScrolling='touch';
return node;
},
setLongPress:function(node,func){
node.addEventListener('touchstart',ui.click.longpressdown);
node.addEventListener('touchend',ui.click.longpresscancel);
@ -9780,8 +9786,8 @@
var createMenu=function(tabs,config){
var createPage=function(position){
var node=ui.create.div(position);
ui.create.div('.left.pane',node);
ui.create.div('.right.pane',node);
lib.setScroll(ui.create.div('.left.pane',node));
lib.setScroll(ui.create.div('.right.pane',node));
return node;
};
var menu=ui.create.div('.main.menu.dialog.popped.static',config.position,function(e){
@ -10668,13 +10674,24 @@
text.style.height='80px';
text.style.resize='none';
page.appendChild(text);
var textstr='';
var perserveMenu=false;
game.print=function(str){
textstr+=str+'\n';
text.value=textstr;
perserveMenu=true;
}
runButton.listen(function(){
textstr='';
perserveMenu=false;
try{
eval(text.value);
}
catch(e){}
text.value='';
clickContainer.call(menuContainer);
if(!perserveMenu){
text.value='';
clickContainer.call(menuContainer);
}
});
}());