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 { onBeforeRouteLeave } from "vue-router";
// TODO KeySteeringWheel
// +offset
// TODO KeyDirectionalSkillKeyDirectionlessSkillKeyTriggerWhenPressedSkilldirectional)
// flagrangetime
// TODO KeyObservation
// scale
// TODO KeyMacroKeyCancelSkillKeyTap
// KeyMacro
// TODO
// TODO
// TODO
// TODO utools
// TODO

View File

@ -88,5 +88,6 @@ function dragHandler(downEvent: MouseEvent) {
.active {
border: 2px solid var(--primary-color);
color: var(--primary-color);
z-index: 2;
}
</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(
key: string,
relativeSize: { w: number; h: number },

View File

@ -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 };