export_enum.gd 572 B

12345678910111213141516
  1. const Utils = preload("../../utils.notest.gd")
  2. @export_enum("Red", "Green", "Blue") var test_untyped
  3. @export_enum("Red", "Green", "Blue") var test_weak_int = 0
  4. @export_enum("Red", "Green", "Blue") var test_weak_string = ""
  5. @export_enum("Red", "Green", "Blue") var test_hard_int: int
  6. @export_enum("Red", "Green", "Blue") var test_hard_string: String
  7. @export_enum("Red:10", "Green:20", "Blue:30") var test_with_values
  8. func test():
  9. for property in get_property_list():
  10. if str(property.name).begins_with("test_"):
  11. Utils.print_property_extended_info(property, self)