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

Commit

Permalink
More animations and better UI
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRetro2033 committed Jun 29, 2022
1 parent 6b93bc6 commit 134dbe0
Show file tree
Hide file tree
Showing 31 changed files with 652 additions and 85 deletions.
55 changes: 55 additions & 0 deletions Context.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[gd_scene load_steps=2 format=2]

[sub_resource type="GDScript" id=2]
script/source = "extends PopupPanel


# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"

var current_area = null
# 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 _on_Move1_pressed():
$RichTextLabel.text = $\"../GridContainer/Move1\".flavor_text
set_position(get_viewport().get_mouse_position())
popup()

func _on_Move2_pressed():
$RichTextLabel.text = $\"../GridContainer/Move2\".flavor_text
set_position(get_viewport().get_mouse_position())
popup()

func _on_Move3_pressed():
$RichTextLabel.text = $\"../GridContainer/Move3\".flavor_text
set_position(get_viewport().get_mouse_position())
popup()

func _on_Move4_pressed():
$RichTextLabel.text = $\"../GridContainer/Move4\".flavor_text
set_position(get_viewport().get_mouse_position())
popup()
"

[node name="Popup" type="PopupPanel"]
visible = true
margin_right = 65.0
margin_bottom = 32.0
size_flags_vertical = 3
script = SubResource( 2 )

[node name="RichTextLabel" type="RichTextLabel" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = -4.0
size_flags_vertical = 3
fit_content_height = true
scroll_active = false
12 changes: 12 additions & 0 deletions ContextArea.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends Node

# Declare member variables here. Examples:
# var a = 2
# var b = "text"
signal contextMenu(context)
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.

func contextMenu(area):
emit_signal("contextMenu",area)
Binary file added Folder_Icon.kra
Binary file not shown.
Binary file added Folder_Icon.kra~
Binary file not shown.
Binary file added Folder_Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Folder_Icon.png~
Binary file not shown.
1 change: 1 addition & 0 deletions Move.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ font_data = ExtResource( 3 )
[node name="Move1" type="VBoxContainer"]
anchor_right = 0.115234
anchor_bottom = 0.19
mouse_default_cursor_shape = 16
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 2 )
Expand Down
163 changes: 160 additions & 3 deletions Panel.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=31 format=2]
[gd_scene load_steps=33 format=2]

[ext_resource path="res://Move.tscn" type="PackedScene" id=1]
[ext_resource path="res://abomasnow.png" type="Texture" id=2]
Expand All @@ -7,6 +7,7 @@
[ext_resource path="res://scripts/Path.gd" type="Script" id=5]
[ext_resource path="res://scripts/V_Chart.gd" type="Script" id=6]
[ext_resource path="res://fonts/FemaleAndMaleSymbols-BLql.ttf" type="DynamicFontData" id=7]
[ext_resource path="res://Context.tscn" type="PackedScene" id=8]
[ext_resource path="res://PanelTheme.tres" type="Theme" id=9]

