diff --git a/PokemonGoIV/0Main.vb b/PokemonGoIV/0Main.vb index 381b677..e5c4c55 100644 --- a/PokemonGoIV/0Main.vb +++ b/PokemonGoIV/0Main.vb @@ -207,29 +207,15 @@ End Sub ' subLstPokemonSelected: When the Pokémon is selected. Sub subLstPokemonSelected (oEvent As object) - Dim oDialog As Object, sPokemon As String + Dim oDialog As Object, nSelected As Integer Dim oImageModel As Object, sImageId As String oDialog = oEvent.Source.getContext ' Updates the Pokémon image. - sPokemon = oDialog.getControl ("lstPokemon").getSelectedItem - sImageId = "" - If sPokemon = "Farfetch'd" Then - sImageId = "PokemonFarfetchd" - End If - If sPokemon = "Nidoran♀" Then - sImageId = "PokemonNidoranFemale" - End If - If sPokemon = "Nidoran♂" Then - sImageId = "PokemonNidoranMale" - End If - If sPokemon = "Mr. Mime" Then - sImageId = "PokemonMrMime" - End If - If sImageId = "" Then - sImageId = "Pokemon" & sPokemon - End If + nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos + subReadBaseStats + sImageId = "Pokemon" & maBaseStats (nSelected).sPokemon oImageModel = oDialog.getControl ("imgPokemon").getModel oImageModel.setPropertyValue ("ImageURL", _ fnGetImageUrl (sImageId)) diff --git a/oxt/PokemonGoIV/0Main.xba b/oxt/PokemonGoIV/0Main.xba index bfe75d6..93f7a6c 100644 --- a/oxt/PokemonGoIV/0Main.xba +++ b/oxt/PokemonGoIV/0Main.xba @@ -68,9 +68,6 @@ Sub subMain Dim aBaseStats As New aStats, maIVs As Variant, nI As Integer Dim aQuery As New aFindIVParam - ' TODO: To be removed. - BasicLibraries.loadLibrary "XrayTool" - aQuery = fnAskParam If aQuery.bIsCancelled Then Exit Sub @@ -212,29 +209,15 @@ End Sub ' subLstPokemonSelected: When the Pokémon is selected. Sub subLstPokemonSelected (oEvent As object) - Dim oDialog As Object, sPokemon As String + Dim oDialog As Object, nSelected As Integer Dim oImageModel As Object, sImageId As String oDialog = oEvent.Source.getContext ' Updates the Pokémon image. - sPokemon = oDialog.getControl ("lstPokemon").getSelectedItem - sImageId = "" - If sPokemon = "Farfetch'd" Then - sImageId = "PokemonFarfetchd" - End If - If sPokemon = "Nidoran♀" Then - sImageId = "PokemonNidoranFemale" - End If - If sPokemon = "Nidoran♂" Then - sImageId = "PokemonNidoranMale" - End If - If sPokemon = "Mr. Mime" Then - sImageId = "PokemonMrMime" - End If - If sImageId = "" Then - sImageId = "Pokemon" & sPokemon - End If + nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos + subReadBaseStats + sImageId = "Pokemon" & maBaseStats (nSelected).sPokemon oImageModel = oDialog.getControl ("imgPokemon").getModel oImageModel.setPropertyValue ("ImageURL", _ fnGetImageUrl (sImageId))