From 01a5eb178c13cc9b6d10bbe15053a01a1584eea3 Mon Sep 17 00:00:00 2001 From: STApps Date: Tue, 2 Aug 2016 12:35:10 +0200 Subject: [PATCH] Added Pokemon anchor binding to prevent them from floating on map --- PokemonGo-UWP/Entities/MapPokemonWrapper.cs | 6 ++++++ PokemonGo-UWP/Views/GameMapPage.xaml | 2 +- PokemonGo-UWP/Views/GameMapPage.xaml.cs | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PokemonGo-UWP/Entities/MapPokemonWrapper.cs b/PokemonGo-UWP/Entities/MapPokemonWrapper.cs index 41d39a8e9..f0b9aa83a 100644 --- a/PokemonGo-UWP/Entities/MapPokemonWrapper.cs +++ b/PokemonGo-UWP/Entities/MapPokemonWrapper.cs @@ -1,4 +1,5 @@ using Windows.Devices.Geolocation; +using Windows.Foundation; using AllEnum; using Newtonsoft.Json; using PokemonGo.RocketAPI.GeneratedCode; @@ -20,6 +21,11 @@ public MapPokemonWrapper(MapPokemon mapPokemon) new Geopoint(new BasicGeoposition {Latitude = _mapPokemon.Latitude, Longitude = _mapPokemon.Longitude}); } + /// + /// HACK - this should fix Pokestop floating on map + /// + public Point Anchor => new Point(0.5, 1); + private DelegateCommand _tryCatchPokemon; /// diff --git a/PokemonGo-UWP/Views/GameMapPage.xaml b/PokemonGo-UWP/Views/GameMapPage.xaml index 98b188325..e7221b8ed 100644 --- a/PokemonGo-UWP/Views/GameMapPage.xaml +++ b/PokemonGo-UWP/Views/GameMapPage.xaml @@ -136,7 +136,7 @@ diff --git a/PokemonGo-UWP/Views/GameMapPage.xaml.cs b/PokemonGo-UWP/Views/GameMapPage.xaml.cs index 3ff1fc3bb..9bcdb230e 100644 --- a/PokemonGo-UWP/Views/GameMapPage.xaml.cs +++ b/PokemonGo-UWP/Views/GameMapPage.xaml.cs @@ -29,6 +29,10 @@ public sealed partial class GameMapPage : Page public GameMapPage() { InitializeComponent(); + Loaded += (s, e) => + { + NearbyGridTranslateTransform.Y = ActualHeight*3/2; + }; //WindowWrapper.Current().Window.VisibilityChanged += (s, e) => //{ // if (App.ViewModelLocator.GameManagerViewModel != null)