手机端可快捷换装
This commit is contained in:
parent
dfe34fdfb8
commit
a70a365794
@ -2873,6 +2873,7 @@ control.prototype.setToolbarButton = function (useButton) {
|
|||||||
["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) {
|
["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) {
|
||||||
core.statusBar.image[t].style.display = 'block';
|
core.statusBar.image[t].style.display = 'block';
|
||||||
})
|
})
|
||||||
|
main.statusBar.image.btn8.style.filter = core.getLocalStorage('altKey') ? 'sepia(1) contrast(1.5)' : '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) {
|
["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) {
|
||||||
|
|||||||
@ -1903,6 +1903,11 @@ events.prototype._action_choices = function (data, x, y, prefix) {
|
|||||||
}
|
}
|
||||||
core.status.event.timeout = new Date().getTime() + (data.timeout || 0);
|
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);
|
core.ui.drawChoices(core.replaceText(data.text, prefix), data.choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
25
main.js
25
main.js
@ -681,42 +681,51 @@ main.dom.hard.onclick = function () {
|
|||||||
////// 手机端的按钮1-7 //////
|
////// 手机端的按钮1-7 //////
|
||||||
main.statusBar.image.btn1.onclick = function (e) {
|
main.statusBar.image.btn1.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 49});
|
main.core.onkeyUp({"keyCode": 49, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn2.onclick = function (e) {
|
main.statusBar.image.btn2.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 50});
|
main.core.onkeyUp({"keyCode": 50, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn3.onclick = function (e) {
|
main.statusBar.image.btn3.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 51});
|
main.core.onkeyUp({"keyCode": 51, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn4.onclick = function (e) {
|
main.statusBar.image.btn4.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 52});
|
main.core.onkeyUp({"keyCode": 52, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn5.onclick = function (e) {
|
main.statusBar.image.btn5.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 53});
|
main.core.onkeyUp({"keyCode": 53, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn6.onclick = function (e) {
|
main.statusBar.image.btn6.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 54});
|
main.core.onkeyUp({"keyCode": 54, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn7.onclick = function (e) {
|
main.statusBar.image.btn7.onclick = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
main.core.onkeyUp({"keyCode": 55});
|
main.core.onkeyUp({"keyCode": 55, "altKey": core.getLocalStorage('altKey')});
|
||||||
};
|
};
|
||||||
|
|
||||||
main.statusBar.image.btn8.onclick = function (e) {
|
main.statusBar.image.btn8.onclick = function (e) {
|
||||||
e.stopPropagation();
|
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)';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 点击“开始游戏”时 //////
|
////// 点击“开始游戏”时 //////
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 31 KiB |
Loading…
Reference in New Issue
Block a user