Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Hey,GetEvent without needing a Window variable?  (Read 3124 times)

0 Members and 1 Guest are viewing this topic.

Ion

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hey,GetEvent without needing a Window variable?
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Hey,GetEvent without needing a Window variable?
« Reply #1 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.
Laurent Gomila - SFML developer

Ion

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hey,GetEvent without needing a Window variable?
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Hey,GetEvent without needing a Window variable?
« Reply #3 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.
Laurent Gomila - SFML developer

Ion

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hey,GetEvent without needing a Window variable?
« Reply #4 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

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Hey,GetEvent without needing a Window variable?
« Reply #5 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.
SFML / OS X developer

 

anything