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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - 2ant

Pages: [1]
1
General / Need help compiling/building [UNSOLVED]
« on: February 25, 2015, 07:11:27 pm »
Hi,i would like to use sfml with sfgui.
If i understand correctly the last version of sfgui require me to build sfml from the git files first.

I manage to compile SFML-master with cmake gui with no errors.
I built the sfml project file with codeblocks and i chose install .

I dl glew-1.12.0-win32 and SFGUI-0.2.3-source.

I get this when i clic configure:



I indicate the glew include and glew library and i clic configure again and i get this:



I indicate the sfml folder that codeblocks created and i get this:



I am not very familiar with cmake so i don't know what to do now.

Should i rebuild sfml ? Is there any precompiled sfgui libs that can work with sfml 2.2 or sfml git ?

Please help the debutant that i am.

2
Graphics / Little questions/issue about view.move [SOLVED]
« on: February 24, 2015, 03:33:29 pm »
Hi,i'm learning both c++ and sfml and i did a simple camera movement with 4 keyboard keys.

sf::View view(sf::FloatRect(0, 0, 640, 360));

window.setView(view);

                if (sf::Keyboard::isKeyPressed(sf::Keyboard::S))//move the camera up
                {
                    view.move(0, -32);
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::X))//move the camera down
                {
                    view.move(0, 32);
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::W))//move the camera left
                {
                    view.move(-32, 0);
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::C))//move the camera right
                {
                    view.move(32, 0);
                }
 

My problem is that the camera move double the distance.

example : view.move(32, 0) will make the view/camera move 64 pixels to the right and not 32.

Is that normal ?
Why ?

3
General / Need a tiny little bit of help [Solved]
« on: February 20, 2015, 10:08:44 pm »
Hi, currently i display the position of a sprite in the titlebar for monitoring purposewith this code:

sf::Vector2f positioncurseur = curseur.getPosition();

std::string cursx = std::to_string ( positioncurseur.x );
std::string cursy = std::to_string ( positioncurseur.y );

title += cursx;
title += " ";
title += cursy;

It works well and give me this :



It annoy me since it is for a t-rpg with a grid so no decimals are needed.

Is it possible to remove the zeroes and the dot without too many lines of code ?

4
Window / Cursor position in title bar
« on: October 08, 2014, 06:42:52 pm »
Hi everyone, i'm new at using c++ and sfml.

I need to display the cursor position in the title bar next to the title.

I tried this :

sf::Vector2i position = sf::Mouse::getPosition(window);

    sf::String title ;

    title += position.x;
    title += position.y;

    sf::Window::setTitle(title);

My problem is that position.x and position.y give a int and i need to put them in a sf::String.

Can someone help me fix this.

Do you know another way to do it ?

Pages: [1]
anything