diff --git a/PokemonGoIV/0Main.vb b/PokemonGoIV/0Main.vb
index de8e044..258f3b3 100644
--- a/PokemonGoIV/0Main.vb
+++ b/PokemonGoIV/0Main.vb
@@ -160,419 +160,8 @@ Function fnAskParam As aFindIVParam
fnAskParam = aQuery
End Function
-' fnAskParam: Asks the users for the parameters for the Pokémon.
-Function fnAskParam0 As aFindIVParam
- Dim oDialog As Object, oDialogModel As Object
- Dim oTextModel As Object, oListModel As Object
- Dim oNumericModel As Object, oCheckBoxModel As Object
- Dim oGroupModel As Object, oRadioModel As Object
- Dim oButtonModel As Object, oListener As Object
- Dim mListItems () As String, sTemp As String
- Dim nI As Integer, nCount As Integer
- Dim bIsBestAttack As Boolean, bIsBestDefense As Boolean
- Dim bIsBestHP As Boolean
- Dim aQuery As New aFindIVParam
-
- ' Creates a dialog
- oDialogModel = CreateUnoService ( _
- "com.sun.star.awt.UnoControlDialogModel")
- oDialogModel.setPropertyValue ("PositionX", 100)
- oDialogModel.setPropertyValue ("PositionY", 100)
- oDialogModel.setPropertyValue ("Height", 185)
- oDialogModel.setPropertyValue ("Width", 220)
- oDialogModel.setPropertyValue ("Title", "Pokémon GO IV Calculator")
-
- ' Adds a text label for the Pokémon list.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 5)
- oTextModel.setPropertyValue ("PositionY", 6)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 30)
- oTextModel.setPropertyValue ("Label", "~Pokémon:")
- oDialogModel.insertByName ("txtPokemon", oTextModel)
-
- ' Adds the Pokémon list.
- subReadBaseStats
- ReDim mListItems (UBound (maBaseStats)) As String
- For nI = 0 To UBound (maBaseStats)
- mListItems (nI) = maBaseStats (nI).sPokemon
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 35)
- oListModel.setPropertyValue ("PositionY", 4)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 50)
- oListModel.setPropertyValue ("TabIndex", 0)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstPokemon", oListModel)
-
- ' Adds a text label for the CP field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 5)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 15)
- oTextModel.setPropertyValue ("Label", "~CP:")
- oDialogModel.insertByName ("txtCP", oTextModel)
-
- ' Adds the CP field.
- oNumericModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlNumericFieldModel")
- oNumericModel.setPropertyValue ("PositionX", 20)
- oNumericModel.setPropertyValue ("PositionY", 19)
- oNumericModel.setPropertyValue ("Height", 12)
- oNumericModel.setPropertyValue ("Width", 20)
- oNumericModel.setPropertyValue ("DecimalAccuracy", 0)
- oDialogModel.insertByName ("numCP", oNumericModel)
-
- ' Adds a text label for the HP field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 50)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 15)
- oTextModel.setPropertyValue ("Label", "~HP:")
- oDialogModel.insertByName ("txtHP", oTextModel)
-
- ' Adds the HP field.
- oNumericModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlNumericFieldModel")
- oNumericModel.setPropertyValue ("PositionX", 65)
- oNumericModel.setPropertyValue ("PositionY", 19)
- oNumericModel.setPropertyValue ("Height", 12)
- oNumericModel.setPropertyValue ("Width", 15)
- oNumericModel.setPropertyValue ("DecimalAccuracy", 0)
- oDialogModel.insertByName ("numHP", oNumericModel)
-
- ' Adds a text label for the star dust field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 90)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 30)
- oTextModel.setPropertyValue ("Label", "S~tar dust:")
- oDialogModel.insertByName ("txtStarDust", oTextModel)
-
- ' Adds the star dust field.
- subReadStarDust
- sTemp = " "
- ReDim mListItems () As String
- nCount = -1
- For nI = 1 To UBound (mStarDust)
- If InStr (sTemp, " " & CStr (mStarDust (nI)) & " ") = 0 Then
- nCount = nCount + 1
- ReDim Preserve mListItems (nCount) As String
- mListItems (nCount) = CStr (mStarDust (nI))
- sTemp = sTemp & CStr (mStarDust (nI)) & " "
- End If
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 120)
- oListModel.setPropertyValue ("PositionY", 19)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 30)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstStarDust", oListModel)
-
- ' Adds a text label for the player level field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 160)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 35)
- oTextModel.setPropertyValue ("Label", "Player ~level:")
- oDialogModel.insertByName ("txtPlayerLevel", oTextModel)
-
- ' Adds the player level field.
- ReDim mListItems (39) As String
- For nI = 0 To UBound (mListItems)
- mListItems (nI) = CStr (nI + 1)
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 195)
- oListModel.setPropertyValue ("PositionY", 19)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 20)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstPlayerLevel", oListModel)
-
- ' Adds the whether powered-up check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 5)
- oCheckBoxModel.setPropertyValue ("PositionY", 36)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 210)
- oCheckBoxModel.setPropertyValue ("Label", _
- "This Pokémon is ~newly-caught and was not powered-up yet.")
- oCheckBoxModel.setPropertyValue ("State", 1)
- oDialogModel.insertByName ("cbxIsNew", oCheckBoxModel)
-
- ' Adds a group for the appraisals
- oGroupModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlGroupBoxModel")
- oGroupModel.setPropertyValue ("PositionX", 5)
- oGroupModel.setPropertyValue ("PositionY", 50)
- oGroupModel.setPropertyValue ("Height", 110)
- oGroupModel.setPropertyValue ("Width", 210)
- oGroupModel.setPropertyValue ("Label", "Team Leader Apprasal")
- oDialogModel.insertByName ("grpApprasals", oGroupModel)
-
- ' Adds a text label for the team.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 10)
- oTextModel.setPropertyValue ("PositionY", 66)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 20)
- oTextModel.setPropertyValue ("Label", "Team:")
- oDialogModel.insertByName ("txtTeam", oTextModel)
-
- ' Adds the red team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 30)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 25)
- oRadioModel.setPropertyValue ("Label", "~Valor")
- oRadioModel.setPropertyValue ("TextColor", RGB (255, 255, 255))
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (255, 0, 0))
- oDialogModel.insertByName ("rdoTeamRed", oRadioModel)
-
- ' Adds the blue team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 60)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 30)
- oRadioModel.setPropertyValue ("Label", "~Mystic")
- oRadioModel.setPropertyValue ("TextColor", RGB (255, 255, 255))
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (0, 0, 255))
- oDialogModel.insertByName ("rdoTeamBlue", oRadioModel)
-
- ' Adds the yellow team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 95)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 30)
- oRadioModel.setPropertyValue ("Label", "~Instinct")
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (255, 255, 0))
- oDialogModel.insertByName ("rdoTeamYellow", oRadioModel)
-
- ' Adds the first appraisal list.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 10)
- oListModel.setPropertyValue ("PositionY", 79)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 200)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstApprasal1", oListModel)
-
- ' Adds a text label before the best stat.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 10)
- oTextModel.setPropertyValue ("PositionY", 96)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 20)
- oDialogModel.insertByName ("txtBestBefore", oTextModel)
-
- ' Adds the best stat field.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 30)
- oListModel.setPropertyValue ("PositionY", 94)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 35)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstBest", oListModel)
-
- ' Adds a text label after the best stat.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 65)
- oTextModel.setPropertyValue ("PositionY", 96)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 100)
- oDialogModel.insertByName ("txtBestAfter", oTextModel)
-
- ' Adds the second best stat check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 10)
- oCheckBoxModel.setPropertyValue ("PositionY", 111)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 200)
- oDialogModel.insertByName ("cbxBest2", oCheckBoxModel)
-
- ' Adds the third best stat check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 10)
- oCheckBoxModel.setPropertyValue ("PositionY", 126)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 200)
- oDialogModel.insertByName ("cbxBest3", oCheckBoxModel)
-
- ' Adds the second appraisal list.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 10)
- oListModel.setPropertyValue ("PositionY", 139)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 200)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstApprasal2", oListModel)
-
- ' Adds the OK button.
- oButtonModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlButtonModel")
- oButtonModel.setPropertyValue ("PositionX", 35)
- oButtonModel.setPropertyValue ("PositionY", 165)
- oButtonModel.setPropertyValue ("Height", 15)
- oButtonModel.setPropertyValue ("Width", 60)
- oButtonModel.setPropertyValue ("PushButtonType", _
- com.sun.star.awt.PushButtonType.OK)
- oButtonModel.setPropertyValue ("DefaultButton", True)
- oButtonModel.setPropertyValue ("Enabled", False)
- oDialogModel.insertByName ("btnOK", oButtonModel)
-
- ' Adds the cancel button.
- oButtonModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlButtonModel")
- oButtonModel.setPropertyValue ("PositionX", 125)
- oButtonModel.setPropertyValue ("PositionY", 165)
- oButtonModel.setPropertyValue ("Height", 15)
- oButtonModel.setPropertyValue ("Width", 60)
- oButtonModel.setPropertyValue ("PushButtonType", _
- com.sun.star.awt.PushButtonType.CANCEL)
- oDialogModel.insertByName ("btnCancel", oButtonModel)
-
- ' Adds the dialog model to the control and runs it.
- oDialog = CreateUnoService ("com.sun.star.awt.UnoControlDialog")
- oDialog.setModel (oDialogModel)
- oDialog.setVisible (True)
- oDialog.getControl ("lstPokemon").setFocus
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstPokemon").addItemListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XTextListener")
- oDialog.getControl ("numCP").addTextListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XTextListener")
- oDialog.getControl ("numHP").addTextListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstStarDust").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamRedItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamRed").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamBlueItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamBlue").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamYellowItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamYellow").addItemListener (oListener)
- oListener = CreateUnoListener ("subLstBestItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstBest").addItemListener (oListener)
- oDialog.getControl ("lstApprasal1").setVisible (False)
- oDialog.getControl ("txtBestBefore").setVisible (False)
- oDialog.getControl ("lstBest").setVisible (False)
- oDialog.getControl ("txtBestAfter").setVisible (False)
- oDialog.getControl ("cbxBest2").setVisible (False)
- oDialog.getControl ("cbxBest3").setVisible (False)
- oDialog.getControl ("lstApprasal2").setVisible (False)
- If oDialog.execute = 0 Then
- aQuery.bIsCancelled = True
- fnAskParam0 = aQuery
- Exit Function
- End If
-
- With aQuery
- .sPokemon = oDialog.getControl ("lstPokemon").getSelectedItem
- .nCP = oDialog.getControl ("numCP").getValue
- .nHP = oDialog.getControl ("numHP").getValue
- .nStarDust = CInt (oDialog.getControl ("lstStarDust").getSelectedItem)
- .nPlayerLevel = CInt (oDialog.getControl ("lstPlayerLevel").getSelectedItem)
- .nAppraisal1 = oDialog.getControl ("lstApprasal1").getSelectedItemPos + 1
- .nAppraisal2 = oDialog.getControl ("lstApprasal2").getSelectedItemPos + 1
- .bIsCancelled = False
- End With
- If oDialog.getControl ("cbxIsNew").getState = 1 Then
- aQuery.bIsNew = True
- Else
- aQuery.bIsNew = False
- End If
-
- ' The best stats
- bIsBestAttack = False
- bIsBestDefense = False
- bIsBestHP = False
- If oDialog.getControl ("lstBest").getSelectedItem = "Attack" Then
- bIsBestAttack = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestDefense = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestHP = True
- End If
- End If
- If oDialog.getControl ("lstBest").getSelectedItem = "Defense" Then
- bIsBestDefense = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestAttack = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestHP = True
- End If
- End If
- If oDialog.getControl ("lstBest").getSelectedItem = "HP" Then
- bIsBestHP = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestAttack = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestDefense = True
- End If
- End If
- aQuery.sBest = ""
- If bIsBestAttack Then
- aQuery.sBest = aQuery.sBest & "Atk "
- End If
- If bIsBestDefense Then
- aQuery.sBest = aQuery.sBest & "Def "
- End If
- If bIsBestHP Then
- aQuery.sBest = aQuery.sBest & "Sta "
- End If
-
- fnAskParam0 = aQuery
-End Function
-
-' subBtnOKCheck_disposing: Dummy for the listener.
-Sub subBtnOKCheck_disposing (oEvent As object)
-End Sub
-
-' subBtnOKCheck_itemStateChanged: When the Pokémon or star dust is selected.
-Sub subBtnOKCheck_itemStateChanged (oEvent As object)
+' subBtnOKCheck: Checks whether Pokémon, CP, HP and star dust are all filled.
+Sub subBtnOKCheck (oEvent As object)
Dim oDialog As Object
Dim oPokemon As Object, oCP As Object
Dim oHP As Object, oStarDust As Object, oOK As Object
@@ -594,6 +183,38 @@ Sub subBtnOKCheck_itemStateChanged (oEvent As object)
End If
End Sub
+' subLstPokemonSelected: When the Pokémon is selected.
+Sub subLstPokemonSelected (oEvent As object)
+ Dim oDialog As Object, sPokemon As String
+ Dim oImageModel As Object, sImageId As String
+
+ oDialog = oEvent.Source.getContext
+
+ 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
+
+ oImageModel = oDialog.getControl ("imgPokemon").getModel
+ oImageModel.setPropertyValue ("ImageURL", _
+ fnGetImageUrl (sImageId))
+
+ subBtnOKCheck (oEvent)
+End Sub
+
' subBtnOKCheck_textChanged: When the CP or HP is filled
Sub subBtnOKCheck_textChanged (oEvent As object)
subBtnOKCheck_itemStateChanged (oEvent)
@@ -613,7 +234,7 @@ Sub subRdoTeamRedItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamValor"))
+ fnGetImageUrl ("TeamValor"))
mItems = Array ( _
"Overall, your [Pokémon] simply amazes me. It can accomplish anything!", _
@@ -676,7 +297,7 @@ Sub subRdoTeamBlueItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamMystic"))
+ fnGetImageUrl ("TeamMystic"))
mItems = Array ( _
"Overall, your [Pokémon] is a wonder! What a breathtaking Pokémon!", _
@@ -739,7 +360,7 @@ Sub subRdoTeamYellowItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamInstinct"))
+ fnGetImageUrl ("TeamInstinct"))
mItems = Array ( _
"Overall, your [Pokémon] looks like it can really battle with the best of them!", _
diff --git a/oxt/AddonConfiguration.xcu b/oxt/AddonConfiguration.xcu
index 1488dfe..207f0a6 100644
--- a/oxt/AddonConfiguration.xcu
+++ b/oxt/AddonConfiguration.xcu
@@ -54,6 +54,761 @@
%origin%/icons/team-instinct.png
+
+
+ %origin%/icons/pokemons/bulbasaur-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/ivysaur-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/venusaur-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/charmander-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/charmeleon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/charizard-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/squirtle-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/wartortle-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/blastoise-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/caterpie-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/metapod-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/butterfree-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/weedle-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kakuna-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/beedrill-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/pidgey-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/pidgeotto-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/pidgeot-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/rattata-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/raticate-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/spearow-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/fearow-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/ekans-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/arbok-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/pikachu-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/raichu-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/sandshrew-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/sandslash-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidoran-female-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidorina-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidoqueen-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidoran-male-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidorino-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/nidoking-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/clefairy-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/clefable-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/vulpix-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/ninetales-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/jigglypuff-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/wigglytuff-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/zubat-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/golbat-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/oddish-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/gloom-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/vileplume-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/paras-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/parasect-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/venonat-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/venomoth-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/diglett-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dugtrio-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/meowth-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/persian-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/psyduck-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/golduck-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/mankey-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/primeape-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/growlithe-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/arcanine-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/poliwag-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/poliwhirl-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/poliwrath-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/abra-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kadabra-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/alakazam-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/machop-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/machoke-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/machamp-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/bellsprout-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/weepinbell-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/victreebel-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/tentacool-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/tentacruel-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/geodude-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/graveler-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/golem-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/ponyta-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/rapidash-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/slowpoke-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/slowbro-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/magnemite-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/magneton-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/farfetchd-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/doduo-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dodrio-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/seel-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dewgong-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/grimer-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/muk-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/shellder-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/cloyster-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/gastly-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/haunter-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/gengar-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/onix-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/drowzee-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/hypno-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/krabby-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kingler-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/voltorb-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/electrode-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/exeggcute-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/exeggutor-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/cubone-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/marowak-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/hitmonlee-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/hitmonchan-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/lickitung-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/koffing-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/weezing-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/rhyhorn-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/rhydon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/chansey-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/tangela-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kangaskhan-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/horsea-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/seadra-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/goldeen-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/seaking-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/staryu-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/starmie-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/mr-mime-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/scyther-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/jynx-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/electabuzz-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/magmar-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/pinsir-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/tauros-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/magikarp-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/gyarados-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/lapras-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/ditto-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/eevee-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/vaporeon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/jolteon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/flareon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/porygon-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/omanyte-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/omastar-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kabuto-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/kabutops-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/aerodactyl-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/snorlax-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/articuno-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/zapdos-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/moltres-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dratini-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dragonair-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/dragonite-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/mewtwo-pokemon-go.png
+
+
+
+
+ %origin%/icons/pokemons/mew-pokemon-go.png
+
+
diff --git a/oxt/PokemonGoIV/0Main.xba b/oxt/PokemonGoIV/0Main.xba
index a7f17d6..d9b7e0b 100644
--- a/oxt/PokemonGoIV/0Main.xba
+++ b/oxt/PokemonGoIV/0Main.xba
@@ -162,419 +162,8 @@ Function fnAskParam As aFindIVParam
fnAskParam = aQuery
End Function
-' fnAskParam: Asks the users for the parameters for the Pokémon.
-Function fnAskParam0 As aFindIVParam
- Dim oDialog As Object, oDialogModel As Object
- Dim oTextModel As Object, oListModel As Object
- Dim oNumericModel As Object, oCheckBoxModel As Object
- Dim oGroupModel As Object, oRadioModel As Object
- Dim oButtonModel As Object, oListener As Object
- Dim mListItems () As String, sTemp As String
- Dim nI As Integer, nCount As Integer
- Dim bIsBestAttack As Boolean, bIsBestDefense As Boolean
- Dim bIsBestHP As Boolean
- Dim aQuery As New aFindIVParam
-
- ' Creates a dialog
- oDialogModel = CreateUnoService ( _
- "com.sun.star.awt.UnoControlDialogModel")
- oDialogModel.setPropertyValue ("PositionX", 100)
- oDialogModel.setPropertyValue ("PositionY", 100)
- oDialogModel.setPropertyValue ("Height", 185)
- oDialogModel.setPropertyValue ("Width", 220)
- oDialogModel.setPropertyValue ("Title", "Pokémon GO IV Calculator")
-
- ' Adds a text label for the Pokémon list.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 5)
- oTextModel.setPropertyValue ("PositionY", 6)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 30)
- oTextModel.setPropertyValue ("Label", "~Pokémon:")
- oDialogModel.insertByName ("txtPokemon", oTextModel)
-
- ' Adds the Pokémon list.
- subReadBaseStats
- ReDim mListItems (UBound (maBaseStats)) As String
- For nI = 0 To UBound (maBaseStats)
- mListItems (nI) = maBaseStats (nI).sPokemon
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 35)
- oListModel.setPropertyValue ("PositionY", 4)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 50)
- oListModel.setPropertyValue ("TabIndex", 0)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstPokemon", oListModel)
-
- ' Adds a text label for the CP field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 5)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 15)
- oTextModel.setPropertyValue ("Label", "~CP:")
- oDialogModel.insertByName ("txtCP", oTextModel)
-
- ' Adds the CP field.
- oNumericModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlNumericFieldModel")
- oNumericModel.setPropertyValue ("PositionX", 20)
- oNumericModel.setPropertyValue ("PositionY", 19)
- oNumericModel.setPropertyValue ("Height", 12)
- oNumericModel.setPropertyValue ("Width", 20)
- oNumericModel.setPropertyValue ("DecimalAccuracy", 0)
- oDialogModel.insertByName ("numCP", oNumericModel)
-
- ' Adds a text label for the HP field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 50)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 15)
- oTextModel.setPropertyValue ("Label", "~HP:")
- oDialogModel.insertByName ("txtHP", oTextModel)
-
- ' Adds the HP field.
- oNumericModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlNumericFieldModel")
- oNumericModel.setPropertyValue ("PositionX", 65)
- oNumericModel.setPropertyValue ("PositionY", 19)
- oNumericModel.setPropertyValue ("Height", 12)
- oNumericModel.setPropertyValue ("Width", 15)
- oNumericModel.setPropertyValue ("DecimalAccuracy", 0)
- oDialogModel.insertByName ("numHP", oNumericModel)
-
- ' Adds a text label for the star dust field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 90)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 30)
- oTextModel.setPropertyValue ("Label", "S~tar dust:")
- oDialogModel.insertByName ("txtStarDust", oTextModel)
-
- ' Adds the star dust field.
- subReadStarDust
- sTemp = " "
- ReDim mListItems () As String
- nCount = -1
- For nI = 1 To UBound (mStarDust)
- If InStr (sTemp, " " & CStr (mStarDust (nI)) & " ") = 0 Then
- nCount = nCount + 1
- ReDim Preserve mListItems (nCount) As String
- mListItems (nCount) = CStr (mStarDust (nI))
- sTemp = sTemp & CStr (mStarDust (nI)) & " "
- End If
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 120)
- oListModel.setPropertyValue ("PositionY", 19)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 30)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstStarDust", oListModel)
-
- ' Adds a text label for the player level field.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 160)
- oTextModel.setPropertyValue ("PositionY", 21)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 35)
- oTextModel.setPropertyValue ("Label", "Player ~level:")
- oDialogModel.insertByName ("txtPlayerLevel", oTextModel)
-
- ' Adds the player level field.
- ReDim mListItems (39) As String
- For nI = 0 To UBound (mListItems)
- mListItems (nI) = CStr (nI + 1)
- Next nI
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 195)
- oListModel.setPropertyValue ("PositionY", 19)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 20)
- oListModel.setPropertyValue ("Dropdown", True)
- oListModel.setPropertyValue ("StringItemList", mListItems)
- oDialogModel.insertByName ("lstPlayerLevel", oListModel)
-
- ' Adds the whether powered-up check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 5)
- oCheckBoxModel.setPropertyValue ("PositionY", 36)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 210)
- oCheckBoxModel.setPropertyValue ("Label", _
- "This Pokémon is ~newly-caught and was not powered-up yet.")
- oCheckBoxModel.setPropertyValue ("State", 1)
- oDialogModel.insertByName ("cbxIsNew", oCheckBoxModel)
-
- ' Adds a group for the appraisals
- oGroupModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlGroupBoxModel")
- oGroupModel.setPropertyValue ("PositionX", 5)
- oGroupModel.setPropertyValue ("PositionY", 50)
- oGroupModel.setPropertyValue ("Height", 110)
- oGroupModel.setPropertyValue ("Width", 210)
- oGroupModel.setPropertyValue ("Label", "Team Leader Apprasal")
- oDialogModel.insertByName ("grpApprasals", oGroupModel)
-
- ' Adds a text label for the team.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 10)
- oTextModel.setPropertyValue ("PositionY", 66)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 20)
- oTextModel.setPropertyValue ("Label", "Team:")
- oDialogModel.insertByName ("txtTeam", oTextModel)
-
- ' Adds the red team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 30)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 25)
- oRadioModel.setPropertyValue ("Label", "~Valor")
- oRadioModel.setPropertyValue ("TextColor", RGB (255, 255, 255))
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (255, 0, 0))
- oDialogModel.insertByName ("rdoTeamRed", oRadioModel)
-
- ' Adds the blue team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 60)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 30)
- oRadioModel.setPropertyValue ("Label", "~Mystic")
- oRadioModel.setPropertyValue ("TextColor", RGB (255, 255, 255))
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (0, 0, 255))
- oDialogModel.insertByName ("rdoTeamBlue", oRadioModel)
-
- ' Adds the yellow team radio button.
- oRadioModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlRadioButtonModel")
- oRadioModel.setPropertyValue ("PositionX", 95)
- oRadioModel.setPropertyValue ("PositionY", 66)
- oRadioModel.setPropertyValue ("Height", 8)
- oRadioModel.setPropertyValue ("Width", 30)
- oRadioModel.setPropertyValue ("Label", "~Instinct")
- oRadioModel.setPropertyValue ("BackgroundColor", RGB (255, 255, 0))
- oDialogModel.insertByName ("rdoTeamYellow", oRadioModel)
-
- ' Adds the first appraisal list.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 10)
- oListModel.setPropertyValue ("PositionY", 79)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 200)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstApprasal1", oListModel)
-
- ' Adds a text label before the best stat.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 10)
- oTextModel.setPropertyValue ("PositionY", 96)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 20)
- oDialogModel.insertByName ("txtBestBefore", oTextModel)
-
- ' Adds the best stat field.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 30)
- oListModel.setPropertyValue ("PositionY", 94)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 35)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstBest", oListModel)
-
- ' Adds a text label after the best stat.
- oTextModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlFixedTextModel")
- oTextModel.setPropertyValue ("PositionX", 65)
- oTextModel.setPropertyValue ("PositionY", 96)
- oTextModel.setPropertyValue ("Height", 8)
- oTextModel.setPropertyValue ("Width", 100)
- oDialogModel.insertByName ("txtBestAfter", oTextModel)
-
- ' Adds the second best stat check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 10)
- oCheckBoxModel.setPropertyValue ("PositionY", 111)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 200)
- oDialogModel.insertByName ("cbxBest2", oCheckBoxModel)
-
- ' Adds the third best stat check box.
- oCheckBoxModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlCheckBoxModel")
- oCheckBoxModel.setPropertyValue ("PositionX", 10)
- oCheckBoxModel.setPropertyValue ("PositionY", 126)
- oCheckBoxModel.setPropertyValue ("Height", 8)
- oCheckBoxModel.setPropertyValue ("Width", 200)
- oDialogModel.insertByName ("cbxBest3", oCheckBoxModel)
-
- ' Adds the second appraisal list.
- oListModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlListBoxModel")
- oListModel.setPropertyValue ("PositionX", 10)
- oListModel.setPropertyValue ("PositionY", 139)
- oListModel.setPropertyValue ("Height", 12)
- oListModel.setPropertyValue ("Width", 200)
- oListModel.setPropertyValue ("Dropdown", True)
- oDialogModel.insertByName ("lstApprasal2", oListModel)
-
- ' Adds the OK button.
- oButtonModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlButtonModel")
- oButtonModel.setPropertyValue ("PositionX", 35)
- oButtonModel.setPropertyValue ("PositionY", 165)
- oButtonModel.setPropertyValue ("Height", 15)
- oButtonModel.setPropertyValue ("Width", 60)
- oButtonModel.setPropertyValue ("PushButtonType", _
- com.sun.star.awt.PushButtonType.OK)
- oButtonModel.setPropertyValue ("DefaultButton", True)
- oButtonModel.setPropertyValue ("Enabled", False)
- oDialogModel.insertByName ("btnOK", oButtonModel)
-
- ' Adds the cancel button.
- oButtonModel = oDialogModel.createInstance ( _
- "com.sun.star.awt.UnoControlButtonModel")
- oButtonModel.setPropertyValue ("PositionX", 125)
- oButtonModel.setPropertyValue ("PositionY", 165)
- oButtonModel.setPropertyValue ("Height", 15)
- oButtonModel.setPropertyValue ("Width", 60)
- oButtonModel.setPropertyValue ("PushButtonType", _
- com.sun.star.awt.PushButtonType.CANCEL)
- oDialogModel.insertByName ("btnCancel", oButtonModel)
-
- ' Adds the dialog model to the control and runs it.
- oDialog = CreateUnoService ("com.sun.star.awt.UnoControlDialog")
- oDialog.setModel (oDialogModel)
- oDialog.setVisible (True)
- oDialog.getControl ("lstPokemon").setFocus
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstPokemon").addItemListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XTextListener")
- oDialog.getControl ("numCP").addTextListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XTextListener")
- oDialog.getControl ("numHP").addTextListener (oListener)
- oListener = CreateUnoListener ("subBtnOKCheck_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstStarDust").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamRedItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamRed").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamBlueItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamBlue").addItemListener (oListener)
- oListener = CreateUnoListener ("subRdoTeamYellowItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("rdoTeamYellow").addItemListener (oListener)
- oListener = CreateUnoListener ("subLstBestItemChanged_", _
- "com.sun.star.awt.XItemListener")
- oDialog.getControl ("lstBest").addItemListener (oListener)
- oDialog.getControl ("lstApprasal1").setVisible (False)
- oDialog.getControl ("txtBestBefore").setVisible (False)
- oDialog.getControl ("lstBest").setVisible (False)
- oDialog.getControl ("txtBestAfter").setVisible (False)
- oDialog.getControl ("cbxBest2").setVisible (False)
- oDialog.getControl ("cbxBest3").setVisible (False)
- oDialog.getControl ("lstApprasal2").setVisible (False)
- If oDialog.execute = 0 Then
- aQuery.bIsCancelled = True
- fnAskParam0 = aQuery
- Exit Function
- End If
-
- With aQuery
- .sPokemon = oDialog.getControl ("lstPokemon").getSelectedItem
- .nCP = oDialog.getControl ("numCP").getValue
- .nHP = oDialog.getControl ("numHP").getValue
- .nStarDust = CInt (oDialog.getControl ("lstStarDust").getSelectedItem)
- .nPlayerLevel = CInt (oDialog.getControl ("lstPlayerLevel").getSelectedItem)
- .nAppraisal1 = oDialog.getControl ("lstApprasal1").getSelectedItemPos + 1
- .nAppraisal2 = oDialog.getControl ("lstApprasal2").getSelectedItemPos + 1
- .bIsCancelled = False
- End With
- If oDialog.getControl ("cbxIsNew").getState = 1 Then
- aQuery.bIsNew = True
- Else
- aQuery.bIsNew = False
- End If
-
- ' The best stats
- bIsBestAttack = False
- bIsBestDefense = False
- bIsBestHP = False
- If oDialog.getControl ("lstBest").getSelectedItem = "Attack" Then
- bIsBestAttack = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestDefense = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestHP = True
- End If
- End If
- If oDialog.getControl ("lstBest").getSelectedItem = "Defense" Then
- bIsBestDefense = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestAttack = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestHP = True
- End If
- End If
- If oDialog.getControl ("lstBest").getSelectedItem = "HP" Then
- bIsBestHP = True
- If oDialog.getControl ("cbxBest2").getState = 1 Then
- bIsBestAttack = True
- End If
- If oDialog.getControl ("cbxBest3").getState = 1 Then
- bIsBestDefense = True
- End If
- End If
- aQuery.sBest = ""
- If bIsBestAttack Then
- aQuery.sBest = aQuery.sBest & "Atk "
- End If
- If bIsBestDefense Then
- aQuery.sBest = aQuery.sBest & "Def "
- End If
- If bIsBestHP Then
- aQuery.sBest = aQuery.sBest & "Sta "
- End If
-
- fnAskParam0 = aQuery
-End Function
-
-' subBtnOKCheck_disposing: Dummy for the listener.
-Sub subBtnOKCheck_disposing (oEvent As object)
-End Sub
-
-' subBtnOKCheck_itemStateChanged: When the Pokémon or star dust is selected.
-Sub subBtnOKCheck_itemStateChanged (oEvent As object)
+' subBtnOKCheck: Checks whether Pokémon, CP, HP and star dust are all filled.
+Sub subBtnOKCheck (oEvent As object)
Dim oDialog As Object
Dim oPokemon As Object, oCP As Object
Dim oHP As Object, oStarDust As Object, oOK As Object
@@ -596,6 +185,38 @@ Sub subBtnOKCheck_itemStateChanged (oEvent As object)
End If
End Sub
+' subLstPokemonSelected: When the Pokémon is selected.
+Sub subLstPokemonSelected (oEvent As object)
+ Dim oDialog As Object, sPokemon As String
+ Dim oImageModel As Object, sImageId As String
+
+ oDialog = oEvent.Source.getContext
+
+ 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
+
+ oImageModel = oDialog.getControl ("imgPokemon").getModel
+ oImageModel.setPropertyValue ("ImageURL", _
+ fnGetImageUrl (sImageId))
+
+ subBtnOKCheck (oEvent)
+End Sub
+
' subBtnOKCheck_textChanged: When the CP or HP is filled
Sub subBtnOKCheck_textChanged (oEvent As object)
subBtnOKCheck_itemStateChanged (oEvent)
@@ -615,7 +236,7 @@ Sub subRdoTeamRedItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamValor"))
+ fnGetImageUrl ("TeamValor"))
mItems = Array ( _
"Overall, your [Pokémon] simply amazes me. It can accomplish anything!", _
@@ -678,7 +299,7 @@ Sub subRdoTeamBlueItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamMystic"))
+ fnGetImageUrl ("TeamMystic"))
mItems = Array ( _
"Overall, your [Pokémon] is a wonder! What a breathtaking Pokémon!", _
@@ -741,7 +362,7 @@ Sub subRdoTeamYellowItemChanged_itemStateChanged (oEvent As object)
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel.setPropertyValue ("ImageURL", _
- fnGetImageUrl ("TeamInstinct"))
+ fnGetImageUrl ("TeamInstinct"))
mItems = Array ( _
"Overall, your [Pokémon] looks like it can really battle with the best of them!", _
diff --git a/oxt/PokemonGoIV/DialogStrings_en_US.properties b/oxt/PokemonGoIV/DialogStrings_en_US.properties
index 2820e17..fb69cda 100644
--- a/oxt/PokemonGoIV/DialogStrings_en_US.properties
+++ b/oxt/PokemonGoIV/DialogStrings_en_US.properties
@@ -1,8 +1,8 @@
# Strings for Dialog Library PokemonGoIV
2.DlgMain.HelpText=
-3.DlgMain.Title=Pok\u00e9mon GO IV Calculator
+3.DlgMain.Title=Pok\u00c3\u00a9mon GO IV Calculator
22.DlgMain.txtPokemon.HelpText=
-23.DlgMain.txtPokemon.Label=~Pok\u00e9mon:
+23.DlgMain.txtPokemon.Label=~Pok\u00c3\u00a9mon:
26.DlgMain.txtCP.HelpText=
27.DlgMain.txtCP.Label=~CP:
28.DlgMain.numCP.HelpText=
@@ -14,7 +14,7 @@
40.DlgMain.txtPlayerLevel.HelpText=
41.DlgMain.txtPlayerLevel.Label=Player ~level:
46.DlgMain.cbxIsNew.HelpText=
-47.DlgMain.cbxIsNew.Label=This Pok\u00e9mon has not been powered-up yet.
+47.DlgMain.cbxIsNew.Label=This Pok\u00c3\u00a9mon is ~newly-caught and was not powered-up yet.
50.DlgMain.grpApprasals.HelpText=
51.DlgMain.grpApprasals.Label=Team Leader Apprasal
85.DlgMain.btnOK.HelpText=
@@ -39,5 +39,3 @@
195.DlgMain.txtBestAfter.HelpText=
201.DlgMain.cbxBest2.HelpText=
203.DlgMain.cbxBest3.HelpText=
-205.DlgMain.imgTeam.HelpText=
-207.DlgMain.imgTeam.HelpText=
diff --git a/oxt/PokemonGoIV/DialogStrings_zh_TW.properties b/oxt/PokemonGoIV/DialogStrings_zh_TW.properties
index a420a33..4820686 100644
--- a/oxt/PokemonGoIV/DialogStrings_zh_TW.properties
+++ b/oxt/PokemonGoIV/DialogStrings_zh_TW.properties
@@ -14,7 +14,7 @@
40.DlgMain.txtPlayerLevel.HelpText=
41.DlgMain.txtPlayerLevel.Label=\u73a9\u5bb6\u7b49\u7d1a(~L)\uff1a
46.DlgMain.cbxIsNew.HelpText=
-47.DlgMain.cbxIsNew.Label=\u9019\u96bb\u5bf6\u53ef\u5922\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
+47.DlgMain.cbxIsNew.Label=\u6211\u525b\u6293\u5230\u9019\u96bb\u5bf6\u53ef\u5922\uff0c\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
50.DlgMain.grpApprasals.HelpText=
51.DlgMain.grpApprasals.Label=\u968a\u9577\u8a55\u50f9
85.DlgMain.btnOK.HelpText=
@@ -39,5 +39,3 @@
195.DlgMain.txtBestAfter.HelpText=
201.DlgMain.cbxBest2.HelpText=
203.DlgMain.cbxBest3.HelpText=
-205.DlgMain.imgTeam.HelpText=
-207.DlgMain.imgTeam.HelpText=
diff --git a/oxt/PokemonGoIV/DlgMain.xdl b/oxt/PokemonGoIV/DlgMain.xdl
index 2c6439d..3eba39f 100644
--- a/oxt/PokemonGoIV/DlgMain.xdl
+++ b/oxt/PokemonGoIV/DlgMain.xdl
@@ -1,6 +1,6 @@
-
+
@@ -8,8 +8,8 @@
-
-
+
+
@@ -132,8 +132,7 @@
-
-
+
@@ -164,18 +163,18 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -198,10 +197,10 @@
-
+
-
-
+
+
@@ -245,33 +244,34 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/oxt/icons/team-instinct.png b/oxt/icons/team-instinct.png
index 20e24e5..2d9fd61 100644
Binary files a/oxt/icons/team-instinct.png and b/oxt/icons/team-instinct.png differ
diff --git a/oxt/icons/team-mystic.png b/oxt/icons/team-mystic.png
index 628f9db..e1e1392 100644
Binary files a/oxt/icons/team-mystic.png and b/oxt/icons/team-mystic.png differ
diff --git a/oxt/icons/team-valor.png b/oxt/icons/team-valor.png
index f7ef094..0319e92 100644
Binary files a/oxt/icons/team-valor.png and b/oxt/icons/team-valor.png differ