From bab929a282a82c9ac936871fb56caaf023c2d9cc Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 9 Apr 2016 11:06:48 +0800 Subject: [PATCH] menu --- game/game.js | 15 +++++++++------ game/update.js | 1 + layout/default/layout.css | 9 ++++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/game/game.js b/game/game.js index 2b70062b2..e54edda51 100755 --- a/game/game.js +++ b/game/game.js @@ -12098,6 +12098,11 @@ var game={ online:false, onlineID:null, + closeMenu:function(){ + if(!ui.menuContainer.classList.contains('hidden')){ + ui.click.configMenu(); + } + }, closePopped:function(){ if(ui.currentpopped){ if(ui.currentpopped._uiintro){ @@ -17600,6 +17605,7 @@ ui.shortcut=ui.create.div('#shortcut.hidden',ui.window); ui.shortcut.listen(ui.click.shortcut); + ui.create.div(ui.shortcut,function(e){e.stopPropagation()}); ui.create.div('.menubutton.round','重来',ui.shortcut,game.reload).dataset.position=1; ui.create.div('.menubutton.round','退出',ui.shortcut,game.exit).dataset.position=3; ui.create.div('.menubutton.round','记录',ui.shortcut,ui.click.pause).dataset.position=4; @@ -21201,9 +21207,7 @@ game.closePopped(); ui.system1.classList.add('shown'); ui.system2.classList.add('shown'); - if(!ui.menuContainer.classList.contains('hidden')){ - ui.click.configMenu(); - } + game.closeMenu(); ui.click.shortcut(); break; case 'menu': @@ -21879,9 +21883,7 @@ game.closePopped(); ui.system1.classList.add('shown'); ui.system2.classList.add('shown'); - if(!ui.menuContainer.classList.contains('hidden')){ - ui.click.configMenu(); - } + game.closeMenu(); ui.click.shortcut(); break; case 'menu': @@ -21898,6 +21900,7 @@ ui.click.auto(); break; case 'chat': + game.closeMenu(); if(ui.chatButton){ ui.click.hoverpopped.call(ui.chatButton); } diff --git a/game/update.js b/game/update.js index 2d65383bf..cdfa3d698 100644 --- a/game/update.js +++ b/game/update.js @@ -1,6 +1,7 @@ window.noname_update={ version:'1.8.4.1', changeLog:[ + '修复几处界面问题', '修复完杀和双将bug', '旁观可切换视角', '聊天手势', diff --git a/layout/default/layout.css b/layout/default/layout.css index e0d77a394..9219907cf 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -65,7 +65,14 @@ table{table-layout: fixed;} text-align: center; letter-spacing: -6px; transform: scale(1.3); - /*transition: all 0.3s;*/ +} +#shortcut>div:not(.menubutton){ + width: 100%; + height: 80px; + margin: 0; + padding: 0; + left: 0; + top:0; } #shortcut>div>span{ width: 200px;