diff --git a/libs/control.js b/libs/control.js index 7a1b46a6..e86f4147 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2873,6 +2873,7 @@ control.prototype.setToolbarButton = function (useButton) { ["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) { core.statusBar.image[t].style.display = 'block'; }) + main.statusBar.image.btn8.style.filter = core.getLocalStorage('altKey') ? 'sepia(1) contrast(1.5)' : ''; } else { ["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) { diff --git a/libs/events.js b/libs/events.js index 4ca79588..70ba3dca 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1903,6 +1903,11 @@ events.prototype._action_choices = function (data, x, y, prefix) { } core.status.event.timeout = new Date().getTime() + (data.timeout || 0); } + for (var i = 0; i < data.choices.length; i++) { + if (typeof data.choices[i] === 'string') + data.choices[i] = {"text": data.choices[i]}; + data.choices[i].text = core.replaceText(data.choices[i].text, prefix); + } core.ui.drawChoices(core.replaceText(data.text, prefix), data.choices); } diff --git a/main.js b/main.js index 5c53adcf..fde2a3d5 100644 --- a/main.js +++ b/main.js @@ -681,42 +681,51 @@ main.dom.hard.onclick = function () { ////// 手机端的按钮1-7 ////// main.statusBar.image.btn1.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 49}); + main.core.onkeyUp({"keyCode": 49, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn2.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 50}); + main.core.onkeyUp({"keyCode": 50, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn3.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 51}); + main.core.onkeyUp({"keyCode": 51, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn4.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 52}); + main.core.onkeyUp({"keyCode": 52, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn5.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 53}); + main.core.onkeyUp({"keyCode": 53, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn6.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 54}); + main.core.onkeyUp({"keyCode": 54, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn7.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 55}); + main.core.onkeyUp({"keyCode": 55, "altKey": core.getLocalStorage('altKey')}); }; main.statusBar.image.btn8.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({"keyCode": 56}); + if (core.getLocalStorage('altKey')) { + core.removeLocalStorage('altKey'); + core.drawTip("Alt模式已关闭。"); + main.statusBar.image.btn8.style.filter = ''; + } + else { + core.setLocalStorage('altKey', true); + core.drawTip("Alt模式已开启;此模式下1~7按钮视为Alt+1~7。"); + main.statusBar.image.btn8.style.filter = 'sepia(1) contrast(1.5)'; + } }; ////// 点击“开始游戏”时 ////// diff --git a/project/materials/icons.png b/project/materials/icons.png index 349e6b68..4e00f6c3 100644 Binary files a/project/materials/icons.png and b/project/materials/icons.png differ diff --git a/project/materials/icons_old.png b/project/materials/icons_old.png index 311b6392..94b6043a 100644 Binary files a/project/materials/icons_old.png and b/project/materials/icons_old.png differ