diff --git a/packages-user/client-modules/src/render/ui/save.tsx b/packages-user/client-modules/src/render/ui/save.tsx index f3af6e2..d94f885 100644 --- a/packages-user/client-modules/src/render/ui/save.tsx +++ b/packages-user/client-modules/src/render/ui/save.tsx @@ -19,7 +19,7 @@ import { useKey } from '../use'; import { MAP_WIDTH } from '../shared'; import { getSave, SaveData } from '../utils'; import { Thumbnail } from '../components/thumbnail'; -import { adjustGrid, IGridLayoutData } from '../utils/layout'; +import { adjustGrid, IGridLayoutData } from '../utils'; export const enum SaveMode { Save, diff --git a/packages-user/client-modules/src/render/ui/toolbar.tsx b/packages-user/client-modules/src/render/ui/toolbar.tsx index 77cf650..db19245 100644 --- a/packages-user/client-modules/src/render/ui/toolbar.tsx +++ b/packages-user/client-modules/src/render/ui/toolbar.tsx @@ -24,6 +24,7 @@ import { SetupComponentOptions } from '@motajs/system-ui'; import { saveSave, saveLoad } from './save'; import { mainUIController } from './controller'; import { MAIN_WIDTH, MAIN_HEIGHT } from '../shared'; +import { openSettings } from './settings'; interface ToolbarProps extends DefaultProps { loc?: ElementLocator; @@ -115,7 +116,9 @@ export const PlayingToolbar = defineComponent< }; const danmaku = () => requestAnimationFrame(openDanmakuPoster); const replay = () => core.ui._drawReplay(); - const settings = () => core.openSettings(true); + const settings = () => { + openSettings(mainUIController, [420, 240, 240, 400, 0.5, 0.5]); + }; return () => ( @@ -241,6 +244,7 @@ export const NumpadToolbar = defineComponent< >((props, { emit }) => { const numpad = () => emit('numpad'); const nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]; + const font = new Font('Verdana', 14); const ctrlEnabled = ref(false); const shiftEnabled = ref(false); @@ -314,6 +318,7 @@ export const NumpadToolbar = defineComponent< ]; @@ -332,6 +337,7 @@ export const NumpadToolbar = defineComponent< text="Ctrl" loc={[59, 93, void 0, void 0, 0.5, 0.5]} fillStyle={ctrlTextColor.value} + font={font} noevent /> diff --git a/packages-user/client-modules/src/render/utils/index.ts b/packages-user/client-modules/src/render/utils/index.ts index 61bb8e4..db95ec8 100644 --- a/packages-user/client-modules/src/render/utils/index.ts +++ b/packages-user/client-modules/src/render/utils/index.ts @@ -1,2 +1,3 @@ +export * from './layout'; export * from './saves'; export * from './use'; diff --git a/public/libs/events.js b/public/libs/events.js index 7f4b938..16c7369 100644 --- a/public/libs/events.js +++ b/public/libs/events.js @@ -3406,10 +3406,7 @@ events.prototype.load = function (fromUserAction) { ////// 点击设置按钮时的操作 ////// events.prototype.openSettings = function (fromUserAction) { - if (core.isReplaying()) return; - if (!this._checkStatus('settings', fromUserAction)) return; - core.playSound('打开界面'); - core.ui._drawSettings(); + // deprecated. }; // ------ 一些事件的具体执行过程 ------ //