From d452df71a8df61ca587e31bbb65ea5a65853f07c Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 27 Mar 2017 12:31:10 +0800 Subject: [PATCH] d --- game/game.js | 1 + layout/default/layout.css | 1 + mode/chess.js | 4 ++-- mode/stone.js | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/game/game.js b/game/game.js index 0578c5e98..045ba36b0 100644 --- a/game/game.js +++ b/game/game.js @@ -17764,6 +17764,7 @@ if(lib.config.button_press){ node.addEventListener(lib.config.touchscreen?'touchstart':'mousedown',function(){ + if(node.parentNode.classList.contains('disabled')) return; // node.classList.add('controlthundertext'); node.parentNode.classList.add('controlpressdown'); node.parentNode.classList.add('controlpressdownx'); diff --git a/layout/default/layout.css b/layout/default/layout.css index becdd81ea..0b50419c3 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1630,6 +1630,7 @@ div:not(.handcards)>.card>.info>span, } .control.disabled{ opacity: 0.6 !important; + cursor: default !important; } #control>div { position: absolute; diff --git a/mode/chess.js b/mode/chess.js index 7ec96dcaa..783c69dba 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -3727,7 +3727,7 @@ mode.chess={ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.style.opacity=1; + ui.cheat.classList.remove('disabled'); } } else{ @@ -3742,7 +3742,7 @@ mode.chess={ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.style.opacity=0.6; + ui.cheat.classList.add('disabled'); } } }); diff --git a/mode/stone.js b/mode/stone.js index 45b5622a6..080eae9ff 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -1509,7 +1509,7 @@ mode.stone={ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.style.opacity=1; + ui.cheat.classList.remove('disabled'); } } else{ @@ -1524,7 +1524,7 @@ mode.stone={ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.style.opacity=0.6; + ui.cheat.classList.add('disabled'); } } });