From af806d46300be970227e0be504b377a17f2f22de Mon Sep 17 00:00:00 2001 From: PeenScreeker Date: Tue, 27 Aug 2024 22:12:22 -0400 Subject: [PATCH] feat: pass region to c++ to improve point picking visualization --- scripts/pages/zoning/zoning.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/pages/zoning/zoning.ts b/scripts/pages/zoning/zoning.ts index ddc8e6bd..7a67dc5d 100644 --- a/scripts/pages/zoning/zoning.ts +++ b/scripts/pages/zoning/zoning.ts @@ -496,13 +496,17 @@ class ZoneMenu { if (!this.selectedZone || !this.selectedZone.zone) return; this.pointPick = PickType.corner; + const index = this.panels.regionSelect.GetSelected().GetAttributeInt('value', -1); + const region = this.selectedZone.zone.regions[index]; if (GameInterfaceAPI.GetSettingBool('mom_zone_two_click')) { - const index = this.panels.regionSelect.GetSelected().GetAttributeInt('value', -1); - this.selectedZone.zone.regions[index].points.length = 0; + region.points.length = 0; this.panels.pointsList.RemoveAndDeleteChildren(); } //@ts-expect-error function name this.panels.zoningMenu.startPointPick(true); + + //@ts-expect-error function name + this.panels.zoningMenu.setCornersFromRegion(region); } static addPointToList(i: number, point: number[]) {