extendKeyboard & __renderFrameFuncs
This commit is contained in:
parent
b75b7421e1
commit
eb10944e0a
@ -1884,6 +1884,11 @@ actions.prototype.clickSwitchs = function (x,y) {
|
||||
core.ui.drawSwitchs();
|
||||
break;
|
||||
case 8:
|
||||
core.platform.extendKeyboard = !core.platform.extendKeyboard;
|
||||
core.setLocalStorage('extendKeyboard', core.platform.extendKeyboard);
|
||||
core.ui.drawSwitchs();
|
||||
break;
|
||||
case 9:
|
||||
core.status.event.selection=0;
|
||||
core.ui.drawSettings();
|
||||
break;
|
||||
|
||||
@ -271,6 +271,20 @@ control.prototype.setRequestAnimationFrame = function () {
|
||||
// 执行用户的并行事件处理内容
|
||||
functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a.plugins.parallelDo(timestamp);
|
||||
|
||||
if (core.isPlaying()) {
|
||||
// 执行插件中的每帧函数
|
||||
var renderFrameFuncs = core.plugin.__renderFrameFuncs || [];
|
||||
renderFrameFuncs.forEach(function (t) {
|
||||
try {
|
||||
if (core.plugin[t])
|
||||
core.plugin[t](timestamp);
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 检查控制台状态
|
||||
if (core.utils.consoleOpened()) {
|
||||
core.setFlag('consoleOpened', true);
|
||||
@ -2829,6 +2843,7 @@ control.prototype.setToolbarButton = function (useButton) {
|
||||
|
||||
if (!core.isset(useButton)) useButton = core.domStyle.toolbarBtn;
|
||||
if (!core.domStyle.isVertical) useButton = false;
|
||||
if (!core.platform.extendKeyboard) useButton = false;
|
||||
|
||||
core.domStyle.toolbarBtn = useButton;
|
||||
if (useButton) {
|
||||
|
||||
@ -68,6 +68,7 @@ function core() {
|
||||
'isChrome': false, // 是否是Chrome
|
||||
'supportCopy': false, // 是否支持复制到剪切板
|
||||
'useLocalForage': true,
|
||||
'extendKeyboard': false,
|
||||
|
||||
'fileInput': null, // FileInput
|
||||
'fileReader': null, // 是否支持FileReader
|
||||
@ -297,6 +298,8 @@ core.prototype.init = function (coreData, callback) {
|
||||
catch (e) {console.log(e); core.platform.useLocalForage=false;}
|
||||
}
|
||||
|
||||
core.platform.extendKeyboard = core.getLocalStorage("extendKeyboard", false);
|
||||
|
||||
if (window.FileReader) {
|
||||
core.platform.fileReader = new FileReader();
|
||||
core.platform.fileReader.onload = function () {
|
||||
|
||||
@ -1067,6 +1067,7 @@ ui.prototype.drawSwitchs = function() {
|
||||
"领域显伤: "+(core.flags.displayExtraDamage ? "[ON]" : "[OFF]"),
|
||||
"新版存档: "+(core.platform.useLocalForage ? "[ON]":"[OFF]"),
|
||||
"单击瞬移: "+(core.getFlag('clickMove', true) ? "[ON]":"[OFF]"),
|
||||
"拓展键盘: "+(core.platform.extendKeyboard ? "[ON]":"[OFF]"),
|
||||
"返回主菜单"
|
||||
];
|
||||
this.drawChoices(null, choices);
|
||||
|
||||
@ -1238,6 +1238,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
console.log("插件编写测试");
|
||||
// 可以写一些其他的被直接执行的代码
|
||||
|
||||
// 每帧会执行的函数列表
|
||||
this.__renderFrameFuncs = [];
|
||||
|
||||
// 在这里写所有需要自定义的函数
|
||||
// 写法必须是 this.xxx = function (args) { ...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user