Allow for sprite's Blend Mode to be updated programmatically
- Dominant language
- C++
- Stars
- 6.3k
- Forks
- 455
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 129
Description
**Is your feature request related to a problem?**
I would like to change the Blend Mode of sprites programmatically.
Context: We have a lot of decals in our game, that we place using our custom level loader and I now have a "Decal" type, a "Screen Decal" type and a "Multiply Decal" type. Instead of a decal type with a Blend Mode property.
I can also imagine sprites changing Blend Mode based on game logics (e.g. Ghosts in Pacman changing appearance).
**Describe the solution you'd like:**
I would like to be able to change the Blend Mode of an instance of the sprite component of a game object:
```lua
msg.post(sprite_url, "blend_mode", sprite.BLEND_MULTIPLY)
```
or:
```lua
sprite.set_blend_mode(sprite_url, sprite.BLEND_SCREEN) -- like gui.set_blend_mode
```
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.