* 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:
parent
a17ddfab0a
commit
2c5c0909e0
@ -17,6 +17,9 @@
|
|||||||
|
|
||||||
Option Explicit
|
Option Explicit
|
||||||
|
|
||||||
|
' Remembers the selected Pokémon for the next run.
|
||||||
|
Global sSelected As String
|
||||||
|
|
||||||
' The parameters to find the individual values.
|
' The parameters to find the individual values.
|
||||||
Type aFindIVParam
|
Type aFindIVParam
|
||||||
sPokemonId As String
|
sPokemonId As String
|
||||||
@ -68,6 +71,9 @@ Function fnAskParam As aFindIVParam
|
|||||||
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
|
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
|
||||||
"ImageURL", fnGetImageUrl ("Unknown"))
|
"ImageURL", fnGetImageUrl ("Unknown"))
|
||||||
|
|
||||||
|
' Remembers the previously-selected Pokémon.
|
||||||
|
oDialog.getControl ("lstPokemon").selectItem (sSelected, True)
|
||||||
|
|
||||||
If oDialog.execute = 0 Then
|
If oDialog.execute = 0 Then
|
||||||
aQuery.bIsCancelled = True
|
aQuery.bIsCancelled = True
|
||||||
fnAskParam = aQuery
|
fnAskParam = aQuery
|
||||||
@ -168,8 +174,15 @@ Sub subLstPokemonSelected (oEvent As object)
|
|||||||
|
|
||||||
oDialog = oEvent.Source.getContext
|
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
|
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
|
subReadBaseStats
|
||||||
sImageId = "Pokemon" & maBaseStats (nSelected).sPokemonId
|
sImageId = "Pokemon" & maBaseStats (nSelected).sPokemonId
|
||||||
oImageModel = oDialog.getControl ("imgPokemon").getModel
|
oImageModel = oDialog.getControl ("imgPokemon").getModel
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<description xmlns="http://openoffice.org/extensions/update/2006"
|
<description xmlns="http://openoffice.org/extensions/update/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="tw.idv.imacat.office.pokemongoiv" />
|
<identifier value="tw.idv.imacat.office.pokemongoiv" />
|
||||||
<version value="0.8.2" />
|
<version value="0.8.3" />
|
||||||
<update-download>
|
<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>
|
</update-download>
|
||||||
</description>
|
</description>
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
Option Explicit
|
Option Explicit
|
||||||
|
|
||||||
|
' Remembers the selected Pokémon for the next run.
|
||||||
|
Global sSelected As String
|
||||||
|
|
||||||
' The parameters to find the individual values.
|
' The parameters to find the individual values.
|
||||||
Type aFindIVParam
|
Type aFindIVParam
|
||||||
sPokemonId As String
|
sPokemonId As String
|
||||||
@ -70,6 +73,9 @@ Function fnAskParam As aFindIVParam
|
|||||||
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
|
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
|
||||||
"ImageURL", fnGetImageUrl ("Unknown"))
|
"ImageURL", fnGetImageUrl ("Unknown"))
|
||||||
|
|
||||||
|
' Remembers the previously-selected Pokémon.
|
||||||
|
oDialog.getControl ("lstPokemon").selectItem (sSelected, True)
|
||||||
|
|
||||||
If oDialog.execute = 0 Then
|
If oDialog.execute = 0 Then
|
||||||
aQuery.bIsCancelled = True
|
aQuery.bIsCancelled = True
|
||||||
fnAskParam = aQuery
|
fnAskParam = aQuery
|
||||||
@ -170,8 +176,15 @@ Sub subLstPokemonSelected (oEvent As object)
|
|||||||
|
|
||||||
oDialog = oEvent.Source.getContext
|
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
|
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
|
subReadBaseStats
|
||||||
sImageId = "Pokemon" & maBaseStats (nSelected).sPokemonId
|
sImageId = "Pokemon" & maBaseStats (nSelected).sPokemonId
|
||||||
oImageModel = oDialog.getControl ("imgPokemon").getModel
|
oImageModel = oDialog.getControl ("imgPokemon").getModel
|
||||||
|
Loading…
Reference in New Issue
Block a user