Add editor warnings to ButtonSelection
This commit is contained in:
		
							parent
							
								
									e72698ffcd
								
							
						
					
					
						commit
						b4772546b3
					
				| @ -16,7 +16,14 @@ var item_count: int: | |||||||
| 		return _button_group.get_buttons().size() | 		return _button_group.get_buttons().size() | ||||||
| 
 | 
 | ||||||
| func _get_configuration_warnings() -> PackedStringArray: | func _get_configuration_warnings() -> PackedStringArray: | ||||||
| 	return PackedStringArray() | 	var warnings := PackedStringArray() | ||||||
|  | 
 | ||||||
|  | 	for child in get_children(): | ||||||
|  | 		warnings.append( | ||||||
|  | 			"ItemSelection can only have children of type Button, but {0} is of type {1}".format( | ||||||
|  | 				[child.name, child.get_class()])) | ||||||
|  | 
 | ||||||
|  | 	return warnings | ||||||
| 
 | 
 | ||||||
| ## | ## | ||||||
| ## Adds a new item with no text and only [code]icon[/code] as the icon to the selection. | ## Adds a new item with no text and only [code]icon[/code] as the icon to the selection. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user