SFML community forums

Help => Window => Topic started by: Ion on November 21, 2008, 06:46:06 pm

Title: Hey,GetEvent without needing a Window variable?
Post by: Ion on November 21, 2008, 06:46:06 pm
Hey,I just started out with SFML and i think its great and easy to use.Though i have a problem,I dont know how i would make a UI with SFML so i want to make a textline application.But,I need to know how i can get a event without needing a Window variable.

Note that if it is a very easy solution.Im new to this
Title: Hey,GetEvent without needing a Window variable?
Post by: Laurent on November 21, 2008, 07:18:58 pm
An event always happens in a window, your request doesn't make sense. If there's no window there's no event. And SFML doesn't give access to console or global events like key presses.

Anyway, how would you use SFML without a window ? What would you do ? You can only use the system and network packages, and those don't need any event.
Title: Hey,GetEvent without needing a Window variable?
Post by: Ion on November 21, 2008, 08:00:58 pm
How would i then get a keypressed without using cin.get() which WAITS for input? Or,You could tell me if there is a way to make buttons,fields etc. in sfml.Maybe i need to use something else? Then what do you recommend.

Note that im new.
Title: Hey,GetEvent without needing a Window variable?
Post by: Laurent on November 21, 2008, 08:14:49 pm
Why do you need to get non-blocking input in a console ? I really don't get what you're trying to do.

To make a GUI in SFML, you can use any existing library based on OpenGL (guichan, cegui, ...). There are some tutorials on the wiki.
Title: Hey,GetEvent without needing a Window variable?
Post by: Ion on November 21, 2008, 08:19:09 pm
Okay,im making a login system which will take from a MySQL database by sending packets.The thing is i dont want it to be procedural.So i want a updating screen which when a certain button is pressed.For example:L which will launch the login function etc.etc.

Okay i will read those tutorials
Title: Hey,GetEvent without needing a Window variable?
Post by: Hiura on November 21, 2008, 08:35:08 pm
If you're not using a sf::Window you won't find tools for that in the SFML.