From f095ebc5d05e8b4233839ce9e4834b8b29a0d7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=AF=97=E6=B4=A5?= <2723065175@qq.com> Date: Wed, 15 Jun 2022 01:42:36 +0000 Subject: [PATCH] =?UTF-8?q?!1930=20=E4=BC=98=E5=8C=96:=E7=94=BB=E6=B4=9E?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E5=BD=93=E5=89=8D=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/Room/DrawHole.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Add-on/Room/DrawHole.ts b/src/Add-on/Room/DrawHole.ts index 0a460fdc3..fc5748057 100644 --- a/src/Add-on/Room/DrawHole.ts +++ b/src/Add-on/Room/DrawHole.ts @@ -91,7 +91,7 @@ export class Command_DrawHole implements Command if (!helper._Walls.length) { AppToaster.show({ - message: "没有墙可以放置窗户!", + message: `没有墙可以放置${this._HoleIType === IHoleType.Door ? "门洞" : "窗户"}!`, timeout: 5000, intent: Intent.WARNING, }); @@ -221,6 +221,7 @@ export class Command_DrawHole implements Command let pRes = await app.Editor.GetPoint({ Callback: UpdateHole, Raycast: true, + Msg: `请输入放置的位置:`, KeyWordList: [{ key: "H", msg: "高度" }, { key: "L", msg: "长度" }, { key: "D", msg: "离地" }], RaycastPreExecFunc: () => { @@ -260,8 +261,7 @@ export class Command_DrawHole implements Command else if (pRes.StringResult === "L") { let LRes = await app.Editor.GetDistance({ Msg: "请输入洞长度:", Default: this.holeLength }); - if (LRes.Status === PromptStatus.Cancel) return; - else if (LRes.Status === PromptStatus.OK) + if (LRes.Status === PromptStatus.OK) { if (LRes.Distance > 0) this.holeLength = LRes.Distance; @@ -473,7 +473,7 @@ export class Command_DrawHole implements Command Callback: UpdateHole, Raycast: true, KeyWordList: [{ key: "H", msg: "高度" }, { key: "D", msg: "离地" }], - Msg: "请选择一个点,用来放置L型窗户", + Msg: `请选择一个点,用来放置L型窗户:`, RaycastPreExecFunc: () => { //TODO:PERF 已知问题,圆弧墙的功能消耗了8ms @@ -716,7 +716,7 @@ export class Command_DrawHole implements Command Callback: UpdateHole, Raycast: true, KeyWordList: [{ key: "H", msg: "高度" }, { key: "D", msg: "离地" }], - Msg: "请选择一个点,用来放置U型窗户", + Msg: `请选择一个点,用来放置U型窗户:`, RaycastPreExecFunc: () => { //TODO:PERF 已知问题,圆弧墙的功能消耗了8ms @@ -776,8 +776,7 @@ export class Command_DrawHole implements Command GetHoleHeight = async (hole: RoomHolePolyline) => { let hRes = await app.Editor.GetDistance({ Msg: "请输入洞高度:", Default: hole.Height }); - if (hRes.Status === PromptStatus.Cancel) return; - else if (hRes.Status === PromptStatus.OK) + if (hRes.Status === PromptStatus.OK) { if (hRes.Distance > 0) this.holeHeight = hRes.Distance; @@ -788,8 +787,7 @@ export class Command_DrawHole implements Command GetHoleoffGround = async () => { let DRes = await app.Editor.GetDistance({ Msg: "请输入离地距离:", Default: this.offGround }); - if (DRes.Status === PromptStatus.Cancel) return; - else if (DRes.Status === PromptStatus.OK) + if (DRes.Status === PromptStatus.OK) { if (DRes.Distance >= 0) this.offGround = DRes.Distance;