[sub_resource type="GDScript" id=1]
Expand Down Expand Up @@ -170,14 +171,33 @@ func open(info):
4:
move = pokemon[\"move4\"]
child = get_node(\"GridContainer/Move4\")
child.move(move[\"name\"],move[\"typing\"],move[\"form\"],move[\"pp\"],move[\"power\"])
child.move(move[\"name\"],move[\"typing\"],move[\"form\"],move[\"pp\"],move[\"power\"],move[\"text\"])
moves -= 1
text.text = pokemon[\"text\"]
lv.text = \"Lv. \"+str(pokemon[\"level\"])
var path_name = str(pokemon[\"species\"])
var temp_path = path+path_name+\".png\"
sprite.set_texture(load(temp_path))
$\"Viewport/V Chart\".EvSet(pokemon)
$StatsInfo/RichTextLabel.text = (\"Base:\\n\\tHP: \"+str(pokemon[\"hp\"])+
\"\\n\\tAtk: \"+str(pokemon[\"atk\"])+
\"\\n\\tDef: \"+str(pokemon[\"def\"])+
\"\\n\\tSpe: \"+str(pokemon[\"spe\"])+
\"\\n\\tSpD: \"+str(pokemon[\"spd\"])+
\"\\n\\tSpA: \"+str(pokemon[\"spa\"])+
\"\\nIVs:\\n\\tHP: \"+str(pokemon[\"iv_hp\"])+
\"\\n\\tAtk: \"+str(pokemon[\"iv_atk\"])+
\"\\n\\tDef: \"+str(pokemon[\"iv_def\"])+
\"\\n\\tSpe: \"+str(pokemon[\"iv_spe\"])+
\"\\n\\tSpD: \"+str(pokemon[\"iv_spd\"])+
\"\\n\\tSpA: \"+str(pokemon[\"iv_spa\"])+
\"\\nEVs:\\n\\tHP: \"+str(pokemon[\"ev_hp\"])+
\"\\n\\tAtk: \"+str(pokemon[\"ev_atk\"])+
\"\\n\\tDef: \"+str(pokemon[\"ev_def\"])+
\"\\n\\tSpe: \"+str(pokemon[\"ev_spe\"])+
\"\\n\\tSpD: \"+str(pokemon[\"ev_spd\"])+
\"\\n\\tSpA: \"+str(pokemon[\"ev_spa\"])
)
print(pokemon)

func _process(delta):
Expand Down Expand Up @@ -308,6 +328,36 @@ corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="GDScript" id=51]
script/source = "extends PopupPanel


# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
var on_graph = false

# 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):
if Input.is_action_just_pressed(\"right_click\") and visible != true and on_graph:
set_global_position(get_viewport().get_mouse_position())
$RichTextLabel.scroll_to_line(0)
popup()


func _on_Control_mouse_entered():
on_graph = true


func _on_Control_mouse_exited():
on_graph = false
"
[node name="Panel" type="Panel" groups=["Info Panel"]]
anchor_right = 1.0
anchor_bottom = 1.0
Expand All @@ -328,6 +378,16 @@ texture = ExtResource( 2 )
expand = true
stretch_mode = 6
[node name="Popup" parent="." instance=ExtResource( 8 )]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -512.0
margin_top = -300.0
margin_right = -392.0
margin_bottom = -268.0
[node name="Type1" type="PanelContainer" parent="."]
anchor_left = 0.765625
anchor_top = 0.486667
Expand Down Expand Up @@ -516,6 +576,59 @@ margin_top = 97.0
margin_right = 224.0
margin_bottom = 182.0
[node name="GridContainer2" type="GridContainer" parent="."]
anchor_left = 0.765625
anchor_top = 0.546667
anchor_right = 0.984375
anchor_bottom = 0.853333
mouse_default_cursor_shape = 16
custom_constants/vseparation = 12
columns = 2
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": true
}
[node name="Move1" type="ToolButton" parent="GridContainer2"]
margin_right = 110.0
margin_bottom = 85.0
mouse_default_cursor_shape = 16
size_flags_horizontal = 3
size_flags_vertical = 3
action_mode = 0
button_mask = 2
[node name="Move2" type="ToolButton" parent="GridContainer2"]
margin_left = 114.0
margin_right = 224.0
margin_bottom = 85.0
mouse_default_cursor_shape = 16
size_flags_horizontal = 3
size_flags_vertical = 3
action_mode = 0
button_mask = 2
[node name="Move3" type="ToolButton" parent="GridContainer2"]
margin_top = 97.0
margin_right = 110.0
margin_bottom = 182.0
mouse_default_cursor_shape = 16
size_flags_horizontal = 3
size_flags_vertical = 3
action_mode = 0
button_mask = 2
[node name="Move4" type="ToolButton" parent="GridContainer2"]
margin_left = 114.0
margin_top = 97.0
margin_right = 224.0
margin_bottom = 182.0
mouse_default_cursor_shape = 16
size_flags_horizontal = 3
size_flags_vertical = 3
action_mode = 0
button_mask = 2
[node name="RichTextLabel" type="RichTextLabel" parent="."]
anchor_left = 0.046875
anchor_top = 0.28
Expand Down Expand Up @@ -863,7 +976,7 @@ anchor_top = 0.288333
anchor_right = 0.645508
anchor_bottom = 0.671667
rect_min_size = Vector2( 202, 230 )
mouse_filter = 2
mouse_default_cursor_shape = 16
texture = SubResource( 49 )
expand = true
stretch_mode = 6
Expand Down Expand Up @@ -1194,4 +1307,48 @@ size_flags_vertical = 3
custom_styles/normal = SubResource( 26 )
text = "Blue"
[node name="StatsInfo" type="PopupPanel" parent="."]
anchor_right = 0.183594
anchor_bottom = 0.186667
margin_bottom = -7.62939e-06
script = SubResource( 51 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="RichTextLabel" type="RichTextLabel" parent="StatsInfo"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = -4.0
text = "Base:
HP: 1
Atk: 1
Def: 1
Spe: 1
Spd: 1
SpA: 1
IVs:
HP: 1
Atk: 1
Def: 1
Spe: 1
Spd: 1
SpA: 1
EVs:
HP: 1
Atk: 1
Def: 1
Spe: 1
Spd: 1
SpA: 1"
[connection signal="pressed" from="Back" to="." method="_on_Back_pressed"]
[connection signal="pressed" from="GridContainer2/Move1" to="Popup" method="_on_Move1_pressed"]
[connection signal="pressed" from="GridContainer2/Move2" to="Popup" method="_on_Move2_pressed"]
[connection signal="pressed" from="GridContainer2/Move3" to="Popup" method="_on_Move3_pressed"]
[connection signal="pressed" from="GridContainer2/Move4" to="Popup" method="_on_Move4_pressed"]
[connection signal="mouse_entered" from="Control" to="StatsInfo" method="_on_Control_mouse_entered"]
[connection signal="mouse_exited" from="Control" to="StatsInfo" method="_on_Control_mouse_exited"]
12 changes: 12 additions & 0 deletions PartyCreator.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ margin_right = 408.0
margin_bottom = 228.0
text = "+"

[node name="RemoveParty" type="Button" parent="Panel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 124.0
margin_top = 208.0
margin_right = 160.0
margin_bottom = 228.0
text = "-"

[node name="Export" type="Button" parent="Panel"]
anchor_left = 0.5
anchor_top = 0.5
Expand All @@ -84,4 +95,5 @@ 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/RemoveParty" to="." method="_on_RemoveParty_pressed"]
[connection signal="pressed" from="Panel/Export" to="." method="_on_Export_pressed"]
56 changes: 56 additions & 0 deletions Types.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://fonts/Essentiarum Regular.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://PanelTheme.tres" type="Theme" id=2]

[sub_resource type="DynamicFont" id=1]
size = 26
font_data = ExtResource( 1 )

[node name="Panel" type="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="GridContainer" type="GridContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 2

[node name="VBoxContainer" type="VBoxContainer" parent="GridContainer"]
margin_right = 510.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="OnlyOneType" type="PanelContainer" parent="GridContainer/VBoxContainer"]
margin_right = 510.0
margin_bottom = 600.0
rect_min_size = Vector2( 0, 20 )
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource( 2 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": true
}

[node name="Label" type="Label" parent="GridContainer/VBoxContainer/OnlyOneType"]
margin_right = 510.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 7
custom_fonts/font = SubResource( 1 )
text = "g"
align = 1
valign = 2

[node name="VBoxContainer2" type="VBoxContainer" parent="GridContainer"]
margin_left = 514.0
margin_right = 1024.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
2 changes: 1 addition & 1 deletion Walking.tres
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tracks/0/keys = {
"times": PoolRealArray( 0, 0.3, 0.7, 0.9, 1.2, 1.55, 8 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 320, 392 ), Vector2( 320, 392 ), Vector2( 342, 345 ), Vector2( 360, 333 ), Vector2( 397, 356 ), Vector2( 433, 391 ), Vector2( 704, 386 ) ]
"values": [ Vector2( 320, 392 ), Vector2( 320, 392 ), Vector2( 342, 345 ), Vector2( 360, 333 ), Vector2( 397, 356 ), Vector2( 433, 391 ), Vector2( 704, 391 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("PokemonWalking:rotation_degrees")
Expand Down
Loading

0 comments on commit 134dbe0

Please sign in to comment.