Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Commit

Permalink
Added Pokemon anchor binding to prevent them from floating on map
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-Apps committed Aug 2, 2016
1 parent e15120e commit 01a5eb1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions PokemonGo-UWP/Entities/MapPokemonWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Windows.Devices.Geolocation;
using Windows.Foundation;
using AllEnum;
using Newtonsoft.Json;
using PokemonGo.RocketAPI.GeneratedCode;
Expand All @@ -20,6 +21,11 @@ public MapPokemonWrapper(MapPokemon mapPokemon)
new Geopoint(new BasicGeoposition {Latitude = _mapPokemon.Latitude, Longitude = _mapPokemon.Longitude});
}

/// <summary>
/// HACK - this should fix Pokestop floating on map
/// </summary>
public Point Anchor => new Point(0.5, 1);

private DelegateCommand _tryCatchPokemon;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion PokemonGo-UWP/Views/GameMapPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<Image
Source="{Binding PokemonId, Converter={StaticResource PokemonIdToPokemonSpriteConverter}}"
maps:MapControl.Location="{Binding Geoposition}"
maps:MapControl.NormalizedAnchorPoint="0,1"
maps:MapControl.NormalizedAnchorPoint="{Binding Anchor}"
Stretch="Uniform"
Height="48"
Width="48" />
Expand Down
4 changes: 4 additions & 0 deletions PokemonGo-UWP/Views/GameMapPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01a5eb1

Please sign in to comment.