Add behavior pop up

This commit is contained in:
2022-03-26 13:39:36 +08:00
parent ffdb796e8f
commit ce5e6a34d8
5 changed files with 51 additions and 2 deletions
+9 -2
View File
@@ -4,7 +4,8 @@ import { LocalizationTooltipHost } from "../Localization/LocalizationTooltipHost
import { useSetting, IMixinSettingProps } from "@Context/Setting";
import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status";
import { AllI18nKeys } from "../Localization/Localization";
import { SettingPopup } from "@Component/SettingPopup/SettingPopup";
import { SettingPopup } from "../SettingPopup/SettingPopup";
import { BehaviorPopup } from "../BehaviorPopup/BehaviorPopup";
import { Component, ReactNode } from "react";
import { MouseMod } from "@GLRender/ClassicRenderer";
import "./CommandBar.scss";
@@ -58,7 +59,13 @@ class CommandBar extends Component<ICommandBarProps & IMixinSettingProps & IMixi
this.props.status ? this.props.status.newRange() : undefined;
}
})}
{this.getRenderButton({ iconName: "Running", i18NKey: "Command.Bar.Add.Behavior.Info" })}
{this.getRenderButton({
iconName: "Running",
i18NKey: "Command.Bar.Add.Behavior.Info",
click: () => {
this.props.status?.popup.showPopup(BehaviorPopup, {});
}
})}
{this.getRenderButton({
iconName: "Tag",
i18NKey: "Command.Bar.Add.Tag.Info",