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 (https://rombosblog.wordpress.com/2012/02/28/modal-alerts-for-cocos2d/), 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 (https://github.com/ryanbourneuk/ModalAlertCocos2d-x) 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 (https://github.com/ryanbourneuk/ModalAlertCocos2d-x)!