mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-26 13:47:12 +01:00
Make sure that the script editor is the 3rd tab. I implemented the simplest solution I could think for now. If more control is needed in the future, EditorPlugins will likely need a priority queue (or some different, more generic solution).
This commit is contained in:
parent
054332ae8d
commit
27920ca1a7
@ -330,6 +330,19 @@ public:
|
|||||||
ERR_FAIL_COND(creation_func_count >= MAX_CREATE_FUNCS);
|
ERR_FAIL_COND(creation_func_count >= MAX_CREATE_FUNCS);
|
||||||
creation_funcs[creation_func_count++] = p_func;
|
creation_funcs[creation_func_count++] = p_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
static void add_by_type_front() {
|
||||||
|
ERR_FAIL_COND(creation_func_count >= MAX_CREATE_FUNCS);
|
||||||
|
|
||||||
|
for (int i = creation_func_count - 1; i >= 0; --i) {
|
||||||
|
creation_funcs[i + 1] = creation_funcs[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
++creation_func_count;
|
||||||
|
|
||||||
|
creation_funcs[0] = creator<T>;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,7 +25,7 @@ void register_editor_code_editor_types(ModuleRegistrationLevel p_level) {
|
|||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
|
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
|
||||||
EditorPlugins::add_by_type<EditorScriptEditorPlugin>();
|
EditorPlugins::add_by_type_front<EditorScriptEditorPlugin>();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user