diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2021-11-24 23:50:05 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2021-11-24 23:50:05 -0500 |
| commit | 6cb9ecfd6f6c863cd873a1b5e77972d542dfb1bc (patch) | |
| tree | 19062c133ad787bf309eddd3461f99e7a0f2c915 | |
| parent | 52d2ad6538ef1cfa31295bfdd7b1a7dd5d31dfed (diff) | |
| download | erable-godot-6cb9ecfd6f6c863cd873a1b5e77972d542dfb1bc.tar.gz erable-godot-6cb9ecfd6f6c863cd873a1b5e77972d542dfb1bc.tar.bz2 erable-godot-6cb9ecfd6f6c863cd873a1b5e77972d542dfb1bc.zip | |
Added a file dialog; Hopefully it can play audio soongodot
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | App.gd | 27 | ||||
| -rw-r--r-- | App.tscn | 41 | ||||
| -rw-r--r-- | MainTheme.tres | 3 | ||||
| -rw-r--r-- | fonts/Open Sans/OpenSans-Bold.ttf (renamed from Fonts/Open Sans/OpenSans-Bold.ttf) | bin | 104120 -> 104120 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-BoldItalic.ttf (renamed from Fonts/Open Sans/OpenSans-BoldItalic.ttf) | bin | 92628 -> 92628 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-ExtraBold.ttf (renamed from Fonts/Open Sans/OpenSans-ExtraBold.ttf) | bin | 102076 -> 102076 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf (renamed from Fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf) | bin | 92772 -> 92772 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-Italic.ttf (renamed from Fonts/Open Sans/OpenSans-Italic.ttf) | bin | 92240 -> 92240 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-Light.ttf (renamed from Fonts/Open Sans/OpenSans-Light.ttf) | bin | 101696 -> 101696 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-LightItalic.ttf (renamed from Fonts/Open Sans/OpenSans-LightItalic.ttf) | bin | 92488 -> 92488 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-Regular.ttf (renamed from Fonts/Open Sans/OpenSans-Regular.ttf) | bin | 96932 -> 96932 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-SemiBold.ttf (renamed from Fonts/Open Sans/OpenSans-SemiBold.ttf) | bin | 100820 -> 100820 bytes | |||
| -rw-r--r-- | fonts/Open Sans/OpenSans-SemiBoldItalic.ttf (renamed from Fonts/Open Sans/OpenSans-SemiBoldItalic.ttf) | bin | 92180 -> 92180 bytes | |||
| -rw-r--r-- | project.godot | 1 |
15 files changed, 70 insertions, 4 deletions
@@ -9,3 +9,5 @@ export_presets.cfg # Mono-specific ignores .mono/ data_*/ + +output/ @@ -0,0 +1,27 @@ +extends Control + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var audio; + +# Called when the node enters the scene tree for the first time. +func _ready(): + print("Erable is ready") + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + +func _on_PlayButton_pressed(): + pass # Replace with function body. + +func _on_BrowseButton_pressed(): + $FileDialog.popup() + +func _on_FileDialog_file_selected(path): + print(path) + audio = path + @@ -1,8 +1,13 @@ -[gd_scene format=2] +[gd_scene load_steps=3 format=2] -[node name="Control" type="Control"] +[ext_resource path="res://MainTheme.tres" type="Theme" id=1] +[ext_resource path="res://App.gd" type="Script" id=2] + +[node name="Player" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } @@ -11,14 +16,38 @@ __meta__ = { margin_right = 96.0 margin_bottom = 48.0 text = "Play" +__meta__ = { +"_edit_use_anchors_": false +} [node name="PauseButton" type="Button" parent="."] margin_left = 112.0 margin_right = 208.0 margin_bottom = 48.0 text = "Pause" +__meta__ = { +"_edit_use_anchors_": false +} -[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] +[node name="BrowseButton" type="Button" parent="."] +margin_left = 224.0 +margin_right = 312.0 +margin_bottom = 48.0 +text = "Browse" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="FileDialog" type="FileDialog" parent="."] +margin_left = 160.0 +margin_top = 112.0 +margin_right = 792.0 +margin_bottom = 488.0 +window_title = "Open a File" +mode = 0 +access = 2 +current_dir = "/" +current_path = "/" [node name="Label" type="Label" parent="."] anchor_right = 1.0 @@ -33,3 +62,9 @@ valign = 2 __meta__ = { "_edit_use_anchors_": false } + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] + +[connection signal="pressed" from="PlayButton" to="." method="_on_PlayButton_pressed"] +[connection signal="pressed" from="BrowseButton" to="." method="_on_BrowseButton_pressed"] +[connection signal="file_selected" from="FileDialog" to="." method="_on_FileDialog_file_selected"] diff --git a/MainTheme.tres b/MainTheme.tres new file mode 100644 index 0000000..8a44629 --- /dev/null +++ b/MainTheme.tres @@ -0,0 +1,3 @@ +[gd_resource type="Theme" format=2] + +[resource] diff --git a/Fonts/Open Sans/OpenSans-Bold.ttf b/fonts/Open Sans/OpenSans-Bold.ttf Binary files differindex efdd5e8..efdd5e8 100644 --- a/Fonts/Open Sans/OpenSans-Bold.ttf +++ b/fonts/Open Sans/OpenSans-Bold.ttf diff --git a/Fonts/Open Sans/OpenSans-BoldItalic.ttf b/fonts/Open Sans/OpenSans-BoldItalic.ttf Binary files differindex 9bf9b4e..9bf9b4e 100644 --- a/Fonts/Open Sans/OpenSans-BoldItalic.ttf +++ b/fonts/Open Sans/OpenSans-BoldItalic.ttf diff --git a/Fonts/Open Sans/OpenSans-ExtraBold.ttf b/fonts/Open Sans/OpenSans-ExtraBold.ttf Binary files differindex 67fcf0f..67fcf0f 100644 --- a/Fonts/Open Sans/OpenSans-ExtraBold.ttf +++ b/fonts/Open Sans/OpenSans-ExtraBold.ttf diff --git a/Fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf b/fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf Binary files differindex 0867228..0867228 100644 --- a/Fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf +++ b/fonts/Open Sans/OpenSans-ExtraBoldItalic.ttf diff --git a/Fonts/Open Sans/OpenSans-Italic.ttf b/fonts/Open Sans/OpenSans-Italic.ttf Binary files differindex 1178567..1178567 100644 --- a/Fonts/Open Sans/OpenSans-Italic.ttf +++ b/fonts/Open Sans/OpenSans-Italic.ttf diff --git a/Fonts/Open Sans/OpenSans-Light.ttf b/fonts/Open Sans/OpenSans-Light.ttf Binary files differindex 6580d3a..6580d3a 100644 --- a/Fonts/Open Sans/OpenSans-Light.ttf +++ b/fonts/Open Sans/OpenSans-Light.ttf diff --git a/Fonts/Open Sans/OpenSans-LightItalic.ttf b/fonts/Open Sans/OpenSans-LightItalic.ttf Binary files differindex 1e0c331..1e0c331 100644 --- a/Fonts/Open Sans/OpenSans-LightItalic.ttf +++ b/fonts/Open Sans/OpenSans-LightItalic.ttf diff --git a/Fonts/Open Sans/OpenSans-Regular.ttf b/fonts/Open Sans/OpenSans-Regular.ttf Binary files differindex 29bfd35..29bfd35 100644 --- a/Fonts/Open Sans/OpenSans-Regular.ttf +++ b/fonts/Open Sans/OpenSans-Regular.ttf diff --git a/Fonts/Open Sans/OpenSans-SemiBold.ttf b/fonts/Open Sans/OpenSans-SemiBold.ttf Binary files differindex 54e7059..54e7059 100644 --- a/Fonts/Open Sans/OpenSans-SemiBold.ttf +++ b/fonts/Open Sans/OpenSans-SemiBold.ttf diff --git a/Fonts/Open Sans/OpenSans-SemiBoldItalic.ttf b/fonts/Open Sans/OpenSans-SemiBoldItalic.ttf Binary files differindex aebcf14..aebcf14 100644 --- a/Fonts/Open Sans/OpenSans-SemiBoldItalic.ttf +++ b/fonts/Open Sans/OpenSans-SemiBoldItalic.ttf diff --git a/project.godot b/project.godot index e9cd0eb..8552f12 100644 --- a/project.godot +++ b/project.godot @@ -13,7 +13,6 @@ config_version=4 config/name="Erable" config/description="Audio Player" run/main_scene="res://App.tscn" -boot_splash/image=false config/icon="res://erable.png" [rendering] |
