Howto open child window with SDL?

Started by
6 comments, last by some_n00b 17 years, 2 months ago
Hello. I want to open child window, i mean for example like RPG games when u press FOR EXAMPLE shift+i it will open new window, your inventory, shift+s open new window your status and etc. How can i do it with SDL?

I would love to change the world, but they won’t give me the source code.

Advertisement
I am fairly certain you cannot use SDL to open a "Windows" child window with the title bar, buttons etc.

The best way to go about this would probably be to whip it up from scratch. You will have to render the border, background, title bar, and contents yourself. Then give it a mechanism for communcating with the main application. It could get really complicated depending on how much you need from it.
This isn't really supported with SDL, I believe.

Though I am pretty sure I have herd that there is a hack to open multipule windows. Though I really doubt you would really want to hack.


Chad.
If you mean an in-game window, there are GUI libraries for SDL like guichan or ParaGUI that will help you out. See a larger list on the main SDL site.
0xa0000000
Jack Sotac Yes i mean in game windows.
What library you suggest? What is more suitable with SDL?
Thanks again

I would love to change the world, but they won’t give me the source code.

Sorry I haven't worked with any of those libraries, I just know about them :) Guichan looks interesting though. I would suggest using the library that is easiest for you to use and fits with your existing code. Try them all since there're free:)

Good Luck.
0xa0000000
Ok thanks I'll try them :) Anyway Guichan looks better :)

I would love to change the world, but they won’t give me the source code.

Hi, Minios.

This isn't possible with SDL to open native child window, but you can implement your own menu system that best suits your game, or you can use already developed system, like agar:
http://sourceforge.net/projects/agar

good luck! :)

This topic is closed to new replies.

Advertisement