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

[WIP] Basic Gym support (without fighting) #1715

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions PokemonGo-UWP/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@
<utils:AchievementDescriptionTranslationConverter x:Key="AchievementDescriptionTranslationConverter" />
<utils:WidthConverter x:Key="WidthConverter" />
<utils:IntToBooleanConverter x:Key="IntToBooleanConverter" />
<utils:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<utils:PokemonLastHoursVisibiltyConverter x:Key="PokemonLastHoursVisibiltyConverter" />
<utils:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<utils:NegateBooleanToVisibilityConverter x:Key="NegateBooleanToVisibilityConverter"/>
<utils:AttackTypeTrainToVisibilityConverter x:Key="AttackTypeTrainToVisibilityConverter"/>
<utils:AttackTypeAttackToVisibilityConverter x:Key="AttackTypeAttackToVisibilityConverter"/>
<utils:PokeTypeToAsset x:Key="PokeTypeToAsset"/>
<utils:PokeTypeKingToVisibility x:Key="PokeTypeKingToVisibility"/>
<utils:PokeTypeSelectedToTeamColor x:Key="PokeTypeSelectedToTeamColor"/>
<utils:IsIncenseActiveToPlayerIconConverter x:Key="IsIncenseActiveToPlayerIconConverter" />

</ResourceDictionary>
</Application.Resources>

Expand Down
14 changes: 7 additions & 7 deletions PokemonGo-UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ private void CatchablePokemons_CollectionChanged(object sender, NotifyCollection
/// <param name="prelaunchActivated"></param>
/// <returns></returns>
public override Task OnSuspendingAsync(object s, SuspendingEventArgs e, bool prelaunchActivated)
{
{
GameClient.PokemonsInventory.CollectionChanged -= PokemonsInventory_CollectionChanged;
GameClient.CatchablePokemons.CollectionChanged -= CatchablePokemons_CollectionChanged;
NetworkInformation.NetworkStatusChanged -= NetworkInformationOnNetworkStatusChanged;
NetworkInformation.NetworkStatusChanged -= NetworkInformationOnNetworkStatusChanged;

if (SettingsService.Instance.IsBatterySaverEnabled)
_proximityHelper.EnableDisplayAutoOff(false);
Expand Down Expand Up @@ -207,7 +207,7 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)
#if DEBUG
// Init logger
Logger.SetLogger(new ConsoleLogger(LogLevel.Info));
#endif
#endif
// If we have a phone contract, hide the status bar
if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
Expand All @@ -218,7 +218,7 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)
// Enter into full screen mode
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Standard;
ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Standard;

// Forces the display to stay on while we play
//_displayRequest.RequestActive();
Expand Down Expand Up @@ -247,10 +247,10 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)

// Respond to changes in inventory and Pokemon in the immediate viscinity.
GameClient.PokemonsInventory.CollectionChanged += PokemonsInventory_CollectionChanged;
GameClient.CatchablePokemons.CollectionChanged += CatchablePokemons_CollectionChanged;
GameClient.CatchablePokemons.CollectionChanged += CatchablePokemons_CollectionChanged;

await Task.CompletedTask;
}
}

