Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Support for Pokémon Showdown!
Browse files Browse the repository at this point in the history
Now Pokémon Manager can now copy boxes and parties to the clipboard, and then you can paste them into Pokémon Showdown!
  • Loading branch information
DrRetro2033 committed Mar 20, 2022
1 parent 6765ac0 commit ba03f30
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 63 deletions.
32 changes: 26 additions & 6 deletions Bank.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ tab_align = 0
script = ExtResource( 7 )
[node name="PopupPanel" type="PopupPanel" parent="."]
visible = true
margin_left = 8.0
margin_top = 38.0
margin_right = 144.0
Expand All @@ -175,7 +176,7 @@ margin_bottom = -4.0
[node name="TextureRect" type="TextureRect" parent="PopupPanel/VBoxContainer"]
margin_right = 128.0
margin_bottom = 106.0
margin_bottom = 88.0
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_stretch_ratio = 3.0
Expand All @@ -184,15 +185,21 @@ expand = true
stretch_mode = 6
[node name="Label" type="Label" parent="PopupPanel/VBoxContainer"]
margin_top = 110.0
margin_top = 92.0
margin_right = 128.0
margin_bottom = 146.0
margin_bottom = 122.0
size_flags_horizontal = 3
size_flags_vertical = 7
text = "Name"
align = 1
valign = 1
[node name="Showdown" type="Button" parent="PopupPanel/VBoxContainer"]
margin_top = 126.0
margin_right = 128.0
margin_bottom = 146.0
text = "Open Showdown!"
[node name="Main Menu" type="Button" parent="PopupPanel/VBoxContainer"]
margin_top = 150.0
margin_right = 128.0
Expand Down Expand Up @@ -269,8 +276,8 @@ __meta__ = {
[node name="Control" type="Control" parent="Loading Screen"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 12288.0
margin_bottom = 7200.0
margin_right = 16384.0
margin_bottom = 9600.0
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
Expand Down Expand Up @@ -304,7 +311,7 @@ texture = ExtResource( 10 )
[node name="PopupMenu" type="PopupMenu" parent="."]
margin_right = 88.0
margin_bottom = 128.0
items = [ "Box", null, 0, false, true, -1, 0, null, "", true, "New Box", null, 0, false, false, 0, 0, null, "", false, "Rename Box", null, 0, false, false, 1, 0, null, "", false, "Pokemon", null, 0, false, true, -1, 0, null, "", true, "Search for Pokemon", null, 0, false, false, 2, 0, null, "", false, "Manage Parties", null, 0, false, false, 3, 0, null, "", false ]
items = [ "Box", null, 0, false, true, -1, 0, null, "", true, "Add a new box", null, 0, false, false, 0, 0, null, "", false, "Rename box", null, 0, false, false, 1, 0, null, "", false, "Copy box to clipboard", null, 0, false, false, 4, 0, null, "", false, "Pokemon", null, 0, false, true, -1, 0, null, "", true, "Search for Pokemon", null, 0, false, false, 2, 0, null, "", false, "Manage parties", null, 0, false, false, 3, 0, null, "", false ]
script = ExtResource( 3 )
[node name="Rename" type="PopupDialog" parent="."]
Expand Down Expand Up @@ -461,12 +468,25 @@ visible = false
[node name="Menu" parent="." instance=ExtResource( 14 )]
visible = false
[node name="Copied" type="AcceptDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -200.0
margin_top = -16.0
margin_right = 200.0
margin_bottom = 42.0
window_title = "Successfully copied pokemon to clipboard!"
[connection signal="pressed" from="PopupPanel/VBoxContainer/Showdown" to="PopupPanel" method="_on_Showdown_pressed"]
[connection signal="pressed" from="PopupPanel/VBoxContainer/Main Menu" to="PopupPanel" method="_on_Main_Menu_pressed"]
[connection signal="pressed" from="PopupPanel/VBoxContainer/Main Menu" to="Menu" method="_on_Main_Menu_pressed"]
[connection signal="pressed" from="ProfilePic" to="PopupPanel" method="_on_ProfilePic_pressed"]
[connection signal="request_completed" from="PokemonRequest" to="." method="_on_PokemonRequest_request_completed"]
[connection signal="request_completed" from="MoveRequest" to="." method="_on_MoveRequest_request_completed"]
[connection signal="request_completed" from="SpeciesRequest" to="." method="_on_SpeciesRequest_request_completed"]
[connection signal="export_box" from="PopupMenu" to="TabContainer" method="_on_PopupMenu_export_box"]
[connection signal="id_pressed" from="PopupMenu" to="PopupMenu" method="_on_PopupMenu_id_pressed"]
[connection signal="new_box" from="PopupMenu" to="TabContainer" method="_on_PopupMenu_new_box"]
[connection signal="newName" from="Rename" to="TabContainer" method="_on_Rename_newName"]
Expand Down
182 changes: 129 additions & 53 deletions Box.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ func setSlots(poke):
func save(bank):
for slot in get_children():
bank.order.push_back(slot.id)

func list_pokemon():
var pokemon = []
for slot in get_children():
pokemon.push_back(slot.id)
return pokemon
"
[node name="Box1" type="GridContainer" groups=["Bank"]]
Expand All @@ -37,117 +43,187 @@ anchor_bottom = 1.0
margin_top = 24.0
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 5
columns = 6
script = SubResource( 2 )
[node name="Button" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 201.0
margin_bottom = 189.0
margin_right = 167.0
margin_bottom = 141.0
[node name="Button2" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 205.0
margin_right = 406.0
margin_bottom = 189.0
margin_left = 171.0
margin_right = 338.0
margin_bottom = 141.0
[node name="Button3" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 410.0
margin_right = 611.0
margin_bottom = 189.0
margin_left = 342.0
margin_right = 509.0
margin_bottom = 141.0
[node name="Button4" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 615.0
margin_right = 816.0
margin_bottom = 189.0
margin_left = 513.0
margin_right = 680.0
margin_bottom = 141.0
[node name="Button5" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 820.0
margin_right = 1021.0
margin_bottom = 189.0
margin_left = 684.0
margin_right = 851.0
margin_bottom = 141.0
[node name="Button6" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 193.0
margin_right = 201.0
margin_bottom = 382.0
margin_left = 855.0
margin_right = 1022.0
margin_bottom = 141.0
[node name="Button7" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 205.0
margin_top = 193.0
margin_right = 406.0
margin_bottom = 382.0
margin_top = 145.0
margin_right = 167.0
margin_bottom = 286.0
[node name="Button8" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 410.0
margin_top = 193.0
margin_right = 611.0
margin_bottom = 382.0
margin_left = 171.0
margin_top = 145.0
margin_right = 338.0
margin_bottom = 286.0
[node name="Button9" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 615.0
margin_top = 193.0
margin_right = 816.0
margin_bottom = 382.0
margin_left = 342.0
margin_top = 145.0
margin_right = 509.0
margin_bottom = 286.0
[node name="Button10" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 820.0
margin_top = 193.0
margin_right = 1021.0
margin_bottom = 382.0
margin_left = 513.0
margin_top = 145.0
margin_right = 680.0
margin_bottom = 286.0
[node name="Button11" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 386.0
margin_right = 201.0
margin_bottom = 575.0
margin_left = 684.0
margin_top = 145.0
margin_right = 851.0
margin_bottom = 286.0
[node name="Button12" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 205.0
margin_top = 386.0
margin_right = 406.0
margin_bottom = 575.0
margin_left = 855.0
margin_top = 145.0
margin_right = 1022.0
margin_bottom = 286.0
[node name="Button13" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 410.0
margin_top = 386.0
margin_right = 611.0
margin_bottom = 575.0
margin_top = 290.0
margin_right = 167.0
margin_bottom = 431.0
[node name="Button14" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 615.0
margin_top = 386.0
margin_right = 816.0
margin_bottom = 575.0
margin_left = 171.0
margin_top = 290.0
margin_right = 338.0
margin_bottom = 431.0
[node name="Button15" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 820.0
margin_top = 386.0
margin_right = 1021.0
margin_bottom = 575.0
margin_left = 342.0
margin_top = 290.0
margin_right = 509.0
margin_bottom = 431.0
[node name="Button16" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 513.0
margin_top = 290.0
margin_right = 680.0
margin_bottom = 431.0
[node name="Button17" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 684.0
margin_top = 290.0
margin_right = 851.0
margin_bottom = 431.0
[node name="Button18" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 855.0
margin_top = 290.0
margin_right = 1022.0
margin_bottom = 431.0
[node name="Button19" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 435.0
margin_right = 167.0
margin_bottom = 576.0
[node name="Button20" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 171.0
margin_top = 435.0
margin_right = 338.0
margin_bottom = 576.0
[node name="Button21" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 342.0
margin_top = 435.0
margin_right = 509.0
margin_bottom = 576.0
[node name="Button22" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 513.0
margin_top = 435.0
margin_right = 680.0
margin_bottom = 576.0
[node name="Button23" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 684.0
margin_top = 435.0
margin_right = 851.0
margin_bottom = 576.0
[node name="Button24" parent="." instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 855.0
margin_top = 435.0
margin_right = 1022.0
margin_bottom = 576.0
16 changes: 14 additions & 2 deletions PartyCreator.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,24 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 252.0
margin_left = 372.0
margin_top = 208.0
margin_right = 280.0
margin_right = 408.0
margin_bottom = 228.0
text = "+"

[node name="Export" type="Button" parent="Panel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 200.0
margin_top = 208.0
margin_right = 332.0
margin_bottom = 228.0
text = "Copy to Clipboard"

[connection signal="pressed" from="Panel/Back" to="." method="_on_Back_pressed"]
[connection signal="tab_changed" from="Panel/Parties" to="." method="_on_Parties_tab_changed"]
[connection signal="pressed" from="Panel/AddParty" to="." method="_on_AddParty_pressed"]
[connection signal="pressed" from="Panel/Export" to="." method="_on_Export_pressed"]
Loading

0 comments on commit ba03f30

Please sign in to comment.