This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d57ce2
commit 9d6dc05
Showing
28 changed files
with
941 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pokemon-gen7x/ | ||
pkmdb/ | ||
save/ | ||
sprites/ | ||
.import/ | ||
*.png | ||
*.import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://abomasnow.png" type="Texture" id=1] | ||
|
||
[sub_resource type="GDScript" id=1] | ||
script/source = "extends Button | ||
signal dragged_and_dropped | ||
const path = \"res://sprites/pokemon/icons/\" | ||
onready var label = $VBoxContainer/Label | ||
onready var sprite = $VBoxContainer/TextureRect | ||
onready var hold_timer = $Timer | ||
const button = preload(\"res://drag.tscn\") | ||
var id | ||
var can_drag = true | ||
func _ready(): | ||
pass | ||
|
||
func pokeButton(var info): | ||
label = $VBoxContainer/Label | ||
sprite = $VBoxContainer/TextureRect | ||
if info != null: | ||
id = info | ||
var pokemon = Pokemon.pokemon[info] | ||
disabled = false | ||
label.visible = true | ||
sprite.visible = true | ||
label.text = pokemon[\"nickname\"] | ||
var path_name = str(pokemon[\"sprite\"]) | ||
var temp_path = path+path_name | ||
sprite.set_texture(load(temp_path)) | ||
else: | ||
id = null | ||
disabled = true | ||
label.visible = false | ||
sprite.visible = false | ||
|
||
|
||
func _on_Button_pressed(): | ||
for panel in get_tree().get_nodes_in_group(\"Info Panel\"): | ||
panel.open(id) | ||
hold_timer.stop() | ||
|
||
|
||
func _on_Button_button_down(): | ||
yield(get_tree().create_timer(2.0), \"timeout\") | ||
get_drag_data(Vector2(0.0,0.0)) | ||
|
||
func get_drag_data(position): | ||
if not disabled and can_drag: | ||
var data = {} | ||
data[\"origin\"] = self | ||
data[\"pokemon\"] = id | ||
var drag_button = TextureRect.new() | ||
drag_button.texture = get_child(0).get_child(0).texture | ||
drag_button.rect_size = Vector2(100,100) | ||
var control = Control.new() | ||
control.add_child(drag_button) | ||
drag_button.rect_position = -0.5 * drag_button.rect_size | ||
set_drag_preview(control) | ||
return data | ||
|
||
func can_drop_data(position, data): | ||
return true | ||
|
||
func drop_data(position, data): | ||
data[\"origin\"].pokeButton(id) | ||
pokeButton(data[\"pokemon\"]) | ||
emit_signal(\"dragged_and_dropped\") | ||
|
||
" | ||
[node name="Button" type="Button"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
disabled = true | ||
script = SubResource( 1 ) | ||
[node name="VBoxContainer" type="VBoxContainer" parent="."] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer"] | ||
visible = false | ||
margin_right = 1024.0 | ||
margin_bottom = 470.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
size_flags_stretch_ratio = 3.75 | ||
texture = ExtResource( 1 ) | ||
expand = true | ||
stretch_mode = 6 | ||
[node name="Label" type="Label" parent="VBoxContainer"] | ||
visible = false | ||
margin_right = 1024.0 | ||
margin_bottom = 600.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
text = "Name" | ||
align = 1 | ||
valign = 1 | ||
[node name="Timer" type="Timer" parent="."] | ||
wait_time = 2.0 | ||
[connection signal="button_down" from="." to="." method="_on_Button_button_down"] | ||
[connection signal="button_up" from="." to="." method="_on_Button_button_up"] | ||
[connection signal="pressed" from="." to="." method="_on_Button_pressed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
extends Control | ||
onready var bank = $"../Bank Manager" | ||
|
||
# Declare member variables here. Examples: | ||
# var a = 2 | ||
# var b = "text" | ||
onready var reset_accept = $Panel/Reset | ||
onready var quit_accept = $Panel/Quit | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
pass # Replace with function body. | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
#func _process(delta): | ||
# pass | ||
|
||
|
||
func _on_Reset_pressed(): | ||
reset_accept.popup() | ||
|
||
|
||
func _on_Quit_pressed(): | ||
quit_accept.popup() | ||
|
||
|
||
func _on_QuitSave_pressed(): | ||
bank.save() | ||
get_tree().quit() | ||
|
||
|
||
func _on_Quit_confirmed(): | ||
get_tree().quit() | ||
|
||
|
||
func _on_Reset_confirmed(): | ||
bank.reset() | ||
get_tree().quit() | ||
|
||
|
||
func _on_Main_Menu_pressed(): | ||
visible = true | ||
|
||
|
||
func _on_Back_pressed(): | ||
visible = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
[gd_scene load_steps=5 format=2] | ||
|
||
[ext_resource path="res://Futura Condensed Extra Bold.otf" type="DynamicFontData" id=1] | ||
[ext_resource path="res://Menu.gd" type="Script" id=2] | ||
|
||
[sub_resource type="DynamicFont" id=1] | ||
size = 32 | ||
font_data = ExtResource( 1 ) | ||
|
||
[sub_resource type="Theme" id=2] | ||
|
||
[node name="Menu" type="Control"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
script = ExtResource( 2 ) | ||
|
||
[node name="Panel" type="Panel" parent="."] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
|
||
[node name="Label" type="Label" parent="Panel"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 192.0 | ||
margin_top = 94.0 | ||
margin_right = -192.0 | ||
margin_bottom = -440.0 | ||
custom_fonts/font = SubResource( 1 ) | ||
text = "Pokemon Manager" | ||
align = 1 | ||
valign = 1 | ||
|
||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 312.0 | ||
margin_top = 176.0 | ||
margin_right = -312.0 | ||
margin_bottom = -48.0 | ||
|
||
[node name="Reset" type="Button" parent="Panel/VBoxContainer"] | ||
margin_right = 400.0 | ||
margin_bottom = 122.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
text = "Reset" | ||
|
||
[node name="Quit" type="Button" parent="Panel/VBoxContainer"] | ||
margin_top = 126.0 | ||
margin_right = 400.0 | ||
margin_bottom = 249.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
text = "Quit without Saving" | ||
|
||
[node name="QuitSave" type="Button" parent="Panel/VBoxContainer"] | ||
margin_top = 253.0 | ||
margin_right = 400.0 | ||
margin_bottom = 376.0 | ||
size_flags_horizontal = 3 | ||
size_flags_vertical = 3 | ||
text = "Quit and Save" | ||
|
||
[node name="Reset" type="ConfirmationDialog" parent="Panel"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 272.0 | ||
margin_top = 236.0 | ||
margin_right = -272.0 | ||
margin_bottom = -284.0 | ||
theme = SubResource( 2 ) | ||
dialog_text = "Are you sure you want to reset everything? (All pokémon, parties, boxes, and trainer info will have to be added to the bank or created from scratch)" | ||
dialog_autowrap = true | ||
|
||
[node name="Quit" type="ConfirmationDialog" parent="Panel"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 272.0 | ||
margin_top = 236.0 | ||
margin_right = -272.0 | ||
margin_bottom = -284.0 | ||
theme = SubResource( 2 ) | ||
dialog_text = "Are you sure you want to quit without saving? (Any pokémon, parties, or boxes that were added after the latest save will have to be added to the bank or created again)" | ||
dialog_autowrap = true | ||
|
||
[node name="Back" type="Button" parent="."] | ||
anchor_top = 1.0 | ||
anchor_bottom = 1.0 | ||
margin_left = 16.0 | ||
margin_top = -64.0 | ||
margin_right = 136.0 | ||
margin_bottom = -16.0 | ||
text = "Back" | ||
|
||
[connection signal="pressed" from="Panel/VBoxContainer/Reset" to="." method="_on_Reset_pressed"] | ||
[connection signal="pressed" from="Panel/VBoxContainer/Quit" to="." method="_on_Quit_pressed"] | ||
[connection signal="pressed" from="Panel/VBoxContainer/QuitSave" to="." method="_on_QuitSave_pressed"] | ||
[connection signal="confirmed" from="Panel/Reset" to="." method="_on_Reset_confirmed"] | ||
[connection signal="confirmed" from="Panel/Quit" to="." method="_on_Quit_confirmed"] | ||
[connection signal="pressed" from="Back" to="." method="_on_Back_pressed"] |
Oops, something went wrong.