/// <summary>
///
Expand Down Expand Up @@ -351,7 +351,7 @@ private void WindowOnVisibilityChanged(object sender, VisibilityChangedEventArgs
#region Helpers

/// <summary>
///
///
/// </summary>
/// <param name="pokemonList"></param>
/// <remarks>
Expand Down
Binary file removed PokemonGo-UWP/Assets/Icons/crown.png
Binary file not shown.
Binary file added PokemonGo-UWP/Assets/Icons/indicator_crown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PokemonGo-UWP/Assets/Icons/indicator_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PokemonGo-UWP/Assets/Icons/indicator_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
168 changes: 168 additions & 0 deletions PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<UserControl
x:Class="PokemonGo_UWP.Controls.PoGoTeamSelectionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:PokemonGo_UWP.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:utils="using:PokemonGo_UWP.Utils"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<UserControl.Resources>

<!--ANIMATIONS-->

<!--Fade-->
<Storyboard x:Name="ShowMDFadeStoryboard">
<DoubleAnimation
Storyboard.TargetName="CoverGrid"
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
BeginTime="0:0:0.05"
Duration="0:0:0.1" />
<DoubleAnimation
Storyboard.TargetName="BackgroundRect"
Storyboard.TargetProperty="Opacity"
From="0"
To="0.6"
Duration="0:0:0.15" />
</Storyboard>

<Storyboard x:Name="HideMDFadeStoryboard">
<DoubleAnimation
Storyboard.TargetName="CoverGrid"
Storyboard.TargetProperty="Opacity"
From="1"
To="0"
BeginTime="0:0:0.05"
Duration="0:0:0.1" />
<DoubleAnimation
Storyboard.TargetName="BackgroundRect"
Storyboard.TargetProperty="Opacity"
From="0.6"
To="0"
Duration="0:0:0.15" />
</Storyboard>

<!--Bottom-->
<Storyboard x:Name="ShowMDBottomStoryboard">
<DoubleAnimation
Storyboard.TargetName="CoverGrid"
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
Duration="0:0:0.1" />
<DoubleAnimation
Storyboard.TargetName="BackgroundRect"
Storyboard.TargetProperty="Opacity"
From="0"
To="0.6"
Duration="0:0:0.15" />
<DoubleAnimation Storyboard.TargetName="DownwardsTranslation"
Storyboard.TargetProperty="Y"
From="{x:Bind DownwardsTranslationRange, Mode=OneWay}"
To="0"
BeginTime="0:0:0.1"
Duration="0:0:0.3">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>

<Storyboard x:Name="HideMDBottomStoryboard">
<DoubleAnimation
Storyboard.TargetName="CoverGrid"
Storyboard.TargetProperty="Opacity"
From="1"
To="0"
Duration="0:0:0.05"
BeginTime="0:0:0.25"/>
<DoubleAnimation
Storyboard.TargetName="BackgroundRect"
Storyboard.TargetProperty="Opacity"
From="0.6"
To="0"
Duration="0:0:0.15"
BeginTime="0:0:0.15"/>
<DoubleAnimation Storyboard.TargetName="DownwardsTranslation"
Storyboard.TargetProperty="Y"
From="0"
To="{x:Bind DownwardsTranslationRange, Mode=OneWay}"
Duration="0:0:0.3">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseIn" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</UserControl.Resources>

<Grid x:Name="CoverGrid"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Background="Transparent"
Opacity="1">
<Rectangle x:Name="BackgroundRect"
Fill="{StaticResource PageBackgroundGradient}"
Opacity="0"
Visibility="{x:Bind CoverBackground, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
Tapped="Background_Tapped" />
<Grid x:Name="ContentGrid"
Style="{StaticResource GridContainer}"
Background="{StaticResource LightPageBackgroundGradient}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
MaxWidth="800"
MinWidth="250"
Padding="25,25,25,0">
<Grid.RenderTransform>
<TranslateTransform Y="0" x:Name="DownwardsTranslation" />
</Grid.RenderTransform>
<StackPanel Orientation="Vertical">
<TextBlock Foreground="{StaticResource TitleTextColor}"
Margin="0,0,0,15"
Text="Pokemon Team Selection"
TextAlignment="Center"
TextWrapping="Wrap"
FontSize="17"
FontFamily="{StaticResource LatoBoldFont}"/>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical">
<Image Source="ms-appx:///Assets/Icons/ic_arena_yellow.png" Width="80" />
<Button x:Name="YellowButton"
Style="{StaticResource ButtonSubmit}"
HorizontalAlignment="Stretch"
Content="Yellow"
MinWidth="80"
Margin="0,25,0,0" />
</StackPanel>
<StackPanel Orientation="Vertical">
<Image Source="ms-appx:///Assets/Icons/ic_arena_blue.png" Width="80" />
<Button x:Name="BlueButton"
Style="{StaticResource ButtonSubmit}"
HorizontalAlignment="Stretch"
Content="Blue"
MinWidth="80"
Margin="0,25,0,0" />
</StackPanel>
<StackPanel Orientation="Vertical">
<Image Source="ms-appx:///Assets/Icons/ic_arena_red.png" Width="80" />
<Button x:Name="RedButton"
Style="{StaticResource ButtonSubmit}"
HorizontalAlignment="Stretch"
Content="Red"
MinWidth="80"
Margin="0,25,0,0" />
</StackPanel>
</StackPanel>
<Button x:Name="CancelButton"
Style="{StaticResource ButtonCancel}"
Content="Cancel"/>
</StackPanel>

</Grid>

</Grid>
</UserControl>
Loading