Skip to content

Commit 872b4d4

Browse files
committed
Automatic merge of T1.6-rc7-43-ge3d1d75f9 and 15 pull requests
- Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1091 at 2e06f85: Automatic speed control - Pull request #1104 at ccc5c4d: Handle simple adhesion within the axle module - Pull request #1115 at 270f22f: Do not activate ETS switch if no suitable cars are attached - Pull request #1120 at ba3c47f: Automatically Calculate Friction Values if Missing - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1130 at 8ae6bb7: Fix F9 points to an incorrect car ID. - Pull request #1143 at ba9e40a: Status in Work Orders popup set too fast - Pull request #1151 at 25d2f29: fix: Do not allow non-ACE/DDS textures in content - Pull request #1152 at 66dfd09: fix: Clean up multiple issues with data logger - Pull request #1153 at d2f2a02: Fix TrItems in track viewer (events were over-writing mileposts) - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1124 at fab5457: Built-in PBL2 brake controller - Pull request #1128 at 1d7643d: Particle Emitter Overhaul
17 parents adaddf1 + e3d1d75 + e10390b + 2e06f85 + ccc5c4d + 270f22f + ba3c47f + 91d2d26 + 8ae6bb7 + ba9e40a + 25d2f29 + 66dfd09 + d2f2a02 + 5845a1a + 689494b + fab5457 + 1d7643d commit 872b4d4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

Source/RunActivity/Viewer3D/Popups/HelpWindow.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,18 @@ public override void TabAction()
14191419

14201420
protected override ControlLayout Layout(ControlLayout layout)
14211421
{
1422+
int scrollPosition = 0;
1423+
if (Tabs[ActiveTab].Vbox != null)
1424+
{
1425+
foreach (var control in Tabs[ActiveTab].Vbox.Controls)
1426+
{
1427+
if (control is ControlLayoutScrollboxVertical controlLayoutScrollboxVertical)
1428+
{
1429+
scrollPosition = controlLayoutScrollboxVertical.GetScrollPosition();
1430+
}
1431+
}
1432+
}
1433+
14221434
var vbox = base.Layout(layout).AddLayoutVertical();
14231435

14241436
if (Tabs.Count > 0)
@@ -1434,8 +1446,17 @@ protected override ControlLayout Layout(ControlLayout layout)
14341446
}
14351447
vbox.AddHorizontalSeparator();
14361448
Tabs[ActiveTab].Layout(vbox);
1449+
1450+
foreach (var control in vbox.Controls)
1451+
{
1452+
if (control is ControlLayoutScrollboxVertical controlLayoutScrollboxVertical)
1453+
{
1454+
controlLayoutScrollboxVertical.SetScrollPosition(scrollPosition);
1455+
}
1456+
}
14371457
}
14381458

1459+
Tabs[ActiveTab].Vbox = vbox;
14391460
return vbox;
14401461
}
14411462

@@ -1462,12 +1483,14 @@ class TabData
14621483
public readonly Tab Tab;
14631484
public readonly string TabLabel;
14641485
public readonly Action<ControlLayout> Layout;
1486+
public Orts.Viewer3D.Popups.ControlLayoutVertical Vbox;
14651487

14661488
public TabData(Tab tab, string tabLabel, Action<ControlLayout> layout)
14671489
{
14681490
Tab = tab;
14691491
TabLabel = tabLabel;
14701492
Layout = layout;
1493+
Vbox = null;
14711494
}
14721495
}
14731496

Source/RunActivity/Viewer3D/Popups/WindowControls.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ protected ControlLayoutScrollbox(int width, int height)
587587

588588
public abstract int ScrollSize { get; }
589589

590+
public abstract int GetScrollPosition();
590591
public abstract void SetScrollPosition(int position);
591592

592593
internal RasterizerState ScissorTestEnable = new RasterizerState { ScissorTestEnable = true };
@@ -707,6 +708,11 @@ public override int ScrollSize
707708
}
708709
}
709710

711+
public override int GetScrollPosition()
712+
{
713+
return ScrollPosition;
714+
}
715+
710716
public override void SetScrollPosition(int position)
711717
{
712718
position = Math.Max(0, Math.Min(Math.Max(0, ScrollSize), position));
@@ -841,6 +847,11 @@ public override int ScrollSize
841847
}
842848
}
843849

850+
public override int GetScrollPosition()
851+
{
852+
return(ScrollPosition);
853+
}
854+
844855
public override void SetScrollPosition(int position)
845856
{
846857
position = Math.Max(0, Math.Min(Math.Max(0, ScrollSize), position));

0 commit comments

Comments
 (0)