Skip to content

Commit

Permalink
Bug fix for https://bugs.launchpad.net/or/+bug/1987453. Web: HUD/Forc…
Browse files Browse the repository at this point in the history
…e Information, some labels not visible.
  • Loading branch information
mbm-OR committed Aug 23, 2022
1 parent 95c8cb1 commit 6baf43d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/RunActivity/Viewer3D/Popups/HUDWindow.cs
@@ -1,4 +1,4 @@
// COPYRIGHT 2011, 2012, 2013 by the Open Rails project.
// COPYRIGHT 2011, 2012, 2013 by the Open Rails project.
//
// This file is part of Open Rails.
//
Expand Down Expand Up @@ -1038,6 +1038,7 @@ void TextPageBrakeInfo(TableData table)

void TextPageForceInfo(TableData table)
{
TableSetLabelValueColumns(table, 0, 2);
TextPageHeading(table, Viewer.Catalog.GetString("FORCE INFORMATION"));

var train = Viewer.PlayerLocomotive.Train;
Expand Down
4 changes: 4 additions & 0 deletions Source/RunActivity/Viewer3D/WebServices/Web/HUD/index.js
Expand Up @@ -85,6 +85,7 @@ function ApiHeadUpDisplay() {
DebugColSpanTo3 = ['Render process','Updater process','Loader process','Sound process','Total process'],
DebugWidthTofix = ['primitives','Camera'],
// Force information
ForceColSpanTo15 = ['Wind Speed'],
ForceColSpanTo4 = ['(Simple adhesion model)','Dynamic brake'],
ForceColSpanTo3 = ['Axle out force','Loco Adhesion','Wagon Adhesion'],
// Brake information
Expand Down Expand Up @@ -135,6 +136,9 @@ function ApiHeadUpDisplay() {
Str += "<td class='td_nowrap' >" + obj.extraTable.values[next] + "</td>";
}
// Force info requires colspan into first col
else if (obj.extraTable.values[next].includes(ForceColSpanTo15)) {
Str += "<td colspan='15' >" + obj.extraTable.values[next] + "</td>";
}
else if (ForceColSpanTo4.indexOf(obj.extraTable.values[next]) !== -1 || obj.extraTable.values[next].indexOf('===') !== -1){ // Locomotive info
Str += "<td colspan='4' >" + obj.extraTable.values[next] + "</td>";
}
Expand Down

0 comments on commit 6baf43d

Please sign in to comment.