Skip to content

Commit

Permalink
Start....
Browse files Browse the repository at this point in the history
  • Loading branch information
IsotoxalDev committed Jun 2, 2022
1 parent 342f729 commit de37486
Show file tree
Hide file tree
Showing 12 changed files with 551 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Editor/Scenes/Dialogues/TrackEditor/TrackEditor.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends WindowDialog

onready var hbox = $HBox

func _popup(instrument_name, settings, editor):
window_title = "Edit %s" % instrument_name
popup()
31 changes: 27 additions & 4 deletions Editor/Scenes/Dialogues/TrackEditor/TrackEditor.tscn
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
[gd_scene format=2]
[gd_scene load_steps=2 format=2]

[ext_resource path="res://Editor/Scenes/Dialogues/TrackEditor/TrackEditor.gd" type="Script" id=1]

[node name="TrackEditor" type="WindowDialog"]
margin_right = 48.0
margin_bottom = 40.0
rect_min_size = Vector2( 876, 480 )
window_title = "Track Editor"
script = ExtResource( 1 )

[node name="HBox" type="HBoxContainer" parent="."]
margin_right = 40.0
margin_bottom = 40.0

[node name="Control" type="Control" parent="HBox"]
margin_right = 40.0
margin_bottom = 40.0

[node name="VBox" type="VBoxContainer" parent="HBox"]
margin_right = 40.0
margin_bottom = 40.0

[node name="HBox" type="HBoxContainer" parent="HBox/VBox"]
margin_right = 40.0
margin_bottom = 40.0

[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="NoteNameScrol" type="ScrollContainer" parent="HBox/VBox/HBox"]
margin_right = 40.0
margin_bottom = 40.0

[node name="NotesScrol" type="ScrollContainer" parent="HBox/VBox/HBox"]
margin_right = 40.0
margin_bottom = 40.0

[connection signal="popup_hide" from="." to="." method="_unpopup"]
8 changes: 4 additions & 4 deletions Editor/Scenes/SongEditor/SongEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ extends VBoxContainer

# Signals
signal playback_finished()
signal track_pressed (name)
signal track_pressed (name, settings, editor)

const BASE_SONG_SCRIPT = """extends SongScript
func song():
track("%s", [
track("Square", [
# Place your notes here
])
pass"""
Expand All @@ -28,7 +28,7 @@ func add_track(instrument: Button):
var name = track_name.instance()
name.set_instrument(instrument.icon, instrument.text)
names.add_child(name)
name.connect("pressed", self, "emit_signal", ["track_pressed", instrument.text])
name.connect("pressed", self, "emit_signal", ["track_pressed", instrument.text, instrument.settings])

# TODO: Hacky code
var inst := GoDAW.get_instrument(instrument.text)
Expand Down Expand Up @@ -80,4 +80,4 @@ func project_changed(project: Project):
if project.song_script:
song_script_editor.text = project.song_script
else:
song_script_editor.text = BASE_SONG_SCRIPT % "Square"
song_script_editor.text = BASE_SONG_SCRIPT
118 changes: 118 additions & 0 deletions Themes/Default/ButtonIcons/Paint_Active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Themes/Default/ButtonIcons/Paint_Active.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Paint_Active.svg-9463c9e117517180ef1a7d67647eeec1.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Themes/Default/ButtonIcons/Paint_Active.svg"
dest_files=[ "res://.import/Paint_Active.svg-9463c9e117517180ef1a7d67647eeec1.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
112 changes: 112 additions & 0 deletions Themes/Default/ButtonIcons/Paint_Inactive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Themes/Default/ButtonIcons/Paint_Inactive.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Paint_Inactive.svg-db9fef898e648bb4726192124a33c375.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Themes/Default/ButtonIcons/Paint_Inactive.svg"
dest_files=[ "res://.import/Paint_Inactive.svg-db9fef898e648bb4726192124a33c375.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Loading

0 comments on commit de37486

Please sign in to comment.