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.


Messages - newbieg

Pages: [1]
1
Window / Re: Noob question about variables in Text()
« on: May 14, 2012, 10:25:27 am »
Sorry admin., I tried to delete this topic but got that error message, I'd appreciate it if you would remove it for me, thank you.

2
Window / Re: Noob question about variables in Text()
« on: May 14, 2012, 09:55:54 am »
Woops, solved that on my own, dumb mistake on my part.
I can't remove this post now, there's some sort of error message. sorry.

error message;
You cannot delete your own topics in this board. Check to make sure this topic wasn't just moved to another board.

Well, while I have you here, why isn't rect() working for me?
#include "SFML/Graphics.hpp"
#include <string>
#include <iostream>
using namespace std;
int main()
{
        string a = "hello", b="again";

    sf::RenderWindow window(sf::VideoMode(600, 200), "SFML works!");
    sf::Text text(a + b);


    while (window.isOpen())
    {
               
                sf::Text text(a + b);
                sf::Rect rect(20,30,200,80);
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(text);
        window.display();
    }

    return 0;
}

3
Window / Noob question about variables in Text()
« on: May 14, 2012, 09:47:50 am »
Hi everyone,
I just got SFML installed so I was playing around with the code that the tutorial provided, I was just wondering why this code only outputs variable a and not variables a+b;
#include "SFML/Graphics.hpp"
#include <string>
#include <iostream>
using namespace std;
int main()
{
        string a = "hello", b="again";

    sf::RenderWindow window(sf::VideoMode(600, 200), "SFML works!");
    sf::Text text(a + b);

    while (window.isOpen())
    {
               
                sf::Text text(a);
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear();
        window.draw(text);
        window.display();
    }

    return 0;
}
I was just trying to see if I could add strings together within text(), which I would need to do if I tried to make a game. Is it possible to do calculations inside of a function from SFML, or do I have to do the calculations first and only output the one variable that contains the result?

4
General / Re: Help with Installing SFML 2.0
« on: May 11, 2012, 10:42:47 am »
Heh, well, I copied and pasted to every file that could possibly make sense, so it works, WOOHOO!
I'd still like an answer to this question so I could get rid of all the extra copies where they aren't needed.
Thank you.

5
General / Help with Installing SFML 2.0
« on: May 11, 2012, 10:37:58 am »
So I have most of the install done for SFML 2.0 in Visual Basic C++, there's just one line in the tutorial that I don't understand;
Quote
Now compile the project, and if you linked to the dynamic version of SFML, don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is. Then run it

So I did link to the dynamic instead of the static Libraries, so where do I copy and paste the DLL's? Do I put them with my main files, or in the debugger file?
 I'm nowhere near turning this program into a  .exe executable yet, so do I put the DLL's in a different spot if I'm building and debugging?

6
SFML website / SFML 2.0 Error message
« on: May 10, 2012, 09:12:10 am »
Hi, I'm having trouble downloading SFML 2.0 for visual basic C++ 2010

The error message pops up right as the download completes:

Quote
C:\Users\Computer2\Downloads\SFML-2.0-rc-windows-32-vc2010.zip.part could not be saved, because the source file could not be read.

Try again later, or contact the server administrator.


Does anyone else experience this problem, or just my computer? I'm running with Windows 7 OS.

Pages: [1]