Skip to content

Commit 95da33b

Browse files
committed
Cleaned code.
1 parent bec4b34 commit 95da33b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Source/RunActivity/Viewer3D/Popups/TrainCarOperationsViewerWindow.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ private void ModifyWindowSize()
318318
var locationY = newTop;
319319
if (Owner.Viewer.TrainCarOperationsWindow.LayoutMoved)
320320
{
321-
CkeckCollision(newWidth, newHeight, newTop, ref locationX, ref locationY);
321+
CkeckCollision(newWidth, newHeight, ref locationX, ref locationY);
322322
Owner.Viewer.TrainCarOperationsWindow.LayoutMoved = false;
323323
}
324324
MoveTo(locationX, locationY);
@@ -375,7 +375,7 @@ void AddSpace(bool full)
375375
var car = PlayerTrain.Cars[CarPosition];
376376
//Reset brakes
377377
var warningCarPos = Owner.Viewer.TrainCarOperationsWindow.WarningCarPosition.Where(x => x == true).Count();
378-
line.Add(new buttonInitializeBrakes(0, 0, textHeight, Owner.Viewer, CarPosition, warningCarPos));
378+
line.Add(new buttonInitializeBrakes(0, 0, textHeight, Owner.Viewer, warningCarPos));
379379

380380
if (car != PlayerTrain.Cars.First())
381381
AddSpace(false);
@@ -655,7 +655,7 @@ class buttonInitializeBrakes : Image
655655
readonly Viewer Viewer;
656656
readonly TrainCarOperationsViewerWindow TrainCarViewer;
657657
readonly int WarningCars;
658-
public buttonInitializeBrakes(int x, int y, int size, Viewer viewer, int carPosition, int warningCars)
658+
public buttonInitializeBrakes(int x, int y, int size, Viewer viewer, int warningCars)
659659
: base(x, y, size, size)
660660
{
661661
Viewer = viewer;
@@ -838,7 +838,6 @@ class buttonFrontAngleCock : Image
838838
readonly TrainCarOperationsViewerWindow TrainCarViewer;
839839
readonly int CarPosition;
840840
readonly bool First;
841-
readonly float carAngleCockAOpenAmount;
842841
public buttonFrontAngleCock(int x, int y, int size, Viewer viewer, TrainCar car, int carPosition)
843842
: base(x, y, size, size)
844843
{
@@ -1214,7 +1213,7 @@ public Texture2D locomotiveStatus(int CarPosition)
12141213
return Texture;
12151214
}
12161215
}
1217-
public void CkeckCollision(int newWidth, int newHeight, int newTop, ref int locationX, ref int locationY)
1216+
public void CkeckCollision(int newWidth, int newHeight, ref int locationX, ref int locationY)
12181217
{
12191218
var trainCarOperations = Owner.Viewer.TrainCarOperationsWindow;
12201219
var trainOperationsViewer = Owner.Viewer.TrainCarOperationsViewerWindow;
@@ -1229,7 +1228,6 @@ public void CkeckCollision(int newWidth, int newHeight, int newTop, ref int loca
12291228

12301229
// logic to apply
12311230
var displaySizeX = Owner.Viewer.DisplaySize.X;
1232-
var halfDisplaySizeX = displaySizeX / 2;
12331231
var DisplaySizeY = Owner.Viewer.DisplaySize.Y;
12341232
var halfDisplaySizeY = DisplaySizeY / 2;
12351233
var topMarging = tcoLocation.Y;

0 commit comments

Comments
 (0)