Skip to content

Commit

Permalink
Added toast command and removed erroneous node
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Jul 9, 2024
1 parent 55ab881 commit 3bf32de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
4 changes: 3 additions & 1 deletion Spatial.gd
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ func refresh_trail3d_points(trail3d: Spatial):
func refresh_trail2d_points(trail2d: Line2D):
trail2d.refresh_points()

func toast(message: String):
print(message)

################################################################################
# Signal Functions
Expand Down Expand Up @@ -928,7 +930,7 @@ func _on_TexturePathOpen_file_selected(path: String):
next_texture_path = "Data".plus_file(path.get_file())
var file = File.new()
if file.file_exists(self.marker_file_dir.plus_file(next_texture_path)):
print("Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again.")
toast(String(["Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again."]))
return
FileHandler.copy_file(path, self.marker_file_dir.plus_file(next_texture_path))
var texture_index = get_texture_index(next_texture_path)
Expand Down
15 changes: 0 additions & 15 deletions Spatial.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -503,19 +503,6 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="TexturePathSave" type="FileDialog" parent="Control/Dialogs"]
margin_left = 327.0
margin_top = 967.0
margin_right = 930.0
margin_bottom = 560.0
access = 1
filters = PoolStringArray( "*.png" )
current_dir = "user://protobins"
current_path = "user://protobins/"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="SaveDialog" type="FileDialog" parent="Control/Dialogs"]
margin_left = 180.169
margin_top = 105.833
Expand Down Expand Up @@ -926,8 +913,6 @@ material/0 = SubResource( 4 )
[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox7" to="Control/Dialogs/RangesDialog" method="on_change"]
[connection signal="file_selected" from="Control/Dialogs/TexturePathOpen" to="." method="_on_TexturePathOpen_file_selected"]
[connection signal="hide" from="Control/Dialogs/TexturePathOpen" to="." method="_on_Dialog_hide"]
[connection signal="file_selected" from="Control/Dialogs/TexturePathSave" to="." method="_on_TexturePathSave_file_selected"]
[connection signal="hide" from="Control/Dialogs/TexturePathSave" to="." method="_on_Dialog_hide"]
[connection signal="file_selected" from="Control/Dialogs/SaveDialog" to="." method="_on_SaveDialog_file_selected"]
[connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"]
[connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"]
Expand Down

0 comments on commit 3bf32de

Please sign in to comment.