Skip to content

When there is no image file available, shows a predetermined image instead crashing

License

Notifications You must be signed in to change notification settings

danialias/SafeSprite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SafeSprite for Axmol

This alternative to ax::Sprite avoids a crash when the requested file is not found, showing instead a predetermined image (HelloWorld.png by default).

Include the following files in your Source folder:

SafeSprite.h
SafeSprite.cpp

and use #include "SafeSprite.h" where needed.

Call it with auto mySprite = SafeSprite::create("myImage.png");

You can edit the predetermined image inside SafeSprite.cpp.

About

When there is no image file available, shows a predetermined image instead crashing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages