Add behavior list panel

This commit is contained in:
2022-03-29 17:44:48 +08:00
parent 5ff6987a4b
commit 873a2a8d0a
9 changed files with 129 additions and 1 deletions
+15
View File
@@ -11,6 +11,7 @@ import { Setting } from "./Setting";
import { I18N } from "@Component/Localization/Localization";
import { superConnectWithEvent, superConnect } from "./Context";
import { PopupController } from "./Popups";
import { Behavior } from "@Model/Behavior";
function randomColor(unNormal: boolean = false) {
const color = [
@@ -32,6 +33,7 @@ interface IStatusEvent {
mouseModChange: void;
focusObjectChange: void;
focusLabelChange: void;
focusBehaviorChange: void;
objectChange: void;
rangeLabelChange: void;
groupLabelChange: void;
@@ -84,6 +86,11 @@ class Status extends Emitter<IStatusEvent> {
*/
public focusLabel?: Label;
/**
* 焦点行为
*/
public focusBehavior?: Behavior;
private drawTimer?: NodeJS.Timeout;
private delayDraw = () => {
@@ -138,6 +145,14 @@ class Status extends Emitter<IStatusEvent> {
this.emit("focusLabelChange");
}
/**
* 更新焦点行为
*/
public setBehaviorObject(focusBehavior?: Behavior) {
this.focusBehavior = focusBehavior;
this.emit("focusBehaviorChange");
}
/**
* 修改范围属性
*/