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 - Khaos

Pages: [1]
1
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 26, 2012, 12:32:14 am »
find a setting in codeblocks to change from make to mingw32-make

This worked!

ok, now I think we are down to the last problem. I assume this is because of the SFML version I am using.

Quote
'BackSpace' is not a member of 'sf::Keyboard'|

I am using SFML 2.0 RC. Should I change these lines to anything?

EDIT: Changed all instances of BackSpace to Back and it compiled! I think I can finally get it up and running.

Thanks a bunch!

2
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 25, 2012, 05:15:35 am »
I installed a stand alone version of MinGW and that worked with CMake. I assume it was because my MinGW was located in C:\MinGW.

Now when I try to build the project (install) I get this.


Quote
-------------- Build: install in tgui ---------------

Using makefile: Makefile
Execution of 'make.exe -s -f Makefile install' in 'C:\sfml\TGUI\build' failed.
Nothing to be done.

At least I made progress. Where should I proceed from here? Thanks.

3
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 24, 2012, 06:32:59 am »
http://i.imgur.com/RUUsy.png

I am a novice when it comes to cmake. At first I had an issue with finding the CMAKE directory so I changed it to the mingw located in Code::Blocks

Now I can't get past this. I have just recently dove into stuff like this and am not quite sure what it's looking to fix.

Thanks for any help.

4
SFML projects / Tic Tac Toe
« on: May 23, 2012, 04:50:20 am »
Here's the Tic Tac Toe app: http://d.pr/f/gh1L

Credit goes to EnigmaticFellow (http://en.sfml-dev.org/forums/index.php?topic=6953.0) for supplying the Grid, X, and O images.

I used none of the code from that project, but the images supplied in that pack were too perfect to pass up.

Source Code: http://pastebin.com/Q6gAbHwV

I supply the source code in hopes that it will help many beginners learn the basics.

Enjoy!

5
Graphics / Re: How to draw a sprite on top of another?
« on: May 23, 2012, 04:47:35 am »
Nevermind, I figured everything out.

Here's the Tic Tac Toe app: http://d.pr/f/gh1L

Credit goes to EnigmaticFellow (http://en.sfml-dev.org/forums/index.php?topic=6953.0) for supplying the Grid, X, and O images.

I used none of the code from that project, but the images supplied in that pack were too perfect to pass up.

Source Code: http://pastebin.com/Q6gAbHwV

Enjoy!

6
Graphics / Re: How to draw a sprite on top of another?
« on: May 23, 2012, 12:29:19 am »
The thing is, its going to be tic tac toe game. I wanted to load the background (bgs) and afterwards every time someone clicks a certain area, an x or o appears. Wouldn't the bgs not display until after xturn ends?

7
Graphics / How to draw a sprite on top of another?
« on: May 23, 2012, 12:13:00 am »
    while (window.isOpen())
    {
        //Processes events
        sf::Event event;

        //Fills Event with data
        while(window.pollEvent(event))
        {
            switch(event.type)
            {
                case sf::Event::Closed:
                window.close();
                break;
                default:
                break;
            }
        }
        window.clear();
        window.draw(bgs);
        window.display();
        xTurn();
    }

void xTurn()
{
    bool xturn = true;

    while(xturn)
    {
    if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
    {
        sf::Vector2i mousePosition = sf::Mouse::getPosition(window);

        if((mousePosition.x < 200 && mousePosition.y < 200)
               && sf::Mouse::isButtonPressed(sf::Mouse::Left))
           {
        X.setPosition(25, 20);
        window.draw(X);
        std::cout << "hi";
        xturn = false;
           }

    }
    }

There's part of my main method and my whole xTurn code. Essentially when you left click, I want the sprite X to be printed. Also, that buttonispressed seems to activate multiple times (hi prints out 30+ times as opposed to just once).

How do I go about doing this?

Thanks.

Pages: [1]
anything