Skip to content

Commit d3968a8

Browse files
committed
Dynamically adjust text, hardcode width of place waypoint window
1 parent dd19184 commit d3968a8

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/TSMapEditor/Config/UI/Windows/PlaceWaypointWindow.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[PlaceWaypointWindow]
2+
$Width=215
23
$CC0=lblDescription:XNALabel
3-
$Width=getRight(lblDescription) + EMPTY_SPACE_SIDES + 30
44
$CC1=tbWaypointNumber:EditorNumberTextBox
55
$CC2=lblWaypointColor:XNALabel
66
$CC3=ddWaypointColor:XNADropDown
@@ -11,7 +11,7 @@ HasCloseButton=yes
1111
[lblDescription]
1212
$X=EMPTY_SPACE_SIDES
1313
$Y=EMPTY_SPACE_TOP
14-
Text=Input waypoint number (0-699):
14+
Text=Input waypoint number:
1515

1616
[tbWaypointNumber]
1717
$X=EMPTY_SPACE_SIDES

src/TSMapEditor/UI/Windows/PlaceWaypointWindow.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public PlaceWaypointWindow(WindowManager windowManager, Map map, MutationManager
2424
private readonly IMutationTarget mutationTarget;
2525

2626
private EditorNumberTextBox tbWaypointNumber;
27+
private XNALabel lblDescription;
2728
private XNADropDown ddWaypointColor;
2829

2930
private Point2D cellCoords;
@@ -36,6 +37,9 @@ public override void Initialize()
3637
tbWaypointNumber = FindChild<EditorNumberTextBox>(nameof(tbWaypointNumber));
3738
tbWaypointNumber.MaximumTextLength = (Constants.MaxWaypoint - 1).ToString(CultureInfo.InvariantCulture).Length;
3839

40+
lblDescription = FindChild<XNALabel>(nameof(lblDescription));
41+
lblDescription.Text = $"Input waypoint number (0-{Constants.MaxWaypoint - 1}):";
42+
3943
FindChild<EditorButton>("btnPlace").LeftClick += BtnPlace_LeftClick;
4044

4145
// Init color dropdown options

0 commit comments

Comments
 (0)