SFML community forums
Help => General => Topic started by: Flash619 on November 01, 2012, 03:46:42 pm
-
So I have come to the point in my engine, where I will need the user to input a string into a little box in the window. It seems I have two choices for this, either 1, I can try to create my own mini window and take a crash course on the win32 library functions to try to figure out how to implement and read from a basic text box. Or I can try to find some sort of Library such as Qt or WxWidgets, and use some of their build in functions for it.
Now having never done any three of the above options, I really was hoping to get some personal input on the subject, as to what you would recommend and possibly why. I do think making my own system for message box's and input would give much more custom control, but at the same time, it seems like a big chance for me to create a lot of inefficient/possibly unstable code because I have never used text box's before, ever. ^^;; The only popup experience I have is a win32 message box that accepts yes or no. >.>
So yes I would love to hear your input. Like I said if possible I would like to have the box within the window itself, and not another separate popup window. It would basically have two buttons and a text box. Let me know what you think, and huge thanks in advance! :)
-
I can try to create my own mini window and take a crash course on the win32 library functions to try to figure out how to implement and read from a basic text box. Or I can try to find some sort of Library such as Qt or WxWidgets, and use some of their build in functions for it.
Like I said if possible I would like to have the box within the window itself, and not another separate popup window.
Using an GUI library like MFC, Qt or WxWidget won't give you the possibility to have GUI elements on top of the OpenGL/SFML rendering (afaik), thus you can't really use those.
The 'easiest' thing would be to use the OS specific 'message boxes' (or Qt's equivalent), but this would then be a 'pop-up' window, which you don't want.
So this leaves you with the SFML/OpenGL GUIs, like SFGUI (http://sfgui.sfml-dev.de/) (gets my recommendation), TGUI (http://en.sfml-dev.org/forums/index.php?topic=7023.0) or basically anything that can implement an OpenGL renderer (e.g. GWEN (https://code.google.com/p/gwen/) or CEGUI (http://www.cegui.org.uk/wiki/index.php/Main_Page)).
Good luck! :)
-
I too recommend SFGUI.
-
I can try to create my own mini window and take a crash course on the win32 library functions to try to figure out how to implement and read from a basic text box. Or I can try to find some sort of Library such as Qt or WxWidgets, and use some of their build in functions for it.
Like I said if possible I would like to have the box within the window itself, and not another separate popup window.
Using an GUI library like MFC, Qt or WxWidget won't give you the possibility to have GUI elements on top of the OpenGL/SFML rendering (afaik), thus you can't really use those.
The 'easiest' thing would be to use the OS specific 'message boxes' (or Qt's equivalent), but this would then be a 'pop-up' window, which you don't want.
So this leaves you with the SFML/OpenGL GUIs, like SFGUI (http://sfgui.sfml-dev.de/) (gets my recommendation), TGUI (http://en.sfml-dev.org/forums/index.php?topic=7023.0) or basically anything that can implement an OpenGL renderer (e.g. GWEN (https://code.google.com/p/gwen/) or CEGUI (http://www.cegui.org.uk/wiki/index.php/Main_Page)).
Good luck! :)
This definitively looks interesting! I had never heard of it before, and it looks, amazing. o.o; Thanks a bunch! :D I'll update this later to tell how it went. ^_^
-
If you liked the old Steam gui(white text, dirty green window bar,dark grey background) you will love how SFGUI looks by default.
-
If you liked the old Steam gui(white text, dirty green window bar,dark grey background) you will love how SFGUI looks by default.
You forgot to mention that it also isn't that hard to theme the look of the widgets since it can be done without a single line of code. I also hate the steam look but I was too lazy to try to convince Tank to change it :D.
-
I love that look. ;D
Is there any written tutorial about creating own widgets(or about anything except hello world really..)?
I mean, source if fun to read:
// Get the font face that Laurent tries to hide from us.
// Authentic SFML comment: implementation details
// All your font face are belong to us too.
but some tutorials would be nice. :P
-
Is there any written tutorial about creating own widgets(or about anything except hello world really..)?
but some tutorials would be nice. :P
SFGUI comes with quite a few examples, that possibly show every single widget in use. Should be quite easy to extract the information from those with the help of the doxygen documentation.
-
Oh yes, I'm a genius and moved only .dlls onto this machine. :-X
-
I also hate the steam look but I was too lazy to try to convince Tank to change it
:o
Regarding the documentation: It's something that's seriously lacking in the project, true. The website contains some basic sections about the principles etc. However a good manual/guide is still missing. We're accepting contributions for that, too. ;)