asingcrow/godot/Components/PublishDetails.gd

89 lines
2.7 KiB
GDScript3

extends Control
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# 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):
# pass
var SongTitle = ""
var SongArtist = ""
var CompletionType
var Tags = ""
var OriginalURL = ""
var PartsURLs = []
var PartsVolumes = []
var PartsDelays = []
var PartsOthers = []
var BackVolume = 0
func setSongTitle(value):
SongTitle = value
BundlePost.setSongTitle(value)
func setSongArtist(value):
SongArtist = value
BundlePost.setSongArtist(value)
func setCompletionType(value):
CompletionType = value
BundlePost.setCompletionType(value)
func setTags(value):
Tags = value
BundlePost.setTags(value)
func setOriginalURL(value):
OriginalURL = value
BundlePost.setOriginalURL(value)
func setPartsURLs(value):
PartsURLs = value
BundlePost.setPartsURLs(value)
func setPartsVolumes(value):
PartsVolumes = value
BundlePost.setPartsVolumes(value)
func setPartsDelays(value):
PartsDelays = value
BundlePost.setPartsDelays(value)
func setBackVolume(value):
BackVolume = value
BundlePost.setBackVolume(value)
func _on_any_text_changed(new_text):
BundlePost.setSongArtist($HBoxContainer/GridContainer/GridContainer/ArtistEdit.text)
BundlePost.setSongTitle($HBoxContainer/GridContainer/GridContainer/SongEdit.text)
match $HBoxContainer/GridContainer/GridContainer/CompletionDropdown.selected:
0:
BundlePost.setCompletionType(BundlePost.CompletionTypeOptions.OpenSeed)
1:
BundlePost.setCompletionType(BundlePost.CompletionTypeOptions.SoloCompletion)
2:
BundlePost.setCompletionType(BundlePost.CompletionTypeOptions.DuetCompletion)
3:
BundlePost.setCompletionType(BundlePost.CompletionTypeOptions.AllHarmony)
4:
BundlePost.setCompletionType(BundlePost.CompletionTypeOptions.AllMelody)
BundlePost.setSongTitle($HBoxContainer/GridContainer/GridContainer/SongEdit.text)
BundlePost.setTags($HBoxContainer/GridContainer/GridContainer/TagsEdit.text)
$HBoxContainer/Panel/GridContainer/PostContent.text = BundlePost.getFinalText()
print(BundlePost.getFinalText())
pass # Replace with function body.
func _on_Control_ready():
$HBoxContainer/GridContainer/GridContainer/CompletionDropdown.add_item("Open Seed - part of a duet")
$HBoxContainer/GridContainer/GridContainer/CompletionDropdown.add_item("Solo Completion")
$HBoxContainer/GridContainer/GridContainer/CompletionDropdown.add_item("Duet Completion")
$HBoxContainer/GridContainer/GridContainer/CompletionDropdown.add_item("All Harmony Seed")
$HBoxContainer/GridContainer/GridContainer/CompletionDropdown.add_item("All Melody Seed")
pass # Replace with function body.