mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 12:49:25 +08:00
fix: 首次进游戏没有工具栏
This commit is contained in:
parent
63a21c8afa
commit
3bbb502fd7
@ -78,6 +78,12 @@ interface Misc {
|
|||||||
display: Component
|
display: Component
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为一类杂项工具设置激活信息
|
||||||
|
* @param id 杂项工具的id
|
||||||
|
* @param activable 是否可激活
|
||||||
|
* @param actived 获取当前是否激活的函数
|
||||||
|
*/
|
||||||
bindActivable(id: string, activable: boolean, actived?: ActivedFn): void;
|
bindActivable(id: string, activable: boolean, actived?: ActivedFn): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -383,7 +389,7 @@ Mota.require('var', 'hook').on('reset', () => {
|
|||||||
Mota.require('var', 'hook').once('reset', () => {
|
Mota.require('var', 'hook').once('reset', () => {
|
||||||
const mainStorage = GameStorage.for(GameStorage.fromGame('main'));
|
const mainStorage = GameStorage.for(GameStorage.fromGame('main'));
|
||||||
mainStorage.read();
|
mainStorage.read();
|
||||||
if (mainStorage.getValue('played', false)) {
|
if (!mainStorage.getValue('played', false)) {
|
||||||
mainStorage.setValue('played', true);
|
mainStorage.setValue('played', true);
|
||||||
const defaultsTool =
|
const defaultsTool =
|
||||||
CustomToolbar.list.find(v => v.id === '@defaults') ??
|
CustomToolbar.list.find(v => v.id === '@defaults') ??
|
||||||
|
@ -958,14 +958,6 @@ Mota.require('var', 'hook').once('reset', () => {
|
|||||||
},
|
},
|
||||||
h(LayoutOutlined)
|
h(LayoutOutlined)
|
||||||
);
|
);
|
||||||
// CustomToolbar.misc.register(
|
|
||||||
// 'drag',
|
|
||||||
// '地图拖动',
|
|
||||||
// () => {
|
|
||||||
// // todo
|
|
||||||
// },
|
|
||||||
// h('span', '拖动地图')
|
|
||||||
// );
|
|
||||||
|
|
||||||
CustomToolbar.misc.bindActivable('minimap', true, () => minimapTool);
|
CustomToolbar.misc.bindActivable('minimap', true, () => minimapTool);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user