Sorry for the ackward title, but i don't know what to call it exactly. I'm looking for code or libraries that allow easy creation of commonly used user input devices, and code/libs that make gaming controls easy to set up (i'm using SFML and Box2D at the moment)

I don't want to re-invent things like buttons, arrows being placed wherever the mouse is located, and more game specific items such as "controls settings" or even being able to drag objects around with the mouse.

More specifically i want source code for interfaces that....

  • Makes Buttons and Textboxes easy to create
  • allows mouse input to press buttons or drag objects in games
  • has "Focuses" (like a textbox being able to gain focus and be typed in)
  • Is compatable with SFML/Box2D

and code for common game mechanics/controls that....

  • Allows easy setup of controls for a game
  • Makes events like clicking and holding on an object easy to setup, as so objects can be dragged around afterward

Are there any simple libraries or resources out there that i can use to avoid spending much of my time coding these now standard input devices/tecniques?


1 Answer 1


There are literally hundred of them out there. cegui is widely adopted. Look into libagar, antisphere & mygui as well.

Turska UI/Framework has built in support for SDL.

Have you looked into this list(SDL Libraries)?

There are too many to list, but a handful of them continues with regularity.

  • \$\begingroup\$ which one would you say is the easiest to work with? \$\endgroup\$
    – Griffin
    Jul 6, 2011 at 21:22
  • \$\begingroup\$ If you don't have any any problem with xml editor then go with cegui otherwise you can give it(Turska UI) a try. But, before adapting, give a test run. See if it suits you. \$\endgroup\$ Jul 6, 2011 at 21:51
  • \$\begingroup\$ do i need to port it to SFML? How would i go about doing this? \$\endgroup\$
    – Griffin
    Jul 7, 2011 at 3:20
  • \$\begingroup\$ @griffin CEGUI Tutorials \$\endgroup\$ Jul 7, 2011 at 4:04
  • \$\begingroup\$ oh i mean do i need to pport Turska sorry \$\endgroup\$
    – Griffin
    Jul 7, 2011 at 4:24

Not the answer you're looking for? Browse other questions tagged .