From 58b68138b0b26ccfa696f634052147e85b40dabd Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Fri, 17 May 2024 06:58:20 +0300 Subject: [PATCH 1/5] Port --- Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs | 9 +++++++++ Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs | 1 + Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs | 3 +++ 3 files changed, 13 insertions(+) diff --git a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs index 8774c1dfb5c..8725cdd6b2a 100644 --- a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs +++ b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs @@ -115,6 +115,15 @@ protected void DrawCircles(DrawingHandleScreen handle) } } + // Frontier Corvax: north line drawing + protected void DrawNorthLine(DrawingHandleScreen handle, Angle angle) + { + var origin = ScalePosition(-new Vector2(Offset.X, -Offset.Y)); + var aExtent = (angle - Math.Tau / 4).ToVec() * ScaledMinimapRadius * 1.42f; + var lineColor = Color.Red.WithAlpha(0.02f); + handle.DrawLine(origin, origin + aExtent, lineColor); + } + protected void DrawGrid(DrawingHandleScreen handle, Matrix3 matrix, Entity grid, Color color, float alpha = 0.01f) { var rator = Maps.GetAllTilesEnumerator(grid.Owner, grid.Comp); diff --git a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs index f03c4402952..bf04b596a14 100644 --- a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs @@ -105,6 +105,7 @@ protected override void Draw(DrawingHandleScreen handle) } DrawCircles(handle); + DrawNorthLine(handle, _angle.Value); // Frontier Corvax: north line drawing var gridNent = EntManager.GetNetEntity(GridEntity); var mapPos = _xformSystem.ToMapCoordinates(_coordinates.Value); var ourGridMatrix = _xformSystem.GetWorldMatrix(gridXform.Owner); diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs index 39fd8038ebd..e3fbebb5e39 100644 --- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs @@ -188,6 +188,9 @@ protected override void Draw(DrawingHandleScreen handle) // Frontier - collect blip location data outside foreach - more changes ahead var blipDataList = new List(); + // Frontier Corvax: north line drawing + DrawNorthLine(handle, rot); + // Draw other grids... differently foreach (var grid in _grids) { From 03ea874cad6a190431f423b4ea39032070637850 Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Fri, 17 May 2024 12:51:54 +0300 Subject: [PATCH 2/5] requested change --- Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs index e3fbebb5e39..1d218fedd53 100644 --- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs @@ -147,6 +147,10 @@ protected override void Draw(DrawingHandleScreen handle) Matrix3.Multiply(posMatrix, ourEntMatrix, out var ourWorldMatrix); var ourWorldMatrixInvert = ourWorldMatrix.Invert(); + // Frontier Corvax: north line drawing + var rot = ourEntRot + _rotation.Value; + DrawNorthLine(handle, rot); + // Draw our grid in detail var ourGridId = xform.GridUid; if (EntManager.TryGetComponent(ourGridId, out var ourGrid) && @@ -178,7 +182,6 @@ protected override void Draw(DrawingHandleScreen handle) handle.DrawPrimitives(DrawPrimitiveTopology.TriangleFan, radarPosVerts, Color.Lime); - var rot = ourEntRot + _rotation.Value; var viewBounds = new Box2Rotated(new Box2(-WorldRange, -WorldRange, WorldRange, WorldRange).Translated(mapPos.Position), rot, mapPos.Position); var viewAABB = viewBounds.CalcBoundingBox(); @@ -188,8 +191,6 @@ protected override void Draw(DrawingHandleScreen handle) // Frontier - collect blip location data outside foreach - more changes ahead var blipDataList = new List(); - // Frontier Corvax: north line drawing - DrawNorthLine(handle, rot); // Draw other grids... differently foreach (var grid in _grids) From db06089343cf5b31934965f105e42942555a125e Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Mon, 20 May 2024 23:14:32 +0300 Subject: [PATCH 3/5] Update Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs Co-authored-by: whatston3 <166147148+whatston3@users.noreply.github.com> --- Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs index 8725cdd6b2a..05ca86e1422 100644 --- a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs +++ b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs @@ -120,7 +120,7 @@ protected void DrawNorthLine(DrawingHandleScreen handle, Angle angle) { var origin = ScalePosition(-new Vector2(Offset.X, -Offset.Y)); var aExtent = (angle - Math.Tau / 4).ToVec() * ScaledMinimapRadius * 1.42f; - var lineColor = Color.Red.WithAlpha(0.02f); + var lineColor = Color.Red.WithAlpha(0.05f); handle.DrawLine(origin, origin + aExtent, lineColor); } From 6fd9e7f36d9696b203813196442d1b2d3e7acf9a Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Mon, 20 May 2024 23:15:12 +0300 Subject: [PATCH 4/5] Update BaseShuttleControl.xaml.cs --- Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs index 05ca86e1422..f67762acc51 100644 --- a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs +++ b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs @@ -120,7 +120,7 @@ protected void DrawNorthLine(DrawingHandleScreen handle, Angle angle) { var origin = ScalePosition(-new Vector2(Offset.X, -Offset.Y)); var aExtent = (angle - Math.Tau / 4).ToVec() * ScaledMinimapRadius * 1.42f; - var lineColor = Color.Red.WithAlpha(0.05f); + var lineColor = Color.Red.WithAlpha(0.1f); handle.DrawLine(origin, origin + aExtent, lineColor); } From d73a9d10debcea6c20d4a85417b59099f57dd973 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Mon, 20 May 2024 23:16:09 +0300 Subject: [PATCH 5/5] Update ShuttleNavControl.xaml.cs --- Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs index 58d262c7424..01374dc0820 100644 --- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs @@ -191,7 +191,6 @@ protected override void Draw(DrawingHandleScreen handle) // Frontier - collect blip location data outside foreach - more changes ahead var blipDataList = new List(); - // Draw other grids... differently foreach (var grid in _grids) {