@@ -6,13 +6,16 @@ import { createRoot } from "react-dom/client";
66import { initReactI18next } from "react-i18next" ;
77import { createMemoryRouter , RouterProvider } from "react-router-dom" ;
88import { runCli } from "./cli" ;
9+ import { Dialog } from "./components/dialog" ;
910import { UserScriptsManager } from "./core/plugin/UserScriptsManager" ;
1011import { EdgeRenderer } from "./core/render/canvas2d/entityRenderer/edge/EdgeRenderer" ;
1112import { Renderer } from "./core/render/canvas2d/renderer" ;
1213import { InputElement } from "./core/render/domElement/inputElement" ;
1314import { KeyboardOnlyEngine } from "./core/service/controlService/keyboardOnlyEngine/keyboardOnlyEngine" ;
1415import { MouseLocation } from "./core/service/controlService/MouseLocation" ;
1516import { KeyBinds } from "./core/service/controlService/shortcutKeysEngine/KeyBinds" ;
17+ import { ShortcutKeysRegister } from "./core/service/controlService/shortcutKeysEngine/shortcutKeysRegister" ;
18+ import { FileLoader } from "./core/service/dataFileService/fileLoader" ;
1619import { RecentFileManager } from "./core/service/dataFileService/RecentFileManager" ;
1720import { StartFilesManager } from "./core/service/dataFileService/StartFilesManager" ;
1821import { ColorManager } from "./core/service/feedbackService/ColorManager" ;
@@ -22,6 +25,7 @@ import { StageStyleManager } from "./core/service/feedbackService/stageStyle/Sta
2225import { LastLaunch } from "./core/service/LastLaunch" ;
2326import { Settings } from "./core/service/Settings" ;
2427import { Tourials } from "./core/service/Tourials" ;
28+ import { UserState } from "./core/service/UserState" ;
2529import { Camera } from "./core/stage/Camera" ;
2630import { Stage } from "./core/stage/Stage" ;
2731import { StageLoader } from "./core/stage/StageLoader" ;
@@ -33,9 +37,6 @@ import "./polyfills/roundRect";
3337import { exists } from "./utils/fs" ;
3438import { exit , writeStderr } from "./utils/otherApi" ;
3539import { getCurrentWindow , isDesktop , isFrame , isWeb , isWindows } from "./utils/platform" ;
36- import { ShortcutKeysRegister } from "./core/service/controlService/shortcutKeysEngine/shortcutKeysRegister" ;
37- import { FileLoader } from "./core/service/dataFileService/fileLoader" ;
38- import { Dialog } from "./components/dialog" ;
3940
4041const router = createMemoryRouter ( routes ) ;
4142const Routes = ( ) => < RouterProvider router = { router } /> ;
@@ -56,6 +57,7 @@ const el = document.getElementById("root")!;
5657 ColorManager . init ( ) ,
5758 Tourials . init ( ) ,
5859 UserScriptsManager . init ( ) ,
60+ UserState . init ( ) ,
5961 ] ) ;
6062 // 这些东西依赖上面的东西,所以单独一个Promise.all
6163 await Promise . all ( [ loadLanguageFiles ( ) , loadSyncModules ( ) , loadStartFile ( ) , ShortcutKeysRegister . registerKeyBinds ( ) ] ) ;
0 commit comments