Merge ~mauribachi/or:OR-Git-F4-ReversalPoint into or:master

Proposed by mbm_OR
Status: Merged
Approved by: James Ross
Approved revision: 9f0ee6507de9855ecb388be8b5ebfef6afce6f57
Merged at revision: 62079b8a57b6850ed1402b5be7330aedbbf9a763
Proposed branch: ~mauribachi/or:OR-Git-F4-ReversalPoint
Merge into: or:master
Diff against target: 47 lines (+12/-6)
1 file modified
Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs (+12/-6)
Reviewer Review Type Date Requested Status
James Ross Approve
Review via email: mp+362824@code.launchpad.net

Commit message

Bug fix for https://bugs.launchpad.net/or/+bug/1814929 The reversal point icon gets under the train ahead icon.

Description of the change

TrackMonitorWindow: The reverse point arrow is now displayed on top of the yellow train ahead indicator and can be clearly seen.

To post a comment you must log in.
Revision history for this message
James Ross (twpol) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs
2index 9191b0a..69be1f3 100644
3--- a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs
4+++ b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs
5@@ -564,7 +564,7 @@ namespace Orts.Viewer3D.Popups
6 spriteBatch.Draw(TrackMonitorImages, new Rectangle(offset.X + trainPosition[0], offset.Y + position, trainPosition[3], trainPosition[4]), sprite, Color.White);
7 }
8
9- // draw own train marker at required position
10+ // draw arrow at required position
11 void drawArrow(SpriteBatch spriteBatch, Point offset, Rectangle sprite, int position)
12 {
13 spriteBatch.Draw(TrackMonitorImages, new Rectangle(offset.X + arrowPosition[0], offset.Y + position, arrowPosition[3], arrowPosition[4]), sprite, Color.White);
14@@ -646,10 +646,6 @@ namespace Orts.Viewer3D.Popups
15 drawStation(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem);
16 break;
17
18- case Train.TrainObjectItem.TRAINOBJECTTYPE.REVERSAL:
19- drawReversal(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem, ref firstLabelShown);
20- break;
21-
22 case Train.TrainObjectItem.TRAINOBJECTTYPE.WAITING_POINT:
23 drawWaitingPoint(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem, ref firstLabelShown);
24 break;
25@@ -658,11 +654,21 @@ namespace Orts.Viewer3D.Popups
26 lastLabelPosition = drawMilePost(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem, ref firstLabelShown);
27 break;
28
29+ default: // capture unkown item
30+ break;
31+ }
32+ }
33+ //drawReversal and drawSwitch icons on top.
34+ foreach (var thisItem in itemList)
35+ {
36+ switch (thisItem.ItemType)
37+ {
38 case Train.TrainObjectItem.TRAINOBJECTTYPE.FACING_SWITCH:
39 drawSwitch(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem, ref firstLabelShown);
40 break;
41
42- default: // capture unkown item
43+ case Train.TrainObjectItem.TRAINOBJECTTYPE.REVERSAL:
44+ drawReversal(spriteBatch, offset, startObjectArea, endObjectArea, zeroPoint, maxDistance, distanceFactor, firstLabelPosition, forward, lastLabelPosition, thisItem, ref firstLabelShown);
45 break;
46 }
47 }

Subscribers

People subscribed via source and target branches

to all changes: