Skip to content

Commit

Permalink
solved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sweiland-openrails committed Dec 6, 2023
2 parents f0010ab + 90255fb commit 481ed9d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 64 deletions.
Expand Up @@ -287,43 +287,33 @@ void AddSpace(bool full)

{
var car = PlayerTrain.Cars[CarPosition];
//Front brake hose
if (car != PlayerTrain.Cars.First())
{
AddSpace(false);
line.Add(new buttonFrontBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
line.Add(new buttonFrontAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
line.Add(new buttonCouplerFront(0, 0, textHeight, Owner.Viewer, car, CarPosition));
}
else
{
line.Add(new buttonFrontBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
line.Add(new buttonFrontAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));
line.Add(new buttonCouplerFront(0, 0, textHeight, Owner.Viewer, car, CarPosition));
}

line.Add(new buttonLoco(0, 0, textHeight, Owner.Viewer, car));
//Front brake hose
line.Add(new buttonFrontBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
// Front angle cock
line.Add(new buttonFrontAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));

if (car != PlayerTrain.Cars.Last())
{
line.Add(new buttonCouplerRear(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
line.Add(new buttonRearAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));
line.Add(new buttonRearBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
line.Add(new buttonHandBrake(0, 0, textHeight, Owner.Viewer, CarPosition));
}
else
{
line.Add(new buttonCouplerRear(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
line.Add(new buttonRearAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));
line.Add(new buttonRearBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
if (car != PlayerTrain.Cars.First())
AddSpace(false);
line.Add(new buttonHandBrake(0, 0, textHeight, Owner.Viewer, CarPosition));
}

// Front coupler
line.Add(new buttonCouplerFront(0, 0, textHeight, Owner.Viewer, car, CarPosition));
// Loco label
line.Add(new buttonLoco(0, 0, textHeight, Owner.Viewer, car));
// Rear coupler
line.Add(new buttonCouplerRear(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
// Rear angle cock
line.Add(new buttonRearAngleCock(0, 0, textHeight, Owner.Viewer, car, CarPosition));
// Rear brake hose
line.Add(new buttonRearBrakeHose(0, 0, textHeight, Owner.Viewer, car, CarPosition));
AddSpace(false);
// Handbrake
line.Add(new buttonHandBrake(0, 0, textHeight, Owner.Viewer, CarPosition));
AddSpace(false);
// Bleed off valve
line.Add(new buttonBleedOffValve(0, 0, textHeight, Owner.Viewer, CarPosition));
AddSpace(false);

Expand Down
56 changes: 23 additions & 33 deletions Source/RunActivity/Viewer3D/Popups/TrainCarOperationsWindow.cs
Expand Up @@ -350,51 +350,41 @@ void AddSpace()

if (car.BrakesStuck || ((car is MSTSLocomotive) && (car as MSTSLocomotive).PowerReduction > 0)) carLabel.Color = Color.Red;

// Left arrow
line.Add(new buttonArrowLeft(0, 0, SymbolSize, Owner.Viewer, carPosition));
AddSpace();
if (car != PlayerTrain.Cars.First())
{
line.Add(new buttonFrontBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
line.Add(new buttonFrontAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
AddSpace();
line.Add(new buttonCouplerFront(0, 0, SymbolSize, Owner.Viewer, car));
}
else
{
line.Add(new buttonFrontBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
line.Add(new buttonFrontAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
AddSpace();
line.Add(new buttonCouplerFront(0, 0, SymbolSize, Owner.Viewer, car));
}

// Front brake hose
line.Add(new buttonFrontBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
// Front angle cock
line.Add(new buttonFrontAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
AddSpace();

// Front coupler
line.Add(new buttonCouplerFront(0, 0, SymbolSize, Owner.Viewer, car));
// Car label
line.Add(carLabel);
if (car != PlayerTrain.Cars.Last())
{
line.Add(new buttonCouplerRear(0, 0, SymbolSize, Owner.Viewer, car));
AddSpace();
line.Add(new buttonRearAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
line.Add(new buttonRearBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
}
else
{
line.Add(new buttonCouplerRear(0, 0, SymbolSize, Owner.Viewer, car));
AddSpace();
line.Add(new buttonRearAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
line.Add(new buttonRearBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
}
// Rear coupler
line.Add(new buttonCouplerRear(0, 0, SymbolSize, Owner.Viewer, car));
AddSpace();

// Rear angle cock
line.Add(new buttonRearAngleCock(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
// Rear brake hose
line.Add(new buttonRearBrakeHose(0, 0, SymbolSize, Owner.Viewer, car, carPosition));
AddSpace();

// Handbrake
line.Add(new buttonHandBrake(0, 0, SymbolSize, Owner.Viewer, carPosition));
AddSpace();

// Bleed Off Valve
// Bleed off valve
line.Add(new buttonBleedOffValve(0, 0, SymbolSize, Owner.Viewer, carPosition));
AddSpace();

if (AllSymbolsMode)//Allows to display all symbols
{
// Electric Train Supply Connection (ETS)
// Electric train supply connection (ETS)
if (PlayerTrain.Cars.Count() > 1 && wagon.PowerSupply != null)
{
line.Add(new buttonToggleElectricTrainSupplyCable(0, 0, SymbolSize, Owner.Viewer, carPosition));
Expand All @@ -417,7 +407,7 @@ void AddSpace()
}
}
}

// Right arrow
line.Add(new buttonArrowRight(0, 0, textHeight, Owner.Viewer, carPosition));
AddSpace();
AddSpace();
Expand Down Expand Up @@ -477,7 +467,7 @@ public void localScrollLayout(int selectedCarPosition)

LocalScrollPosition = 0;

if (CarPositionVisible > 0 && selectedCarPosition >= CarPositionVisible)// && selectedCarPosition != currentCarPosition)// Not related with CarID
if (CarPositionVisible > 0 && selectedCarPosition >= CarPositionVisible)// Not related with CarID
{
Client = ControlLayoutScrollboxVertical.NewClient;
var xcarPosition = CarPositionVisible;
Expand Down Expand Up @@ -587,7 +577,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
carOperations.CarOperationChanged = carOperations.Visible && carOperations.CarOperationChanged;
}

if (CarPosition != trainCarViewer.CarPosition)
if (CarPosition != trainCarViewer.CarPosition && Owner.Viewer.TrainCarOperationsWebpage.Connections > 0)
{
// Required to scroll the main window from the web version
UpdateTrainCarOperation = true;
Expand Down

0 comments on commit 481ed9d

Please sign in to comment.