AI: Add in-game galaxy map as MapEditor canvas background
This commit is contained in:
@@ -36,6 +36,21 @@ public partial class MapEditorPage : ContentPage
|
||||
MapView.Drawable = _drawable;
|
||||
MapView.SizeChanged += OnMapViewSizeChanged;
|
||||
TryAutoLoad();
|
||||
LoadGalaxyMapAsync();
|
||||
}
|
||||
|
||||
// ----- galaxy map background -----
|
||||
|
||||
private async void LoadGalaxyMapAsync()
|
||||
{
|
||||
_drawable.BackgroundImage = await MapBackground.LoadAsync();
|
||||
MapView.Invalidate();
|
||||
}
|
||||
|
||||
private void OnBackgroundToggled(object? sender, CheckedChangedEventArgs e)
|
||||
{
|
||||
_drawable.ShowBackground = e.Value;
|
||||
MapView.Invalidate();
|
||||
}
|
||||
|
||||
// ----- view transform -----
|
||||
|
||||
Reference in New Issue
Block a user