Skip to content

Commit

Permalink
Updated to version 1.0.0.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
trigger-segfault committed Jul 13, 2016
1 parent 5cb98b5 commit 2e70fe1
Show file tree
Hide file tree
Showing 37 changed files with 493 additions and 77 deletions.
Binary file modified PokemonManager.v11.suo
Binary file not shown.
4 changes: 2 additions & 2 deletions PokemonManager/Items/MailBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public void Reset() {
listViewItems.Clear();

Mail defaultMail = new Mail();
defaultMail.TrainerName = "TRIGGER";
defaultMail.SetTrainerIDs(60000, 0);
defaultMail.TrainerName = "Trigger";
defaultMail.SetTrainerIDs(45465, 28557);
defaultMail.MailItemID = 130;
defaultMail.OriginalHolderDexID = 197;

Expand Down
25 changes: 25 additions & 0 deletions PokemonManager/PokeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Xml;

namespace PokemonManager {
Expand Down Expand Up @@ -2315,6 +2317,15 @@ public static bool CanSwitchPokemon(IPokemon pokemon) {
public static bool CanSwitchShadowPokemon(IPokemon pokemon) {
if (IsHoldingPokemon) {
bool needsNewLocation = pokemon.IsShadowPokemon && pokemon.GameSave != holdPokemon.Container.GameSave;
if (holdPokemon.Container.GameSave.GameType == GameTypes.XD) {
if (pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Daycare)
needsNewLocation = true;
else if (pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Purifier && holdPokemon.Index > 0)
needsNewLocation = true;
else if (!pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Purifier && holdPokemon.Index == 0)
needsNewLocation = true;
}

for (int i = 0; i < pokemon.PokePC.NumBoxes && needsNewLocation; i++) {
for (int j = 0; j < 30 && needsNewLocation; j++) {
if (pokemon.PokePC[i][j] == null) {
Expand All @@ -2330,6 +2341,8 @@ public static bool CanSwitchShadowPokemon(IPokemon pokemon) {
public static bool CanSwitchEgg(IPokemon pokemon) {
if (IsHoldingPokemon) {
bool needsNewLocation = pokemon.IsEgg && (holdPokemon.Container.GameType == GameTypes.Colosseum || holdPokemon.Container.GameType == GameTypes.XD);
if (pokemon.IsEgg && holdPokemon.Container.Type == ContainerTypes.Daycare)
needsNewLocation = true;
for (int i = 0; i < pokemon.PokePC.NumBoxes && needsNewLocation; i++) {
for (int j = 0; j < 30 && needsNewLocation; j++) {
if (pokemon.PokePC[i][j] == null) {
Expand Down Expand Up @@ -2365,6 +2378,16 @@ public static void SwitchPokemon(IPokemon pokemon) {
// Try to make the pokemon drop in the current game. It's only required for shadow Pokemon though.
bool needsNewLocation = (pokemon.IsShadowPokemon && pokemon.GameSave != holdPokemon.Container.GameSave) ||
(pokemon.IsEgg && (holdPokemon.Container.GameType == GameTypes.Colosseum || holdPokemon.Container.GameType == GameTypes.XD));
if (holdPokemon.Container.GameSave.GameType == GameTypes.XD) {
if (pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Daycare)
needsNewLocation = true;
else if (pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Purifier && holdPokemon.Index > 0)
needsNewLocation = true;
else if (!pokemon.IsShadowPokemon && holdPokemon.Container.Type == ContainerTypes.Purifier && holdPokemon.Index == 0)
needsNewLocation = true;
}
if (pokemon.IsEgg && holdPokemon.Container.Type == ContainerTypes.Daycare)
needsNewLocation = true;
for (int i = 0; i < pokemon.PokePC.NumBoxes && needsNewLocation; i++) {
for (int j = 0; j < 30 && needsNewLocation; j++) {
if (pokemon.PokePC[i][j] == null) {
Expand Down Expand Up @@ -2400,6 +2423,8 @@ public static void DropPokemon() {
holdPokemon.Pokemon.IsMoving = false;
if (holdPokemon.Container.Type == ContainerTypes.Party)
((IPokeParty)holdPokemon.Container).AddPokemon(holdPokemon.Pokemon);
else if (holdPokemon.Container.Type == ContainerTypes.Daycare && holdPokemon.Index < 2)
((IDaycare)holdPokemon.Container).AddPokemon(holdPokemon.Pokemon);
else if (holdPokemon.Container.Type == ContainerTypes.Purifier && holdPokemon.Index > 0)
((XDPurificationChamber)holdPokemon.Container).AddPokemon(holdPokemon.Pokemon);
else
Expand Down
Binary file modified PokemonManager/PokemonDatabase.db
Binary file not shown.
1 change: 1 addition & 0 deletions PokemonManager/PokemonManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,7 @@
<Content Include="Resources\Audio\Evolution.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Resource Include="Resources\UI\Pokemon\BulbapediaIcon.png" />
<Resource Include="Resources\UI\Pokemon\PurifierWindow.png" />
<Resource Include="Resources\Splash\SplashVoltorb.png" />
<Resource Include="Resources\Splash\SplashUrsaring.png" />
Expand Down
2 changes: 2 additions & 0 deletions PokemonManager/PokemonStructures/BoxPokemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public BitmapSource Sprite {
get {
if (IsEgg)
return PokemonDatabase.GetPokemonImageFromDexID(387, false);
if (DexID == 327)
return PokemonDatabase.GetSpindaSprite(Personality, IsShiny);
return PokemonDatabase.GetPokemonImageFromDexID(DexID, IsShiny, FormID);
}
}
Expand Down
13 changes: 13 additions & 0 deletions PokemonManager/PokemonStructures/ColosseumDaycare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ public IPokemon this[int index] {
throw new ArgumentOutOfRangeException("Index outside of bounds for Daycare", new Exception());
}
}
public void AddPokemon(IPokemon pokemon) {
pokePC.GameSave.IsChanged = true;
IPokemon pkm = (pokemon != null ? (pokemon is ColosseumPokemon ? pokemon : pokemon.CreateColosseumPokemon(((GCGameSave)GameSave).CurrentRegion)): null);
pkm.GameType = GameType;
pkm.PokeContainer = this;
if (pokePC.GameSave != null)
pokePC.GameSave.OwnPokemon(pkm);
depositedPokemon = pkm as ColosseumPokemon;
depositedPokemon = pkm as ColosseumPokemon;
DaycareStatus = 1;
InitialLevel = 0;
InitialPurification = 0;
}
public int IndexOf(IPokemon pokemon) {
if (pokemon == depositedPokemon)
return 0;
Expand Down
2 changes: 2 additions & 0 deletions PokemonManager/PokemonStructures/ColosseumPokemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public BitmapSource Sprite {
get {
if (IsEgg)
return PokemonDatabase.GetPokemonImageFromDexID(387, false);
if (DexID == 327)
return PokemonDatabase.GetSpindaSprite(Personality, IsShiny);
return PokemonDatabase.GetPokemonImageFromDexID(DexID, IsShiny, FormID);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override void GenerateReward(IGameSave gameSave) {
pkm.DexID = DexID;
pkm.Personality = (Personality.HasValue ? Personality.Value : (uint)random.Next());
pkm.Experience = PokemonDatabase.GetExperienceFromLevel(pokemonData.ExperienceGroup, (IsEgg ? (byte)5 : Level));
pkm.IsSecondAbility2 = (IsSecondAbility.HasValue ? IsSecondAbility.Value : (pokemonData.HasTwoAbilities && random.Next(2) == 1)); // TODO: TESTING
pkm.IsSecondAbility2 = (IsSecondAbility.HasValue ? IsSecondAbility.Value : (!pokemonData.CanOnlyHaveFirstAbility && random.Next(2) == 1));
pkm.Nickname = (Nickname != null ? Nickname : pokemonData.Name.ToUpper());
pkm.BallCaughtID = 4;
pkm.MetLocationID = 255;
Expand Down
16 changes: 16 additions & 0 deletions PokemonManager/PokemonStructures/GBADaycare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,22 @@ public IPokemon this[int index] {
}
}
}
public void AddPokemon(IPokemon pokemon) {
pokePC.GameSave.IsChanged = true;
IPokemon pkm = (pokemon != null ? (pokemon is GBAPokemon ? pokemon : pokemon.CreateGBAPokemon(GameType)): null);
int index = 0;
for (index = 0; index < 3; index++) {
if (originalPokemon[index] == null)
break;
}
pkm.GameType = GameType;
pkm.PokeContainer = this;
if (pokePC.GameSave != null)
pokePC.GameSave.SetPokemonOwned(pkm.DexID, true);
finalPokemon[index] = pkm as GBAPokemon;
originalPokemon[index] = pkm as GBAPokemon;
SetGainedExperience(index, 0);
}
public int IndexOf(IPokemon pokemon) {
for (int i = 0; i < finalPokemon.Length; i++) {
if (finalPokemon[i] == pokemon)
Expand Down
5 changes: 3 additions & 2 deletions PokemonManager/PokemonStructures/GBAPokemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ public GBAPokemon(byte[] data, bool decrypted = false) {
else
OpenEncryptedData(data);

// A pretty old bug, we don't really need this anymore.
// Fix Colosseum Game Origin being incorrect. (Support for users of previous versions)
if ((byte)GameOrigin == 11)
GameOrigin = GameOrigins.ColosseumXD;
//if ((byte)GameOrigin == 11)
// GameOrigin = GameOrigins.ColosseumXD;
}

#region Basic Info
Expand Down
1 change: 1 addition & 0 deletions PokemonManager/PokemonStructures/IDaycare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ namespace PokemonManager.PokemonStructures {
public interface IDaycare : IPokeContainer {

uint GetWithdrawCost(int index);
void AddPokemon(IPokemon pokemon);
}
}
6 changes: 5 additions & 1 deletion PokemonManager/PokemonStructures/PokemonData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public PokemonData(DataRow row) {
this.type2 = (row["Type2"] as string == null ? this.type1 : GetPokemonTypeFromString(row["Type2"] as string));

this.ability1ID = PokemonDatabase.GetAbilityIDFromString(row["Ability1"] as string);
this.ability2ID = (row["Ability2"] as string == null ? this.ability1ID : PokemonDatabase.GetAbilityIDFromString(row["Ability2"] as string));
this.ability2ID = (row["Ability2"] as string == null ? (byte)0 : PokemonDatabase.GetAbilityIDFromString(row["Ability2"] as string));
//this.ability2ID = (row["Ability2"] as string == null ? this.ability1ID : PokemonDatabase.GetAbilityIDFromString(row["Ability2"] as string));

this.eggGroup1 = GetEggGroupFromString(row["EggGroup1"] as string);
this.eggGroup2 = GetEggGroupFromString(row["EggGroup2"] as string);
Expand Down Expand Up @@ -132,6 +133,9 @@ public byte Ability2ID {
public bool HasTwoAbilities {
get { return ability1ID != ability2ID; }
}
public bool CanOnlyHaveFirstAbility {
get { return ability2ID == 0; }
}
public EggGroups EggGroup1 {
get { return eggGroup1; }
}
Expand Down
13 changes: 13 additions & 0 deletions PokemonManager/PokemonStructures/XDDaycare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ public IPokemon this[int index] {
throw new ArgumentOutOfRangeException("Index outside of bounds for Daycare", new Exception());
}
}
public void AddPokemon(IPokemon pokemon) {
pokePC.GameSave.IsChanged = true;
IPokemon pkm = (pokemon != null ? (pokemon is XDPokemon ? pokemon : pokemon.CreateXDPokemon(((GCGameSave)GameSave).CurrentRegion)): null);
pkm.GameType = GameType;
pkm.PokeContainer = this;
if (pokePC.GameSave != null)
pokePC.GameSave.OwnPokemon(pkm);
depositedPokemon = pkm as XDPokemon;
depositedPokemon = pkm as XDPokemon;
DaycareStatus = 1;
InitialLevel = 0;
InitialPurification = 0;
}
public int IndexOf(IPokemon pokemon) {
if (pokemon == depositedPokemon)
return 0;
Expand Down
2 changes: 2 additions & 0 deletions PokemonManager/PokemonStructures/XDPokemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ public BitmapSource Sprite {
return ResourceDatabase.GetImageFromName("XD001FrontSprite");
if (IsEgg)
return PokemonDatabase.GetPokemonImageFromDexID(387, false);
if (DexID == 327)
return PokemonDatabase.GetSpindaSprite(Personality, IsShiny);
return PokemonDatabase.GetPokemonImageFromDexID(DexID, IsShiny, FormID);
}
}
Expand Down
4 changes: 2 additions & 2 deletions PokemonManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.5.5")]
[assembly: AssemblyFileVersion("1.4.5.5")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: GuidAttribute("d527114e-3888-417f-807f-e08fef41029c")]
[assembly: NeutralResourcesLanguageAttribute("en")]
10 changes: 10 additions & 0 deletions PokemonManager/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions PokemonManager/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,7 @@
<data name="YoungsterMale" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Trainers\YoungsterMale.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BulbapediaIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\UI\Pokemon\BulbapediaIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions PokemonManager/Windows/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@
</Hyperlink>
</Label>
<Label HorizontalAlignment="Left" Margin="116,299,0,0" VerticalAlignment="Top" FontWeight="Bold">
<Hyperlink NavigateUri="https://github.com/trigger-death/TriggersPC" RequestNavigate="OnRequestNavigate">
<Run Text="GitHub"/>
</Hyperlink>
<TextBlock Cursor="Arrow" TextWrapping="WrapWithOverflow">
<Hyperlink NavigateUri="https://github.com/trigger-death/TriggersPC" RequestNavigate="OnRequestNavigate">
<Run Text="GitHub"/>
</Hyperlink>
<Run Text="("/>
<Hyperlink NavigateUri="https://github.com/trigger-death/TriggersPC/wiki" RequestNavigate="OnRequestNavigate">
<Run Text="Wiki"/>
</Hyperlink>
<Run Text=")"/>
</TextBlock>
</Label>
<Rectangle Margin="10,123,10,0" Stroke="Black" RadiusY="2" RadiusX="2" Fill="#FFF4F4F5" Height="114" VerticalAlignment="Top"/>
<Label Content="Trigger's PC" HorizontalAlignment="Left" Margin="15,128,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
Expand Down
2 changes: 1 addition & 1 deletion PokemonManager/Windows/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public AboutWindow() {
InitializeComponent();

DateTime buildDate = GetLinkerTime(Assembly.GetExecutingAssembly());
this.labelVersion.Content = Assembly.GetExecutingAssembly().GetName().Version.ToString() + " Beta";
this.labelVersion.Content = Assembly.GetExecutingAssembly().GetName().Version.ToString() + " Release";
this.labelBuildDate.Content = buildDate.ToShortDateString() + " (" + buildDate.ToShortTimeString() + ")";
}

Expand Down
20 changes: 15 additions & 5 deletions PokemonManager/Windows/ControlsWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Window x:Class="PokemonManager.Windows.ControlsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Trigger's PC Controls" Height="424" Width="308" ResizeMode="NoResize" Background="#FF286496" Icon="/TriggersPC;component/Resources/Icons/IconControls.png" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
Title="Trigger's PC Controls" Height="553" Width="308" ResizeMode="NoResize" Background="#FF286496" Icon="/TriggersPC;component/Resources/Icons/IconControls.png" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
<Grid>

<Rectangle Fill="#FFF4F4F5" Margin="0" StrokeThickness="0" VerticalAlignment="Bottom" Height="41" RenderTransformOrigin="0.5,0.5">
Expand All @@ -27,7 +27,7 @@
</Grid>

<Label Content="Pokémon Boxes" HorizontalAlignment="Left" Margin="10,93,0,0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold"/>
<Grid Height="156" Margin="10,119,10,0" VerticalAlignment="Top">
<Grid Height="287" Margin="10,119,10,0" VerticalAlignment="Top">
<Rectangle Margin="0" Stroke="Black" RadiusY="2" RadiusX="2" Fill="#FFF4F4F5"/>
<Label Content="R/Middle Click" HorizontalAlignment="Left" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Toggle Move Mode" HorizontalAlignment="Right" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right"/>
Expand All @@ -41,14 +41,24 @@
<Label Content="Left Click Box Name" HorizontalAlignment="Left" Margin="0,104,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="T/Hold LShift" HorizontalAlignment="Left" Margin="0,26,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Toggle Summary Mode" HorizontalAlignment="Right" Margin="0,26,0,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right"/>
<Label Content="Z" HorizontalAlignment="Left" Margin="0,156,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Unselect All" HorizontalAlignment="Right" Margin="0,156,0,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right" Width="153"/>
<Label Content="X" HorizontalAlignment="Left" Margin="0,182,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Select All" HorizontalAlignment="Right" Margin="0,182,0,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right" Width="153"/>
<Label Content="C" HorizontalAlignment="Left" Margin="0,208,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Pickup All" HorizontalAlignment="Right" Margin="0,208,0,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right" Width="153"/>
<Label Content="V" HorizontalAlignment="Left" Margin="1,234,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Place All in First Slot" HorizontalAlignment="Right" Margin="0,234,0,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right" Width="153"/>
<Label Content="Ctrl+Click Box Name/Ctrl+X" HorizontalAlignment="Left" Margin="0,260,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Select All+" HorizontalAlignment="Right" Margin="0,260,2,0" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right" Width="153"/>
</Grid>
<Label Content="Inventory" HorizontalAlignment="Left" Margin="10,281,0,0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold"/>
<Button Content="Close" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" FontSize="11" Foreground="White" FontWeight="Bold" Background="#FF007ACC" Focusable="False" IsTabStop="False" IsCancel="True"/>
<Grid Height="26" Margin="10,307,10,0" VerticalAlignment="Top">
<Label Content="Inventory" HorizontalAlignment="Left" Margin="10,411,0,0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold"/>
<Grid Height="26" Margin="10,437,10,0" VerticalAlignment="Top">
<Rectangle Margin="0" Stroke="Black" RadiusY="2" RadiusX="2" Fill="#FFF4F4F5"/>
<Label Content="Ctrl/Shift+Click" HorizontalAlignment="Left" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Select Items" HorizontalAlignment="Right" VerticalAlignment="Top" FontWeight="Bold" HorizontalContentAlignment="Right"/>
</Grid>
<Button Content="Close" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" FontSize="11" Foreground="White" FontWeight="Bold" Background="#FF007ACC" Focusable="False" IsTabStop="False" IsCancel="True"/>

</Grid>
</Window>
6 changes: 4 additions & 2 deletions PokemonManager/Windows/DecorationViewerTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ public void GotoDecoration(byte decorationID) {
double offset = scrollHeight * index / listViewItems.Items.Count;
vsp.SetVerticalOffset(offset);*/

listViewItems.ScrollIntoView(listViewItems.SelectedItem);
((Control)listViewItems.SelectedItem).Focus();
if (index != -1) {
listViewItems.ScrollIntoView(listViewItems.SelectedItem);
((Control)listViewItems.SelectedItem).Focus();
}
}

public void LoadPocket(DecorationPocket pocket) {
Expand Down
6 changes: 4 additions & 2 deletions PokemonManager/Windows/ItemViewerTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ public void GotoItem(ushort itemID) {
double offset = scrollHeight * index / listViewItems.Items.Count;
vsp.SetVerticalOffset(offset);*/

listViewItems.ScrollIntoView(listViewItems.SelectedItem);
((Control)listViewItems.SelectedItem).Focus();
if (index != -1) {
listViewItems.ScrollIntoView(listViewItems.SelectedItem);
((Control)listViewItems.SelectedItem).Focus();
}
}

public void LoadPocket(ItemPocket pocket) {
Expand Down
Loading

0 comments on commit 2e70fe1

Please sign in to comment.