Jump to content
  • Advertisement
Sign in to follow this  
ukdeveloper

Cross platform messagebox?

This topic is 4705 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm wanting to know if there's any code or libraries which would allow me to make a cross platform Message Box? I need message boxes in my game to appear if a fatal error is encountered on failure to find crucial game data e.g. a bmp is missing from the data folder, or if SDL initialisation failed etc. I could use the usual Win32 MessageBox() function, but I want to be cross platform. Can wxWidgets do it, or is there another way? Thanks, ukdeveloper. EDIT: when I was editing the first sentence of this, I had access to ALL the post icons for some reason, The Matrix and Canadian flag included. I decided to keep out of trouble and stick to the usual ones.

Share this post


Link to post
Share on other sites
Advertisement
You could always find out the MessageBox calls on other systems and wrap your own, it can't be that hard, seeing as there isn't all that much functionality in Message Boxes. On the other hand, I personally think it would be wiser to simply log to a file, point the user to it, and exit. Or both, for bonus points [grin]

Share this post


Link to post
Share on other sites
Just about any cross platform GUI library should allow you to do this. The question is if you want the hassle of using these libraries. You might need to link statically to ensure that all users can run your game without installing the GUI library you are using. However, this will likely explode the executable's size.

I suggest that you just use the the console on unix systems a message box on Win32 systems.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!