diff --git a/source/Localization/EN-US.ts b/source/Localization/EN-US.ts index 79d6f1b..875e29f 100644 --- a/source/Localization/EN-US.ts +++ b/source/Localization/EN-US.ts @@ -48,6 +48,8 @@ const EN_US = { "Panel.Info.Group.Details.View": "Edit view group attributes", "Panel.Title.Behavior.List.View": "Behavior list", "Panel.Info.Behavior.List.View": "Edit view behavior list", + "Panel.Title.Behavior.Details.View": "Behavior", + "Panel.Info.Behavior.Details.View": "Edit view Behavior attributes", "Popup.Title.Unnamed": "Popup message", "Popup.Title.Confirm": "Confirm message", "Popup.Action.Yes": "Confirm", @@ -109,5 +111,6 @@ const EN_US = { "Panel.Info.Group.Details.Attr.Error.Unspecified": "Unspecified group object", "Panel.Info.Label.Details.Error.Unspecified": "Label object not specified", "Panel.Info.Label.List.Error.Nodata": "There are no labels in the model, click the button to create", + "Panel.Info.Behavior.Details.Error.Not.Behavior": "Please specify a behavior first to view the details", } export default EN_US; \ No newline at end of file diff --git a/source/Localization/ZH-CN.ts b/source/Localization/ZH-CN.ts index 7f582fc..b527afd 100644 --- a/source/Localization/ZH-CN.ts +++ b/source/Localization/ZH-CN.ts @@ -48,6 +48,8 @@ const ZH_CN = { "Panel.Info.Group.Details.View": "编辑查看群属性", "Panel.Title.Behavior.List.View": "行为列表", "Panel.Info.Behavior.List.View": "编辑查看行为列表", + "Panel.Title.Behavior.Details.View": "行为", + "Panel.Info.Behavior.Details.View": "编辑查看行为属性", "Popup.Title.Unnamed": "弹窗消息", "Popup.Title.Confirm": "确认消息", "Popup.Action.Yes": "确定", @@ -109,5 +111,6 @@ const ZH_CN = { "Panel.Info.Group.Details.Attr.Error.Unspecified": "未指定群对象", "Panel.Info.Label.Details.Error.Unspecified": "未指定标签对象", "Panel.Info.Label.List.Error.Nodata": "模型中没有标签,点击按钮以创建", + "Panel.Info.Behavior.Details.Error.Not.Behavior": "请先指定一个行为以查看详情", } export default ZH_CN; \ No newline at end of file diff --git a/source/Page/SimulatorWeb/SimulatorWeb.tsx b/source/Page/SimulatorWeb/SimulatorWeb.tsx index 462c9bd..2a40601 100644 --- a/source/Page/SimulatorWeb/SimulatorWeb.tsx +++ b/source/Page/SimulatorWeb/SimulatorWeb.tsx @@ -75,9 +75,9 @@ class SimulatorWeb extends Component { items: [ { items: [ - {panels: ["RenderView", "Label Aa Bb", "Label aaa"]}, + {panels: ["RenderView"]}, { - items: [{panels: ["BehaviorList", "Label bbb"]}, {panels: ["LabelList"]}], + items: [{panels: ["BehaviorList"]}, {panels: ["LabelList"]}], scale: 80, layout: LayoutDirection.X } @@ -87,9 +87,9 @@ class SimulatorWeb extends Component { }, { items: [{ - panels: ["ObjectList", "Test tab"] + panels: ["ObjectList"] }, { - panels: ["GroupDetails", "RangeDetails", "LabelDetails"] + panels: ["GroupDetails", "RangeDetails", "LabelDetails", "BehaviorDetails"] }], scale: 30, layout: LayoutDirection.Y diff --git a/source/Panel/BehaviorDetails/BehaviorDetails.scss b/source/Panel/BehaviorDetails/BehaviorDetails.scss new file mode 100644 index 0000000..e69de29 diff --git a/source/Panel/BehaviorDetails/BehaviorDetails.tsx b/source/Panel/BehaviorDetails/BehaviorDetails.tsx new file mode 100644 index 0000000..621c323 --- /dev/null +++ b/source/Panel/BehaviorDetails/BehaviorDetails.tsx @@ -0,0 +1,26 @@ +import { Component, ReactNode} from "react"; +import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; +import { Behavior } from "@Model/Behavior"; +import { Message } from "@Component/Message/Message"; +import "./BehaviorDetails.scss"; + +interface IBehaviorDetailsProps {} + +@useStatusWithEvent("focusBehaviorChange") +class BehaviorDetails extends Component { + + private renderFrom(behavior: Behavior): ReactNode { + return <>; + } + + public render(): ReactNode { + if (this.props.status) { + if (this.props.status.focusBehavior) { + return this.renderFrom(this.props.status.focusBehavior); + } + } + return ; + } +} + +export { BehaviorDetails }; \ No newline at end of file diff --git a/source/Panel/Panel.tsx b/source/Panel/Panel.tsx index a032e83..8c03517 100644 --- a/source/Panel/Panel.tsx +++ b/source/Panel/Panel.tsx @@ -9,6 +9,7 @@ import { LabelList } from "./LabelList/LabelList"; import { LabelDetails } from "./LabelDetails/LabelDetails"; import { GroupDetails } from "./GroupDetails/GroupDetails"; import { BehaviorList } from "./BehaviorList/BehaviorList"; +import { BehaviorDetails } from "./BehaviorDetails/BehaviorDetails"; interface IPanelInfo { nameKey: string; @@ -29,6 +30,7 @@ type PanelId = "" | "LabelDetails" // 标签属性 | "GroupDetails" // 群属性 | "BehaviorList" // 行为列表 +| "BehaviorDetails" // 行为属性 ; const PanelInfoMap = new Map(); @@ -60,6 +62,10 @@ PanelInfoMap.set("BehaviorList", { nameKey: "Panel.Title.Behavior.List.View", introKay: "Panel.Info.Behavior.List.View", class: BehaviorList, hidePadding: true }); +PanelInfoMap.set("BehaviorDetails", { + nameKey: "Panel.Title.Behavior.Details.View", introKay: "Panel.Info.Behavior.Details.View", + class: BehaviorDetails +}); function getPanelById(panelId: PanelId): ReactNode { switch (panelId) {