SFML community forums

General => SFML projects => Topic started by: vaironl on December 14, 2012, 05:43:10 am

Title: Embarrassing Project
Post by: vaironl on December 14, 2012, 05:43:10 am
Hello again Everyone,

As few of you know I'm new to SFML and relatively new to c++. With some previous experience in java.
I'm learning c++ through book reading and console applications.

But today while reading I seriously felt like I wanted to add some color to my progress, and I took all advice I was given aside and started to program in SFML. I din't try to go into the complicated stuff or anything like that... rather I tried porting one of my console applications into a GUI application. Sadly I only got to do rectangles,text labels, and images. I feel that for my very first application, following only documentation and no tutorials, I did somewhat well... it's really basic stuff so please don't laugh at me.

Here's a picture of the screen.

(http://img213.imageshack.us/img213/8430/myfirstsfml.jpg) (http://imageshack.us/photo/my-images/213/myfirstsfml.jpg/)
Title: Re: Embarrassing Project
Post by: Lo-X on December 14, 2012, 01:43:08 pm
Is your application purely GUI ?
If yes I think SFML is not the best library for you...
Title: Re: Embarrassing Project
Post by: vaironl on December 14, 2012, 05:15:24 pm
Is your application purely GUI ?
If yes I think SFML is not the best library for you...

Well.. yes and no.
As I said this application is a console application made so I can learn c++ itself. I'm just trying to make a GUI to add some visual to it (although it's not required).
I want to learn SFML to make games.
Title: Re: Embarrassing Project
Post by: Haikarainen on December 14, 2012, 06:53:32 pm
Creating a GUI-system is actually a great practice for learning both C++ as well as a simple library like SFML. Create "widgets" in classes like TextInput boxes, Labels, Buttons etc, in a way that makes them reusable.
Title: Re: Embarrassing Project
Post by: vaironl on December 15, 2012, 03:49:20 am
Creating a GUI-system is actually a great practice for learning both C++ as well as a simple library like SFML. Create "widgets" in classes like TextInput boxes, Labels, Buttons etc, in a way that makes them reusable.

 :o... When I was searching the sfml docs I din't find any textinput options... I guess I din't try hard enough.
Title: Re: Embarrassing Project
Post by: Haikarainen on December 15, 2012, 04:46:25 pm
Creating a GUI-system is actually a great practice for learning both C++ as well as a simple library like SFML. Create "widgets" in classes like TextInput boxes, Labels, Buttons etc, in a way that makes them reusable.

 :o... When I was searching the sfml docs I din't find any textinput options... I guess I din't try hard enough.

You'll have to create them for yourself. Take a look at EventHandling, sf::Event etc. It's all there ;)
Title: Re: Embarrassing Project
Post by: Nexus on December 15, 2012, 05:21:45 pm
Or use an existing GUI library for SFML, such as SFGUI or TGUI.