This commit is contained in:
parent
abeadb74af
commit
dbbc942828
24
game/game.js
24
game/game.js
|
@ -10955,7 +10955,9 @@
|
||||||
ui.ctx=ui.canvas.getContext('2d');
|
ui.ctx=ui.canvas.getContext('2d');
|
||||||
ui.configbg=ui.create.div("#click");
|
ui.configbg=ui.create.div("#click");
|
||||||
ui.configbg.listen(ui.click.config2);
|
ui.configbg.listen(ui.click.config2);
|
||||||
ui.configbg.oncontextmenu=ui.click.config2;
|
if(!lib.config.touchscreen){
|
||||||
|
ui.configbg.oncontextmenu=ui.click.config2;
|
||||||
|
}
|
||||||
ui.config=ui.create.div('#sidebar2.content');
|
ui.config=ui.create.div('#sidebar2.content');
|
||||||
ui.config.listen(function(){
|
ui.config.listen(function(){
|
||||||
if(_status.reloading) return;
|
if(_status.reloading) return;
|
||||||
|
@ -10972,10 +10974,12 @@
|
||||||
game.check();
|
game.check();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ui.config.oncontextmenu=function(e){
|
if(!lib.config.touchscreen){
|
||||||
e.stopPropagation();
|
ui.config.oncontextmenu=function(e){
|
||||||
return false;
|
e.stopPropagation();
|
||||||
};
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
ui.sidebar.ontouchstart=ui.click.touchStart;
|
ui.sidebar.ontouchstart=ui.click.touchStart;
|
||||||
ui.config.ontouchstart=ui.click.touchStart;
|
ui.config.ontouchstart=ui.click.touchStart;
|
||||||
|
@ -13116,7 +13120,9 @@
|
||||||
else{
|
else{
|
||||||
node.addEventListener('click',ui.click.resume);
|
node.addEventListener('click',ui.click.resume);
|
||||||
}
|
}
|
||||||
node.oncontextmenu=ui.click.resume;
|
if(!lib.config.touchscreen){
|
||||||
|
node.oncontextmenu=ui.click.resume;
|
||||||
|
}
|
||||||
|
|
||||||
var node2=ui.create.div('#paused2',node);
|
var node2=ui.create.div('#paused2',node);
|
||||||
node2.innerHTML='已暂停';
|
node2.innerHTML='已暂停';
|
||||||
|
@ -14446,7 +14452,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
layer.addEventListener(lib.config.touchscreen?'touchend':'click',clicklayer);
|
layer.addEventListener(lib.config.touchscreen?'touchend':'click',clicklayer);
|
||||||
layer.oncontextmenu=clicklayer;
|
if(!lib.config.touchscreen) layer.oncontextmenu=clicklayer;
|
||||||
lib.placePoppedDialog(uiintro,e);
|
lib.placePoppedDialog(uiintro,e);
|
||||||
uiintro.style.zIndex=21;
|
uiintro.style.zIndex=21;
|
||||||
|
|
||||||
|
@ -17472,7 +17478,9 @@
|
||||||
document.onmousemove=ui.click.windowmousemove;
|
document.onmousemove=ui.click.windowmousemove;
|
||||||
document.onmousedown=ui.click.windowmousedown;
|
document.onmousedown=ui.click.windowmousedown;
|
||||||
document.onmouseup=ui.click.windowmouseup;
|
document.onmouseup=ui.click.windowmouseup;
|
||||||
document.oncontextmenu=ui.click.right;
|
if(!lib.config.touchscreen){
|
||||||
|
document.oncontextmenu=ui.click.right;
|
||||||
|
}
|
||||||
document.ontouchend=function(e){
|
document.ontouchend=function(e){
|
||||||
if(e.touches.length==1&&!_status.dragged){
|
if(e.touches.length==1&&!_status.dragged){
|
||||||
ui.click.pause();
|
ui.click.pause();
|
||||||
|
|
Loading…
Reference in New Issue