-
Notifications
You must be signed in to change notification settings - Fork 31
Enum
Modar Nasser edited this page Jun 19, 2024
·
3 revisions
- Structs
const std::string ldtk::Enum::nameName of the Enum.
const int ldtk::Enum::uidUnique identifier of the Enum.
ldtk::Enum::operator[](const std::string&) const -> const ldtk::EnumValue&Returns the EnumValue matching the provided name.
If no EnumValue is found, an invalid_argument exception is thrown.
ldtk::Enum::hasIcons() const -> boolReturns true if the Enum has icons, returns false otherwise.
ldtk::Enum::getIconsTileset() const -> const ldtk::Tileset&Returns the Tileset used by this Enum's icons.
Inherited from TagsContainer
ldtk::Enum::hasTag(const std::string&) const -> boolReturns true if the Enum contains the given tag, returns false otherwise.
Inherited from TagsContainer
ldtk::Enum::allTags() const -> const std::vector<std::string>&Returns a vector containing all the tags in the Enum.
const std::string ldtk::EnumValue::nameName of the EnumValue.
const ldtk::Color ldtk::EnumValue::colorColor of the EnumValue.
const ldtk::Enum& ldtk::EnumValue::typeEnum object owning this EnumValue.
Allows to access the name of the Enum, for example :
const auto& enum_value = project.getEnum("Items")["SilverSword"];
std::cout << enum_value.type.name;
// output: Itemsldtk::EnumValue::hasIcon() const -> boolReturns true if the EnumValue has an icon, returns false otherwise.
ldtk::EnumValue::getIconTileset() const -> const ldtk::Tileset&Returns the Tileset of the icon.
ldtk::EnumValue::getIconTextureRect() const -> const ldtk::IntRect&Returns the texture rectangle of this EnumValue's icon.