From 74e1cbc7d9f0d55586add03920b916cb49668f08 Mon Sep 17 00:00:00 2001 From: lewd_alt <210463139+lewd-alt@users.noreply.github.com> Date: Sun, 14 Jun 2026 11:40:13 -0500 Subject: [PATCH] removed Vector2D_2 --- 2DGAMELIB/_2DGAMELIB/Lab.cs | 7 +++---- 2DGAMELIB/_2DGAMELIB/ManagedArea.cs | 3 --- 2DGAMELIB/_2DGAMELIB/ShapePartT.cs | 18 ++++++++++-------- 2DGAMELIB/_2DGAMELIB/Vector2D_2.cs | 19 ------------------- .../SlaveMatrix/BodyPartClasses/InfoPanel.cs | 3 ++- 5 files changed, 15 insertions(+), 35 deletions(-) delete mode 100644 2DGAMELIB/_2DGAMELIB/Vector2D_2.cs diff --git a/2DGAMELIB/_2DGAMELIB/Lab.cs b/2DGAMELIB/_2DGAMELIB/Lab.cs index 1d08019..0fb85d7 100644 --- a/2DGAMELIB/_2DGAMELIB/Lab.cs +++ b/2DGAMELIB/_2DGAMELIB/Lab.cs @@ -97,9 +97,9 @@ namespace _2DGAMELIB if (!string.IsNullOrEmpty(_shapePartT.Text)) { _shapePartT.SetRectSize(new Vector2D(Width, 10.0)); - Vector2D_2 stringRect = _shapePartT.GetStringRect(Are.DisplayUnitScale, Are.DisplayGraphics); - double x = ((stringRect.v2.X > Min) ? stringRect.v2.X : Min) + 0.07; - _shapePartT.SetRectSize(new Vector2D(x, stringRect.v2.Y)); + double[] stringRect = _shapePartT.GetStringRect(Are.DisplayUnitScale, Are.DisplayGraphics); + double x = ((stringRect[2] > Min) ? stringRect[2] : Min) + 0.07; + _shapePartT.SetRectSize(new Vector2D(x, stringRect[3])); } else { @@ -107,7 +107,6 @@ namespace _2DGAMELIB _shapePartT.SetRectSize(new Vector2D(x2, Min)); } - _shapePartT.GetOP()[0].ps[0] = new Vector2D(0.0, 0.0); _shapePartT.GetOP()[0].ps[1] = new Vector2D(_shapePartT.GetRectSize().X, 0.0); _shapePartT.GetOP()[0].ps[2] = new Vector2D(_shapePartT.GetRectSize().X, _shapePartT.GetRectSize().Y); diff --git a/2DGAMELIB/_2DGAMELIB/ManagedArea.cs b/2DGAMELIB/_2DGAMELIB/ManagedArea.cs index 44287ba..5aa537a 100644 --- a/2DGAMELIB/_2DGAMELIB/ManagedArea.cs +++ b/2DGAMELIB/_2DGAMELIB/ManagedArea.cs @@ -6,8 +6,6 @@ namespace _2DGAMELIB //TODO: Find a better name... public class ManagedArea : RenderArea { - private double strength; - private double unitS; public ManagedArea(double Unit, double XRatio, double YRatio, double Size, double DisMag, double HitMag, double Strength) : @@ -16,7 +14,6 @@ namespace _2DGAMELIB SetXYRatio(XRatio, YRatio); base.Size = Size; unitScale = Unit; - strength = Strength; displayUnitScale = Unit * DisMag; double num = 1.0 - Strength; unitS = displayUnitScale * num; diff --git a/2DGAMELIB/_2DGAMELIB/ShapePartT.cs b/2DGAMELIB/_2DGAMELIB/ShapePartT.cs index bb63fc9..d55fb7c 100644 --- a/2DGAMELIB/_2DGAMELIB/ShapePartT.cs +++ b/2DGAMELIB/_2DGAMELIB/ShapePartT.cs @@ -254,7 +254,7 @@ namespace _2DGAMELIB } } - public Vector2D_2 GetStringRect(double Unit, Graphics Graphics) + public double[] GetStringRect(double Unit, Graphics Graphics) { double num = Unit * base.GetSize(); @@ -264,7 +264,6 @@ namespace _2DGAMELIB EditF = false; EditTS = false; } - CharacterRange[] crr = new CharacterRange[]{ new CharacterRange(0, Text.Length) }; @@ -281,17 +280,20 @@ namespace _2DGAMELIB .MeasureCharacterRanges(Text ?? string.Empty, font, layoutRect, stringformat)[0] .GetBounds(Graphics); - return new Vector2D_2( - new Vector2D(bounds.X / num, bounds.Y / num), - new Vector2D(bounds.Width / num, bounds.Height / num)); + return new double[4]{ + bounds.X / num, + bounds.Y / num, + bounds.Width / num, + bounds.Height / num + }; } public Vector2D[] GetStringRectPoints(double Unit, Graphics Graphics) { - Vector2D_2 stringRect = GetStringRect(Unit, Graphics); + double[] stringRect = GetStringRect(Unit, Graphics); - Vector2D pos = stringRect.v1; - Vector2D size = stringRect.v2; + Vector2D pos = new Vector2D(stringRect[0], stringRect[1]); + Vector2D size = new Vector2D(stringRect[2], stringRect[3]); size.X *= 1.07f; diff --git a/2DGAMELIB/_2DGAMELIB/Vector2D_2.cs b/2DGAMELIB/_2DGAMELIB/Vector2D_2.cs deleted file mode 100644 index cae38c1..0000000 --- a/2DGAMELIB/_2DGAMELIB/Vector2D_2.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - - -namespace _2DGAMELIB -{ - [Serializable] - public struct Vector2D_2 - { - public Vector2D v1; - - public Vector2D v2; - - public Vector2D_2(Vector2D v1, Vector2D v2) - { - this.v1 = v1; - this.v2 = v2; - } - } -} \ No newline at end of file diff --git a/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs b/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs index 8ae89fc..4e01d85 100644 --- a/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs +++ b/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs @@ -280,7 +280,8 @@ namespace SlaveMatrix private void SetButPos() { - yp.SetPositionBase(new Vector2D(yp.GetPositionBase().X, Mai.ShapePartT.ToGlobal(Mai.ShapePartT.GetStringRect(Are.UnitScale, Are.DisplayGraphics).v2).Y + 0.0025)); + double[] rect = Mai.ShapePartT.GetStringRect(Are.UnitScale, Are.DisplayGraphics); + yp.SetPositionBase(new Vector2D(yp.GetPositionBase().X, Mai.ShapePartT.ToGlobal(new Vector2D(rect[2], rect[3])).Y + 0.0025)); np.SetPositionBase(new Vector2D(np.GetPositionBase().X, yp.ToGlobal(yp.GetOP().Last().ps.Last()).Y + 0.0025)); }