From f87da8cbab13d77f6fce74327abe93cef39e4185 Mon Sep 17 00:00:00 2001 From: MrKBear Date: Tue, 8 Mar 2022 20:55:40 +0800 Subject: [PATCH] Range panel add update attr --- source/Localization/EN-US.ts | 1 + source/Localization/ZH-CN.ts | 1 + source/Panel/RangeDetails/RangeDetails.tsx | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/source/Localization/EN-US.ts b/source/Localization/EN-US.ts index 752c7a2..513b948 100644 --- a/source/Localization/EN-US.ts +++ b/source/Localization/EN-US.ts @@ -43,6 +43,7 @@ const EN_US = { "Common.Attr.Key.Radius.Z": "Radius Z", "Common.Attr.Key.Color": "Color", "Common.Attr.Key.Display": "Display", + "Common.Attr.Key.Update": "Update", "Common.Attr.Key.Error.Multiple": "Multiple values", "Panel.Info.Range.Details.Attr.Error.Not.Range": "Object is not a Range", "Panel.Info.Range.Details.Attr.Error.Unspecified": "Unspecified range object", diff --git a/source/Localization/ZH-CN.ts b/source/Localization/ZH-CN.ts index dfa4c99..e07c1aa 100644 --- a/source/Localization/ZH-CN.ts +++ b/source/Localization/ZH-CN.ts @@ -43,6 +43,7 @@ const ZH_CN = { "Common.Attr.Key.Radius.Z": "Z 半径", "Common.Attr.Key.Color": "颜色", "Common.Attr.Key.Display": "显示", + "Common.Attr.Key.Update": "更新", "Common.Attr.Key.Error.Multiple": "多重数值", "Panel.Info.Range.Details.Attr.Error.Not.Range": "对象不是一个范围", "Panel.Info.Range.Details.Attr.Error.Unspecified": "未指定范围对象", diff --git a/source/Panel/RangeDetails/RangeDetails.tsx b/source/Panel/RangeDetails/RangeDetails.tsx index 8f0ac55..c28e871 100644 --- a/source/Panel/RangeDetails/RangeDetails.tsx +++ b/source/Panel/RangeDetails/RangeDetails.tsx @@ -14,6 +14,7 @@ class RangeDetails extends Component { public readonly AttrI18nKey: AllI18nKeys[] = [ "Common.Attr.Key.Display.Name", "Common.Attr.Key.Display", + "Common.Attr.Key.Update", "Common.Attr.Key.Color", "Common.Attr.Key.Position.X", "Common.Attr.Key.Position.Y", @@ -71,6 +72,12 @@ class RangeDetails extends Component { } }}/> + { + if (this.props.status) { + this.props.status.changeRangeAttrib(range.id, "update", val); + } + }}/> + { if (this.props.status) { this.props.status.changeRangeAttrib(range.id, "color", color);