* Updated the dialog to remember the last selected Pokémon. This helps when checking with a bunch of Pokémons of the same type. Selecting Pokémon was a challenge with Chinese where keyboard finding does not work with the drop-down menu.

* Advanced to version 0.8.3.
This commit is contained in:
依瑪貓 2017-11-29 21:32:29 +08:00
parent a17ddfab0a
commit 2c5c0909e0
4 changed files with 31 additions and 5 deletions

View File

@ -17,6 +17,9 @@
Option Explicit
' Remembers the selected Pokémon for the next run.
Global sSelected As String
' The parameters to find the individual values.
Type aFindIVParam
sPokemonId As String
@ -68,6 +71,9 @@ Function fnAskParam As aFindIVParam
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
"ImageURL", fnGetImageUrl ("Unknown"))
' Remembers the previously-selected Pokémon.
oDialog.getControl ("lstPokemon").selectItem (sSelected, True)
If oDialog.execute = 0 Then
aQuery.bIsCancelled = True
fnAskParam = aQuery
@ -168,8 +174,15 @@ Sub subLstPokemonSelected (oEvent As object)
oDialog = oEvent.Source.getContext
' Updates the Pokémon image.
' Checks which Pokémon was selected.
sSelected = oDialog.getControl ("lstPokemon").getSelectedItem
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
' This happens at the beginning where sSelected is "".
If nSelected = -1 Then
Exit Sub
End If
' Updates the Pokémon image.
subReadBaseStats
sImageId = "Pokemon" & maBaseStats (nSelected).sPokemonId
oImageModel = oDialog.getControl ("imgPokemon").getModel

View File

@ -1 +1 @@
0.8.2
0.8.3

View File

@ -2,8 +2,8 @@
<description xmlns="http://openoffice.org/extensions/update/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="tw.idv.imacat.office.pokemongoiv" />
<version value="0.8.2" />
<version value="0.8.3" />
<update-download>
<src xlink:href="https://sourceforge.net/projects/aoo-extensions/files/18585/30/pokemongoiv.oxt" />
<src xlink:href="https://sourceforge.net/projects/aoo-extensions/files/18585/31/pokemongoiv.oxt" />
</update-download>
</description>

View File

@ -19,6 +19,9 @@
Option Explicit
&apos; Remembers the selected Pokémon for the next run.
Global sSelected As String
&apos; The parameters to find the individual values.
Type aFindIVParam
sPokemonId As String
@ -70,6 +73,9 @@ Function fnAskParam As aFindIVParam
oDialog.getControl (&quot;imgTeamLogo&quot;).getModel.setPropertyValue ( _
&quot;ImageURL&quot;, fnGetImageUrl (&quot;Unknown&quot;))
&apos; Remembers the previously-selected Pokémon.
oDialog.getControl (&quot;lstPokemon&quot;).selectItem (sSelected, True)
If oDialog.execute = 0 Then
aQuery.bIsCancelled = True
fnAskParam = aQuery
@ -170,8 +176,15 @@ Sub subLstPokemonSelected (oEvent As object)
oDialog = oEvent.Source.getContext
&apos; Updates the Pokémon image.
&apos; Checks which Pokémon was selected.
sSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItem
nSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItemPos
&apos; This happens at the beginning where sSelected is &quot;&quot;.
If nSelected = -1 Then
Exit Sub
End If
&apos; Updates the Pokémon image.
subReadBaseStats
sImageId = &quot;Pokemon&quot; &amp; maBaseStats (nSelected).sPokemonId
oImageModel = oDialog.getControl (&quot;imgPokemon&quot;).getModel