ModalAlert – The Cross Platform AlertView alternative for Cocos2D-x/

When starting games development many a year ago, I discovered that using the default iOS alert views in a game I carefully crafted looked rather amateurish and didn’t suit the feel of the app I’d produced at all! And, as I wanted my games to look somewhat decent, I decided that I wasn’t going to have that! I had a look around, and discovered this post (, where someone had created a custom alert view class which I could use in my game.

Yaay! Story over… right?…


I rewrote quite a bit of it when I first played around with it and trimmed some parts out I didn’t like, and as time went on more and more edits were done to it – the first rewrite. It was made compatible with Cocos2d-objc v3 for some future projects – the second rewrite, and was then converted over to C++ for use in Cocos2d-x – the third rewrite! I decided that some others may find this rather useful, so I’ve decided to open source the entire thing here ( for everyone to use if they want to! I’m still in the process of learning C++, so it may not be the most efficient or the best written class, but it works well enough for me and the animations look cool! 😀

For more of the technical information, check it out over at GitHub (!

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s