Add behavior list panel
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改范围属性
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user