Sign in to follow this  

SDL interface windows

This topic is 2836 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

I was wondering, instead of wrecking my nerves and trying to make a input place inside the GUI window of SDL, isn't there a possibility of opening up a 1)GUI application window(for anything that is displayed) 2)and a console application window(you know the DOS window) for input Where i am trying to get with my story is to link those 2 windows so everything i command can be inputted into the DOS window and the result would be seen in the GUI window [The reason i'm asking is that i have had some frustrating experiences with input in SDL :D ]

Share this post


Link to post
Share on other sites
You can always write and read from standard input and output. I don't know how to get a console exactly, but I know that if you are using gcc and do not use the -mwindows switch (or whatever its been changed to in gcc 4) than it will show a command line window by default. If you're using Visual Studio, maybe it gives you a console..? I dunno. I've only used VS & C++ to make a DLL for MSI.

SDL is not a GUI toolkit. You can use one though. FLTK works well enough. There's GTK. There's GTK 1. There's Win32 and MFC or whatever they use now (???). Go explore.

There are GUI toolkits _for_ SDL which paint into the SDL window.

Personally I wrote my own. Because its fun.

The core idea is that you have an event loop which listens to mouse events and dispatches events to objects like button objects which handle those events however they see fit. They also paint themselves.

There are consoles for SDL, kinda like the Quake console. That might be what you're looking for.

Depending on exactly what you're making, you could use a UNIX system like Mac OS X or Linux so that you can launch an app from the command line and have access to a console simple as that.

Its not appropriate to ask a user to switch to Linux, but its not appropriate to use a console window in a consumer product either so that might be perfectly reasonable for you at this point.

MingW32 might let you do the same thing in Windows, but I haven't tried it.

You can also just listen to key presses for simple debugging controls if that's what you're after.

Think about these options and which ones fit your specs. Feel free to ask for help with any particular method.

Share this post


Link to post
Share on other sites
Quote:
[The reason i'm asking is that i have had some frustrating experiences with input in SDL :D ]
What version of SDL are you using, and on what platforms did you run into problems? Also, what kinds of problems did you encounter?

Share this post


Link to post
Share on other sites

This topic is 2836 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this