diff --git a/source/Component/BehaviorPopup/BehaviorPopup.scss b/source/Component/BehaviorPopup/BehaviorPopup.scss new file mode 100644 index 0000000..aaea67b --- /dev/null +++ b/source/Component/BehaviorPopup/BehaviorPopup.scss @@ -0,0 +1,6 @@ +@import "../Theme/Theme.scss"; + +div.behavior-popup { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/source/Component/BehaviorPopup/BehaviorPopup.tsx b/source/Component/BehaviorPopup/BehaviorPopup.tsx new file mode 100644 index 0000000..f3a8761 --- /dev/null +++ b/source/Component/BehaviorPopup/BehaviorPopup.tsx @@ -0,0 +1,34 @@ +import { Component, ReactNode } from "react"; +import { Popup } from "@Context/Popups"; +import { Theme } from "@Component/Theme/Theme"; +import { Localization } from "@Component/Localization/Localization"; +import "./BehaviorPopup.scss"; + +interface IBehaviorPopupProps { + +} + +class BehaviorPopup extends Popup { + + public minWidth: number = 400; + public minHeight: number = 300; + public width: number = 600; + public height: number = 450; + + public onRenderHeader(): ReactNode { + return + } + + public render(): ReactNode { + return + } +} + +class BehaviorPopupComponent extends Component { + + public render(): ReactNode { + return + } +} + +export { BehaviorPopup }; \ No newline at end of file diff --git a/source/Component/CommandBar/CommandBar.tsx b/source/Component/CommandBar/CommandBar.tsx index 0bf2433..4ae4121 100644 --- a/source/Component/CommandBar/CommandBar.tsx +++ b/source/Component/CommandBar/CommandBar.tsx @@ -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 { + this.props.status?.popup.showPopup(BehaviorPopup, {}); + } + })} {this.getRenderButton({ iconName: "Tag", i18NKey: "Command.Bar.Add.Tag.Info", diff --git a/source/Localization/EN-US.ts b/source/Localization/EN-US.ts index a367ddf..23c8276 100644 --- a/source/Localization/EN-US.ts +++ b/source/Localization/EN-US.ts @@ -52,6 +52,7 @@ const EN_US = { "Popup.Action.Objects.Confirm.Delete": "Delete", "Popup.Delete.Objects.Confirm": "Are you sure you want to delete this object(s)? The object is deleted and cannot be recalled.", "Popup.Setting.Title": "Preferences setting", + "Popup.Add.Behavior.Title": "Add behavior", "Build.In.Label.Name.All.Group": "All group", "Build.In.Label.Name.All.Range": "All range", "Behavior.Template.Title": "Behavior", diff --git a/source/Localization/ZH-CN.ts b/source/Localization/ZH-CN.ts index 71359a8..60b890e 100644 --- a/source/Localization/ZH-CN.ts +++ b/source/Localization/ZH-CN.ts @@ -52,6 +52,7 @@ const ZH_CN = { "Popup.Action.Objects.Confirm.Delete": "删除", "Popup.Delete.Objects.Confirm": "你确定要删除这个(些)对象吗?对象被删除将无法撤回。", "Popup.Setting.Title": "首选项设置", + "Popup.Add.Behavior.Title": "添加行为", "Build.In.Label.Name.All.Group": "全部群", "Build.In.Label.Name.All.Range": "全部范围", "Behavior.Template.Title": "行为",