-
Notifications
You must be signed in to change notification settings - Fork 26
Enum
Modar Nasser edited this page Jun 19, 2024
·
3 revisions
- Structs
const std::string ldtk::Enum::name
Name of the Enum.
const int ldtk::Enum::uid
Unique 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 -> bool
Returns 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 -> bool
Returns 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::name
Name of the EnumValue.
const ldtk::Color ldtk::EnumValue::color
Color of the EnumValue.
const ldtk::Enum& ldtk::EnumValue::type
Enum 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: Items
ldtk::EnumValue::hasIcon() const -> bool
Returns 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.