diff --git a/src/components/keyboard/KeyBoard.vue b/src/components/keyboard/KeyBoard.vue index 3eb41f6..69bed7c 100644 --- a/src/components/keyboard/KeyBoard.vue +++ b/src/components/keyboard/KeyBoard.vue @@ -7,8 +7,16 @@ import { useGlobalStore } from "../../store/global"; import { useDialog } from "naive-ui"; import { onBeforeRouteLeave } from "vue-router"; +// TODO 方向轮盘按钮 KeySteeringWheel +// 有四个按钮+offset +// TODO 技能按钮 KeyDirectionalSkill,KeyDirectionlessSkill,KeyTriggerWhenPressedSkill(有区分directional) +// 单个键,靠两个flag来区分这四种情况,还有range或time要视情况 +// TODO 添加视野按钮 KeyObservation +// 单个键,有灵敏度scale +// TODO 普通按钮 KeyMacro,KeyCancelSkill,KeyTap +// 单个键,KeyMacro有输入框 +// TODO 右键按钮打开菜单修改、删除 // TODO 右键空白区域添加按键 -// TODO 左键可拖动按钮(并显示到顶部),右键按钮进行修改、删除 // TODO 设置界面添加本地数据编辑器(类似utools) // TODO 添加开发者工具打开按钮 diff --git a/src/components/keyboard/KeyCommon.vue b/src/components/keyboard/KeyCommon.vue index 1ef3529..ef6185a 100644 --- a/src/components/keyboard/KeyCommon.vue +++ b/src/components/keyboard/KeyCommon.vue @@ -88,5 +88,6 @@ function dragHandler(downEvent: MouseEvent) { .active { border: 2px solid var(--primary-color); color: var(--primary-color); + z-index: 2; } diff --git a/src/hotkey.ts b/src/hotkey.ts index 02eb553..97c0b2a 100644 --- a/src/hotkey.ts +++ b/src/hotkey.ts @@ -176,7 +176,7 @@ function addObservationShortcuts( ); } -// add shortcuts for simple tap (touch for 100 ms when pressed) +// add shortcuts for simple tap (touch when press down) function addTapShortcuts( key: string, relativeSize: { w: number; h: number }, diff --git a/src/keyMappingConfig.ts b/src/keyMappingConfig.ts index a7adabb..b1eb7eb 100644 --- a/src/keyMappingConfig.ts +++ b/src/keyMappingConfig.ts @@ -37,11 +37,6 @@ interface KeyCancelSkill extends Key { key: string; } -interface KeyTap extends Key { - key: string; - time: number; -} - interface KeyTriggerWhenPressedSkill extends Key { key: string; directional: boolean; @@ -53,6 +48,11 @@ interface KeyObservation extends Key { scale: number; } +interface KeyTap extends Key { + key: string; + time: number; +} + type KeyMacroType = "touch" | "sleep" | "swipe"; type KeyMacroArgs = any[]; @@ -73,11 +73,11 @@ type KeyMapping = | KeySteeringWheel | KeyDirectionalSkill | KeyDirectionlessSkill - | KeyCancelSkill - | KeyTap | KeyTriggerWhenPressedSkill | KeyObservation - | KeyMacro; + | KeyMacro + | KeyCancelSkill + | KeyTap; interface KeyMappingConfig { relativeSize: { w: number; h: number };