mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-07-16 01:27:58 +08:00
fix: 工具栏打开设置 & 工具栏数字键盘的字体
This commit is contained in:
parent
fe7e765e95
commit
09f02a6989
@ -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,
|
||||
|
@ -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 () => (
|
||||
<container loc={props.loc} cursor="pointer">
|
||||
@ -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<
|
||||
<text
|
||||
text={v.toString()}
|
||||
loc={middle(col, row)}
|
||||
font={font}
|
||||
noevent
|
||||
/>
|
||||
];
|
||||
@ -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
|
||||
/>
|
||||
<g-rectr
|
||||
@ -346,6 +352,7 @@ export const NumpadToolbar = defineComponent<
|
||||
text="Shift"
|
||||
loc={[108, 93, void 0, void 0, 0.5, 0.5]}
|
||||
fillStyle={shiftTextColor.value}
|
||||
font={font}
|
||||
noevent
|
||||
/>
|
||||
<g-rectr
|
||||
@ -360,6 +367,7 @@ export const NumpadToolbar = defineComponent<
|
||||
text="Alt"
|
||||
loc={[154, 93, void 0, void 0, 0.5, 0.5]}
|
||||
fillStyle={altTextColor.value}
|
||||
font={font}
|
||||
noevent
|
||||
/>
|
||||
<NumpadIcon loc={ic(0, 2)} strokeStyle="gold" onClick={numpad} />
|
||||
|
@ -1,2 +1,3 @@
|
||||
export * from './layout';
|
||||
export * from './saves';
|
||||
export * from './use';
|
||||
|
@ -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.
|
||||
};
|
||||
|
||||
// ------ 一些事件的具体执行过程 ------ //
|
||||
|
Loading…
Reference in New Issue
Block a user