Skip to content

Commit 55aee29

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3f9a4f2 + 646a65a commit 55aee29

File tree

11 files changed

+33
-24
lines changed

11 files changed

+33
-24
lines changed

src/TSMapEditor/Config/MapCode/Add Reveal Map Trigger.ini

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/TSMapEditor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace TSMapEditor
44
{
55
public static class Constants
66
{
7-
public const string ReleaseVersion = "1.5.1";
7+
public const string ReleaseVersion = "1.5.3";
88

99
public static int CellSizeX = 48;
1010
public static int CellSizeY = 24;
158 Bytes
Loading
363 Bytes
Loading
157 Bytes
Loading
363 Bytes
Loading

src/TSMapEditor/TSMapEditor.csproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@
6666
<None Update="Config\Default\Events.ini">
6767
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6868
</None>
69-
<None Update="Config\MapCode\Add Reveal Map Trigger.ini">
70-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
71-
</None>
7269
<None Update="Config\MapCode\Enable Blue Tiberium Spreader Lighting.ini">
7370
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7471
</None>
@@ -396,6 +393,9 @@
396393
<None Update="Content\sbDownArrow.png">
397394
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
398395
</None>
396+
<None Update="Content\sbDownArrowHovered.png">
397+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
398+
</None>
399399
<None Update="Content\sbMiddle.png">
400400
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
401401
</None>
@@ -408,6 +408,9 @@
408408
<None Update="Content\sbUpArrow.png">
409409
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
410410
</None>
411+
<None Update="Content\sbUpArrowHovered.png">
412+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
413+
</None>
411414
<None Update="Content\sortbutton.png">
412415
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
413416
</None>
@@ -481,7 +484,7 @@
481484
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.3" />
482485
<PackageReference Include="Rampastring.Tools" Version="2.0.6" />
483486
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.3" />
484-
<PackageReference Include="Rampastring.XNAUI.WindowsDX" Version="3.0.3" />
487+
<PackageReference Include="Rampastring.XNAUI.WindowsDX" Version="3.0.4" />
485488
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.10" />
486489
<PackageReference Include="Westwind.Scripting" Version="1.3.3" />
487490
</ItemGroup>
@@ -517,6 +520,11 @@
517520
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
518521
</None>
519522
</ItemGroup>
523+
<ItemGroup>
524+
<Compile Update="Config\Scripts\Add Map Reveal Trigger.cs">
525+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
526+
</Compile>
527+
</ItemGroup>
520528
<Target Name="RestoreDotnetTools" BeforeTargets="Restore">
521529
<Message Text="Restoring dotnet tools" Importance="High" />
522530
<Exec Command="dotnet tool restore" />

src/TSMapEditor/UI/Controls/EditorButton.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public EditorButton(WindowManager windowManager) : base(windowManager)
1212
{
1313
FontIndex = Constants.UIBoldFont;
1414
Height = Constants.UIButtonHeight;
15+
AlphaRate = 0.005f; // Override default animation rate in UISettings
1516
}
1617

1718
public Texture2D ExtraTexture { get; set; }

src/TSMapEditor/UI/MapUI.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public CursorAction CursorAction
173173

174174
public override void Initialize()
175175
{
176+
Name = nameof(MapUI);
176177
base.Initialize();
177178

178179
scrollRate = UserSettings.Instance.ScrollRate;
@@ -547,16 +548,26 @@ public override void OnRightClick(InputEventArgs inputEventArgs)
547548
{
548549
inputEventArgs.Handled = true;
549550

550-
if (CursorAction != null && !isRightClickScrolling)
551+
if (isRightClickScrolling)
552+
{
553+
StopRightClickScrolling();
554+
}
555+
else if (CursorAction != null)
551556
{
552557
CursorAction = null;
553558
}
554559

555-
isRightClickScrolling = false;
560+
StopRightClickScrolling();
556561

557562
base.OnRightClick(inputEventArgs);
558563
}
559564

565+
private void StopRightClickScrolling()
566+
{
567+
isRightClickScrolling = false;
568+
rightClickScrollInitPos = new Point(-1, -1);
569+
}
570+
560571
private MapTile CalculateBestTileUnderCursor()
561572
{
562573
Point2D cursorMapPoint = GetCursorMapPoint();
@@ -612,6 +623,10 @@ public override void Update(GameTime gameTime)
612623
}
613624
}
614625
}
626+
else if (isRightClickScrolling)
627+
{
628+
StopRightClickScrolling();
629+
}
615630

616631
if (leftPressedDownOnControl && !Cursor.LeftDown)
617632
leftPressedDownOnControl = false;

src/TSMapEditor/UI/TileInfoDisplay.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public TileInfoDisplay(WindowManager windowManager, Map map, TheaterGraphics the
2121
this.map = map;
2222
this.theaterGraphics = theaterGraphics;
2323
this.editorState = editorState;
24+
InputEnabled = false;
2425
}
2526

2627
private readonly Map map;

0 commit comments

Comments
 (0)