Fix tilemap asset loading
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"
|
xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"
|
||||||
Title="Reactor Maintenance">
|
Title="Reactor Maintenance">
|
||||||
|
|
||||||
<Grid Background="#16191D">
|
<Grid Background="#16191D">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ public sealed partial class MainWindow
|
|||||||
|
|
||||||
private async Task LoadTilemapAsync(CanvasControl sender)
|
private async Task LoadTilemapAsync(CanvasControl sender)
|
||||||
{
|
{
|
||||||
m_TerrainTilemap = await CanvasBitmap.LoadAsync(sender, new Uri("ms-appx:///Images/tilemap.png"));
|
var tilemapPath = Path.Combine(AppContext.BaseDirectory, "Images", "tilemap.png");
|
||||||
|
m_TerrainTilemap = await CanvasBitmap.LoadAsync(sender, tilemapPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToolPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void ToolPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Images\tilemap.png" CopyToOutputDirectory="PreserveNewest" />
|
<Content Update="Images\tilemap.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user