audioplayer.tscn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. [gd_scene load_steps=2 format=3 uid="uid://csapiqka522fh"]
  2. [ext_resource type="Script" uid="uid://clmtlg8via3qn" path="res://scenes/Nodes/audioplayer.gd" id="1_yprak"]
  3. [node name="Control" type="Control"]
  4. custom_minimum_size = Vector2(400, 0)
  5. layout_mode = 3
  6. anchors_preset = 15
  7. anchor_right = 1.0
  8. anchor_bottom = 1.0
  9. offset_right = -880.0
  10. offset_bottom = -568.0
  11. grow_horizontal = 2
  12. grow_vertical = 2
  13. script = ExtResource("1_yprak")
  14. metadata/loadenable = false
  15. [node name="Panel" type="Panel" parent="."]
  16. layout_mode = 0
  17. offset_right = 400.0
  18. offset_bottom = 96.0
  19. [node name="Label" type="Label" parent="."]
  20. visible = false
  21. layout_mode = 0
  22. offset_left = 8.0
  23. offset_top = 5.0
  24. offset_right = 232.0
  25. offset_bottom = 28.0
  26. text = "Drop files here or load below"
  27. [node name="FileDialog" type="FileDialog" parent="."]
  28. title = "Select input file"
  29. use_native_dialog = true
  30. [node name="LoadButton" type="Button" parent="."]
  31. layout_mode = 0
  32. offset_top = 104.0
  33. offset_right = 196.0
  34. offset_bottom = 147.0
  35. text = "Load File"
  36. [node name="RecycleButton" type="Button" parent="." groups=["outputnode"]]
  37. layout_mode = 0
  38. offset_top = 104.0
  39. offset_right = 196.0
  40. offset_bottom = 147.0
  41. tooltip_text = "Copies your output file back to your input for further processing."
  42. text = "Recycle File"
  43. metadata/outputfunction = "recycle"
  44. [node name="PlayButton" type="Button" parent="."]
  45. layout_mode = 0
  46. offset_left = 204.0
  47. offset_top = 104.0
  48. offset_right = 400.0
  49. offset_bottom = 147.0
  50. text = "Play"
  51. [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
  52. [node name="WavError" type="Window" parent="."]
  53. title = "Wrong File Type"
  54. initial_position = 2
  55. size = Vector2i(350, 100)
  56. visible = false
  57. transient = true
  58. exclusive = true
  59. unresizable = true
  60. borderless = true
  61. popup_window = true
  62. [node name="Label" type="Label" parent="WavError"]
  63. offset_right = 349.0
  64. offset_bottom = 58.0
  65. text = "Wrong file type
  66. Only WAV files are supported"
  67. horizontal_alignment = 1
  68. vertical_alignment = 1
  69. autowrap_mode = 2
  70. [node name="CloseButton" type="Button" parent="WavError"]
  71. offset_left = 143.0
  72. offset_top = 62.0
  73. offset_right = 207.0
  74. offset_bottom = 93.0
  75. text = "Ok"
  76. [node name="WaveformPreview" type="TextureRect" parent="."]
  77. layout_mode = 0
  78. offset_right = 400.0
  79. offset_bottom = 96.0
  80. expand_mode = 2
  81. [node name="Playhead" type="Line2D" parent="."]
  82. points = PackedVector2Array(0, 0, 0, 96)
  83. width = 2.0
  84. default_color = Color(1, 1, 1, 0.541176)
  85. [node name="LoopRegion" type="ColorRect" parent="."]
  86. layout_mode = 0
  87. offset_bottom = 96.0
  88. focus_mode = 1
  89. color = Color(1, 1, 1, 0.0941176)
  90. [node name="Button" type="Button" parent="."]
  91. layout_mode = 0
  92. offset_right = 400.0
  93. offset_bottom = 96.0
  94. flat = true
  95. [node name="Timer" type="Timer" parent="."]
  96. [connection signal="button_down" from="LoadButton" to="." method="_on_load_button_button_down"]
  97. [connection signal="button_down" from="RecycleButton" to="." method="_on_recycle_button_button_down"]
  98. [connection signal="button_down" from="PlayButton" to="." method="_on_play_button_button_down"]
  99. [connection signal="button_down" from="WavError/CloseButton" to="." method="_on_close_button_button_down"]
  100. [connection signal="button_down" from="Button" to="." method="_on_button_button_down"]
  101. [connection signal="button_up" from="Button" to="." method="_on_button_button_up"]
  102. [connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]