scroll
This commit is contained in:
parent
05bc90d97d
commit
df81ef3f22
49
game/game.js
49
game/game.js
|
@ -12098,6 +12098,15 @@
|
||||||
var game={
|
var game={
|
||||||
online:false,
|
online:false,
|
||||||
onlineID:null,
|
onlineID:null,
|
||||||
|
closePopped:function(){
|
||||||
|
if(ui.currentpopped){
|
||||||
|
if(ui.currentpopped._uiintro){
|
||||||
|
ui.currentpopped._uiintro.delete();
|
||||||
|
delete ui.currentpopped._uiintro;
|
||||||
|
}
|
||||||
|
delete ui.currentpopped;
|
||||||
|
}
|
||||||
|
},
|
||||||
broadcast:function(){
|
broadcast:function(){
|
||||||
if(!lib.node||!lib.node.clients||game.online) return;
|
if(!lib.node||!lib.node.clients||game.online) return;
|
||||||
for(var i=0;i<lib.node.clients.length;i++){
|
for(var i=0;i<lib.node.clients.length;i++){
|
||||||
|
@ -16987,7 +16996,7 @@
|
||||||
dialog:function(){
|
dialog:function(){
|
||||||
var i;
|
var i;
|
||||||
var hidden=false;
|
var hidden=false;
|
||||||
var noscroll=false;
|
var notouchscroll=false;
|
||||||
var dialog=ui.create.div('.dialog');
|
var dialog=ui.create.div('.dialog');
|
||||||
dialog.contentContainer=ui.create.div('.content-container',dialog);
|
dialog.contentContainer=ui.create.div('.content-container',dialog);
|
||||||
dialog.content=ui.create.div('.content',dialog.contentContainer);
|
dialog.content=ui.create.div('.content',dialog.contentContainer);
|
||||||
|
@ -17000,14 +17009,14 @@
|
||||||
for(i=0;i<arguments.length;i++){
|
for(i=0;i<arguments.length;i++){
|
||||||
if(typeof arguments[i]=='boolean') dialog.static=arguments[i];
|
if(typeof arguments[i]=='boolean') dialog.static=arguments[i];
|
||||||
else if(arguments[i]=='hidden') hidden=true;
|
else if(arguments[i]=='hidden') hidden=true;
|
||||||
else if(arguments[i]=='noscroll') noscroll=true;
|
else if(arguments[i]=='notouchscroll') notouchscroll=true;
|
||||||
else dialog.add(arguments[i]);
|
else dialog.add(arguments[i]);
|
||||||
}
|
}
|
||||||
if(!hidden){
|
if(!hidden){
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
if(!lib.config.touchscreen) dialog.contentContainer.onscroll=ui.update;
|
if(!lib.config.touchscreen) dialog.contentContainer.onscroll=ui.update;
|
||||||
if(!noscroll){
|
if(!notouchscroll){
|
||||||
dialog.contentContainer.ontouchstart=ui.click.dialogtouchStart;
|
dialog.contentContainer.ontouchstart=ui.click.dialogtouchStart;
|
||||||
dialog.contentContainer.ontouchmove = ui.click.touchScroll;
|
dialog.contentContainer.ontouchmove = ui.click.touchScroll;
|
||||||
dialog.contentContainer.style.WebkitOverflowScrolling='touch';
|
dialog.contentContainer.style.WebkitOverflowScrolling='touch';
|
||||||
|
@ -21189,7 +21198,7 @@
|
||||||
roundmenu:function(){
|
roundmenu:function(){
|
||||||
switch(lib.config.round_menu_func){
|
switch(lib.config.round_menu_func){
|
||||||
case 'system':
|
case 'system':
|
||||||
ui.click.window();
|
game.closePopped();
|
||||||
ui.system1.classList.add('shown');
|
ui.system1.classList.add('shown');
|
||||||
ui.system2.classList.add('shown');
|
ui.system2.classList.add('shown');
|
||||||
if(!ui.menuContainer.classList.contains('hidden')){
|
if(!ui.menuContainer.classList.contains('hidden')){
|
||||||
|
@ -21198,7 +21207,7 @@
|
||||||
ui.click.shortcut();
|
ui.click.shortcut();
|
||||||
break;
|
break;
|
||||||
case 'menu':
|
case 'menu':
|
||||||
ui.click.window();
|
game.closePopped();
|
||||||
game.pause2();
|
game.pause2();
|
||||||
ui.click.configMenu();
|
ui.click.configMenu();
|
||||||
ui.system1.classList.remove('shown');
|
ui.system1.classList.remove('shown');
|
||||||
|
@ -21867,7 +21876,7 @@
|
||||||
var goswipe=function(action){
|
var goswipe=function(action){
|
||||||
switch(action){
|
switch(action){
|
||||||
case 'system':
|
case 'system':
|
||||||
ui.click.window();
|
game.closePopped();
|
||||||
ui.system1.classList.add('shown');
|
ui.system1.classList.add('shown');
|
||||||
ui.system2.classList.add('shown');
|
ui.system2.classList.add('shown');
|
||||||
if(!ui.menuContainer.classList.contains('hidden')){
|
if(!ui.menuContainer.classList.contains('hidden')){
|
||||||
|
@ -21876,7 +21885,7 @@
|
||||||
ui.click.shortcut();
|
ui.click.shortcut();
|
||||||
break;
|
break;
|
||||||
case 'menu':
|
case 'menu':
|
||||||
ui.click.window();
|
game.closePopped();
|
||||||
game.pause2();
|
game.pause2();
|
||||||
ui.click.configMenu();
|
ui.click.configMenu();
|
||||||
ui.system1.classList.remove('shown');
|
ui.system1.classList.remove('shown');
|
||||||
|
@ -22455,13 +22464,7 @@
|
||||||
_status.tempunpop=false;
|
_status.tempunpop=false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(ui.currentpopped){
|
game.closePopped();
|
||||||
if(ui.currentpopped._uiintro){
|
|
||||||
ui.currentpopped._uiintro.delete();
|
|
||||||
delete ui.currentpopped._uiintro;
|
|
||||||
}
|
|
||||||
delete ui.currentpopped;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(_status.event.custom.add.window){
|
if(_status.event.custom.add.window){
|
||||||
_status.event.custom.add.window(clicked);
|
_status.event.custom.add.window(clicked);
|
||||||
|
@ -23208,13 +23211,7 @@
|
||||||
_status.clickedplayer=false;
|
_status.clickedplayer=false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(ui.currentpopped){
|
game.closePopped();
|
||||||
if(ui.currentpopped._uiintro){
|
|
||||||
ui.currentpopped._uiintro.delete();
|
|
||||||
delete ui.currentpopped._uiintro;
|
|
||||||
}
|
|
||||||
delete ui.currentpopped;
|
|
||||||
}
|
|
||||||
switch(lib.config.right_click){
|
switch(lib.config.right_click){
|
||||||
case 'pause':ui.click.pause();break;
|
case 'pause':ui.click.pause();break;
|
||||||
case 'auto':ui.click.auto();break;
|
case 'auto':ui.click.auto();break;
|
||||||
|
@ -24605,7 +24602,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nodeintro:function(node,simple){
|
nodeintro:function(node,simple){
|
||||||
var uiintro=ui.create.dialog('hidden','noscroll');
|
var uiintro=ui.create.dialog('hidden','notouchscroll');
|
||||||
if(node.classList.contains('player')&&!node.name){
|
if(node.classList.contains('player')&&!node.name){
|
||||||
return uiintro;
|
return uiintro;
|
||||||
}
|
}
|
||||||
|
@ -25811,13 +25808,7 @@
|
||||||
}
|
}
|
||||||
window.onkeydown=function(e){
|
window.onkeydown=function(e){
|
||||||
if(!ui.menuContainer||!ui.menuContainer.classList.contains('hidden')) return;
|
if(!ui.menuContainer||!ui.menuContainer.classList.contains('hidden')) return;
|
||||||
if(ui.currentpopped){
|
game.closePopped();
|
||||||
if(ui.currentpopped._uiintro){
|
|
||||||
ui.currentpopped._uiintro.delete();
|
|
||||||
delete ui.currentpopped._uiintro;
|
|
||||||
}
|
|
||||||
delete ui.currentpopped;
|
|
||||||
}
|
|
||||||
var dialogs=document.querySelectorAll('#window>.dialog.popped:not(.static)');
|
var dialogs=document.querySelectorAll('#window>.dialog.popped:not(.static)');
|
||||||
for(var i=0;i<dialogs.length;i++){
|
for(var i=0;i<dialogs.length;i++){
|
||||||
dialogs[i].delete();
|
dialogs[i].delete();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
window.noname_update={
|
window.noname_update={
|
||||||
version:'1.8.4',
|
version:'1.8.4.1',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'修复完杀和双将bug',
|
'修复完杀和双将bug',
|
||||||
'旁观可切换视角',
|
'旁观可切换视角',
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
z-index: 31 !important;
|
z-index: 31 !important;
|
||||||
}
|
}
|
||||||
#window>.dialog.popped{
|
#window>.dialog.popped{
|
||||||
z-index: 11 !important;
|
z-index: 21 !important;
|
||||||
}
|
}
|
||||||
#system>div{
|
#system>div{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
Loading…
Reference in New Issue