diff --git a/idea.md b/idea.md index 47b16bd..58e3b0b 100644 --- a/idea.md +++ b/idea.md @@ -70,7 +70,7 @@ dam4.png ---- 存档 59 [] 小地图显示框,可以选择是否显示剩余怪物数量等 [x] 怪物死亡特效 [] 区域名称显示特效,3D 粒子特效 -[] 单独的工具栏,可以自定义按键 +[x] 单独的工具栏,可以自定义按键 [] 完全 ts 化 [] 平行光(待定) [] 视角控制系统 diff --git a/src/core/main/custom/toolbar.ts b/src/core/main/custom/toolbar.ts index 1e928c4..2352c58 100644 --- a/src/core/main/custom/toolbar.ts +++ b/src/core/main/custom/toolbar.ts @@ -321,24 +321,3 @@ CustomToolbar.register( }; } ); - -hook.once('reset', () => { - const toolbar = new CustomToolbar('test'); - toolbar - .add<'hotkey'>({ - id: 'test1', - type: 'hotkey', - assist: 0, - key: KeyCode.KeyX - }) - .add<'assistKey'>({ - id: 'test2', - type: 'assistKey', - assist: KeyCode.Ctrl - }) - .add<'item'>({ - id: 'test3', - type: 'item', - item: 'book' - }); -}); diff --git a/src/core/main/init/toolbar.tsx b/src/core/main/init/toolbar.tsx index 6af5933..0851c6e 100644 --- a/src/core/main/init/toolbar.tsx +++ b/src/core/main/init/toolbar.tsx @@ -114,10 +114,7 @@ function KeyToolEdtior(props: CustomToolbarProps<'hotkey'>) { }; const getKeyShow = (key: KeyCode, assist: number) => { - return ( - unwarpAssist(assist) + - (key === KeyCode.Unknown ? '' : KeyCodeUtils.toString(key)) - ); + return unwarpAssist(assist) + KeyCodeUtils.toString(key); }; return ( diff --git a/src/ui/toolEditor.vue b/src/ui/toolEditor.vue index 2ca781d..addbb0e 100644 --- a/src/ui/toolEditor.vue +++ b/src/ui/toolEditor.vue @@ -45,7 +45,7 @@ :type="isMobile ? 'horizontal' : 'vertical'" >