From d51000025ce9555fce1442d2e796d8101c0c30ca Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 20 Mar 2017 09:35:54 +0800 Subject: [PATCH] c --- game/game.js | 16 ++++++++++------ layout/mobile/layout.css | 5 +++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/game/game.js b/game/game.js index 91e0016f2..48a3dc727 100644 --- a/game/game.js +++ b/game/game.js @@ -99,14 +99,15 @@ compatiblemode:{ name:'兼容模式', init:false, - intro:'提高对旧扩展的兼容性,但可能产生未知结果', + intro:'开启兼容模式可防止扩展使游戏卡死并提高对旧扩展的兼容性,但对游戏速度有一定影响,若无不稳定或不兼容的扩展建议关闭', onclick:function(bool){ game.saveConfig('compatiblemode',bool); - setTimeout(function(){ - if(lib.config.compatiblemode){ - alert('开启兼容模式可防止扩展使游戏卡死并提高对旧扩展的兼容性,但对游戏速度有一定影响,若无不稳定或不兼容的扩展建议关闭'); - } - },500); + if(bool){ + ui.window.classList.add('compatiblemode'); + } + else{ + ui.window.classList.remove('compatiblemode'); + } } }, confirm_exit:{ @@ -32665,6 +32666,9 @@ if(lib.config.player_border=='normal'&&(game.layout=='long'||game.layout=='long2')){ ui.arena.classList.add('lslim_player'); } + if(lib.config.compatiblemode){ + ui.window.classList.add('compatiblemode'); + } ui.window.dataset.radius_size=lib.config.radius_size||'default'; if(game.layout=='long'||game.layout=='mobile'){ if(lib.config.textequip=='text') ui.arena.classList.add('textequip'); diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index e6bea826f..68a0cc721 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -167,6 +167,11 @@ pointer-events: auto; -webkit-clip-path: polygon(-10px 0, 130px 0, 130px 130px, -10px 130px); } +#window.compatiblemode #arena:not(.chess) .player[data-position='0']:not(.minskin)>.avatar, +#window.compatiblemode #arena:not(.chess) .player[data-position='0']:not(.minskin)>.avatar2, +#window.compatiblemode #arena:not(.chess) .player[data-position='0']:not(.minskin)>.equips{ + -webkit-clip-path: none; +} #arena:not(.chess) .player[data-position='0']:not(.minskin)>.identity{ pointer-events: auto; }