You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			28 lines
		
	
	
		
			653 B
		
	
	
	
		
			GDScript
		
	
			
		
		
	
	
			28 lines
		
	
	
		
			653 B
		
	
	
	
		
			GDScript
		
	
| @tool
 | |
| extends Cfg
 | |
| class_name AnimationSelectCfg
 | |
| 
 | |
| @export var sprite_frames: SpriteFrames:
 | |
|     set(value):
 | |
|         sprite_frames = value
 | |
|         notify_property_list_changed()
 | |
| 
 | |
| var animation_name: String
 | |
| 
 | |
| 
 | |
| func _get_property_list() -> Array[Dictionary]:
 | |
|     var hint_string: String = "none"
 | |
|     if sprite_frames:
 | |
|         hint_string = ",".join(sprite_frames.get_animation_names())
 | |
| 
 | |
|     var properties: Array[Dictionary] = []
 | |
|     properties.append({
 | |
|         "name": "animation_name",
 | |
|         "type": TYPE_STRING,
 | |
|         "usage": PROPERTY_USAGE_DEFAULT,
 | |
|         "hint": PROPERTY_HINT_ENUM,
 | |
|         "hint_string": hint_string
 | |
|     })
 | |
| 
 | |
|     return properties
 |