Music to my ears.

This commit is contained in:
Haze Weathers 2025-03-11 01:12:28 -04:00
parent 884f49fed3
commit 1570f6986f
15 changed files with 168 additions and 25 deletions

View file

@ -2,6 +2,7 @@ extends EditorInspectorPlugin
const GlobalSoundSelector = preload("global_sound_selector.gd")
const GlobalMusicSelector = preload("global_music_selector.gd")
func _can_handle(object: Object) -> bool:
@ -9,8 +10,11 @@ func _can_handle(object: Object) -> bool:
func _parse_property(object: Object, type: Variant.Type, name: String, hint_type: PropertyHint, hint_string: String, usage_flags: int, wide: bool) -> bool:
if type == TYPE_STRING_NAME and hint_string == "global_sound":
add_property_editor(name, GlobalSoundSelector.new())
return true
else:
return false
if type == TYPE_STRING_NAME:
if hint_string == "global_sound":
add_property_editor(name, GlobalSoundSelector.new())
return true
if hint_string == "global_music":
add_property_editor(name, GlobalMusicSelector.new())
return true
return false