docs(KeyBoard): add comments

This commit is contained in:
AkiChase 2024-04-27 21:45:33 +08:00
parent 881efbedf4
commit 16752de2fc
4 changed files with 19 additions and 10 deletions

View File

@ -7,8 +7,16 @@ import { useGlobalStore } from "../../store/global";
import { useDialog } from "naive-ui"; import { useDialog } from "naive-ui";
import { onBeforeRouteLeave } from "vue-router"; import { onBeforeRouteLeave } from "vue-router";
// TODO KeySteeringWheel
// +offset
// TODO KeyDirectionalSkillKeyDirectionlessSkillKeyTriggerWhenPressedSkilldirectional)
// flagrangetime
// TODO KeyObservation
// scale
// TODO KeyMacroKeyCancelSkillKeyTap
// KeyMacro
// TODO
// TODO // TODO
// TODO
// TODO utools // TODO utools
// TODO // TODO

View File

@ -88,5 +88,6 @@ function dragHandler(downEvent: MouseEvent) {
.active { .active {
border: 2px solid var(--primary-color); border: 2px solid var(--primary-color);
color: var(--primary-color); color: var(--primary-color);
z-index: 2;
} }
</style> </style>

View File

@ -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( function addTapShortcuts(
key: string, key: string,
relativeSize: { w: number; h: number }, relativeSize: { w: number; h: number },

View File

@ -37,11 +37,6 @@ interface KeyCancelSkill extends Key {
key: string; key: string;
} }
interface KeyTap extends Key {
key: string;
time: number;
}
interface KeyTriggerWhenPressedSkill extends Key { interface KeyTriggerWhenPressedSkill extends Key {
key: string; key: string;
directional: boolean; directional: boolean;
@ -53,6 +48,11 @@ interface KeyObservation extends Key {
scale: number; scale: number;
} }
interface KeyTap extends Key {
key: string;
time: number;
}
type KeyMacroType = "touch" | "sleep" | "swipe"; type KeyMacroType = "touch" | "sleep" | "swipe";
type KeyMacroArgs = any[]; type KeyMacroArgs = any[];
@ -73,11 +73,11 @@ type KeyMapping =
| KeySteeringWheel | KeySteeringWheel
| KeyDirectionalSkill | KeyDirectionalSkill
| KeyDirectionlessSkill | KeyDirectionlessSkill
| KeyCancelSkill
| KeyTap
| KeyTriggerWhenPressedSkill | KeyTriggerWhenPressedSkill
| KeyObservation | KeyObservation
| KeyMacro; | KeyMacro
| KeyCancelSkill
| KeyTap;
interface KeyMappingConfig { interface KeyMappingConfig {
relativeSize: { w: number; h: number }; relativeSize: { w: number; h: number };