mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 20:45:23 +00:00
[adapters] [extension] 增加对多线程 HTTP 的支持,修复创建多线程扩展错误的问题
This commit is contained in:
@@ -39,6 +39,9 @@ Editor.Panel.extend({
|
||||
</ui-prop>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop id="th" tabindex="-1" name="${t('thread_http')}" tooltip="${t('thread_http_desc')}">
|
||||
<ui-checkbox id="thc" tabindex="-1"></ui-checkbox>
|
||||
</ui-prop>
|
||||
<ui-prop id="ts" tabindex="-1" name="${t('thread_scheduler')}" tooltip="${t('thread_scheduler_desc')}">
|
||||
<ui-checkbox id="tsc" tabindex="-1"></ui-checkbox>
|
||||
</ui-prop>
|
||||
@@ -56,6 +59,8 @@ Editor.Panel.extend({
|
||||
thread_asset_pipeline_checkbox: '#tapc',
|
||||
thread_custom: '#tc',
|
||||
thread_custom_checkbox: '#tcc',
|
||||
thread_http: '#th',
|
||||
thread_http_checkbox: '#thc',
|
||||
thread_audio_system: '#fs',
|
||||
thread_audio_system_checkbox: '#fsc',
|
||||
thread_audio_system_interval: '#fsi',
|
||||
@@ -81,6 +86,7 @@ Editor.Panel.extend({
|
||||
this.$thread_asset_pipeline_checkbox.checked = data.CC_WORKER_ASSET_PIPELINE;
|
||||
this.$thread_audio_system_checkbox.checked = data.CC_WORKER_AUDIO_SYSTEM;
|
||||
this.$thread_audio_system_interval_input.value = data.CC_WORKER_AUDIO_SYSTEM_SYNC_INTERVAL;
|
||||
this.$thread_http_checkbox.checked = data.CC_WORKER_HTTP_REQUEST;
|
||||
this.$thread_scheduler_checkbox.checked = data.CC_WORKER_SCHEDULER;
|
||||
|
||||
this.$thread_debug_checkbox.addEventListener('change', () => {
|
||||
@@ -95,6 +101,10 @@ Editor.Panel.extend({
|
||||
this.setSettings("CC_CUSTOM_WORKER", this.$thread_custom_checkbox.checked);
|
||||
});
|
||||
|
||||
this.$thread_http_checkbox.addEventListener('change', () => {
|
||||
this.setSettings("CC_WORKER_HTTP_REQUEST", this.$thread_http_checkbox.checked);
|
||||
});
|
||||
|
||||
const onAudioSystemEnableChange = (enabled) => {
|
||||
this.$thread_audio_system_interval_input.disabled = !enabled;
|
||||
};
|
||||
|
Reference in New Issue
Block a user