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

Pages: [1]
1
Graphics / Re: Transfer sfml from linux to windows
« on: April 24, 2017, 01:04:35 pm »
Thank  you very much for your answers !!

2
Graphics / Re: Transfer sfml from linux to windows
« on: April 23, 2017, 12:07:36 pm »
Hello,
Thank you for you answer,
I am not sure I understood everything I don't know much about Windows
 ("where to find SFML" ), does that mean they  have to install sfml  on their computer for it to work?
Also they insist on being able to compile with CodeBlocks so I won't be able to use CMake do you think that causes any issues?
 

3
Graphics / Transfer sfml from linux to windows
« on: April 22, 2017, 02:10:37 pm »
Hello Guys,
I have just finished working on a project with sfml on my linux.
I need to submit my code so that it will work on a windows platform.
My question is the following, what dll files do I need to add to my repositoy so that it will compile on a windows machine
without need of installing sfml?
I hope I was clear on the question and look forward for an answer,
Thank you for reading  !

4
Graphics / Re: Keyboard inputs with only console
« on: April 03, 2017, 10:40:25 pm »
OK ! It finally works thank you so much for you time  :)

5
Graphics / Re: Keyboard inputs with only console
« on: April 03, 2017, 08:56:22 pm »
Ok so I'll add a bolean to "simulate" the key released event do I get it right?
Thank you very much for your quick answer

6
Graphics / Keyboard inputs with only console
« on: April 03, 2017, 08:01:55 pm »
Hello everyone ,
So I am currently working on a project, it requires me to use only console and get the keyboard inputs in real time.
That implies that I have to handle keyboard inputs  but I don't have any window to do it.
The code is below now it compiles and all however I have a big problem whenever I press a key it counts as multiple keypresses.
(20 at least) obviously that's a big problem. I've looked around and saw the keyRepeatEnabled function however this requires a window that I don't want to use.
I hope to have been clear on my problem and you'll be able to bring a solution. How to get only one key press instead of multiple ones.
Best Regards,

void Player::player_mvt(Board &board) {
    while (!(sf::Keyboard::isKeyPressed(sf::Keyboard::Return) && board.getBoard(board.getBase().first,
                                                                                board.getBase().second).isTarget())) {
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Q)) {

                handle_mvt(board, std::make_pair(0, -1));
            break;
        } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Z)) {
            handle_mvt(board, std::make_pair(-1, 0));
            break;
        } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::D)) {

            handle_mvt(board, std::make_pair(0, 1));
            break;
        } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::S)) {
            handle_mvt(board, std::make_pair(1, 0));
            break;
        } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Return)) {
            std::cout << "Cannot move in this position" << std::endl;
        }
    }
}


7
Graphics / Re: Creating Sprite array from a single Sprite
« on: January 19, 2017, 11:19:16 am »
Hello Chaia,
Thank you for your answer I didn' t think about using the sf::Sprite::setTextureRect(...) to select the parts of the sprite I want...
The answer helped a lot I'll get to coding it now :)
Have a nice day !

8
Graphics / Creating Sprite array from a single Sprite
« on: January 18, 2017, 03:34:54 pm »
Hello everyone thanks for taking the time to read my post,
So I just started out with SFML, I finished coding a chess engine and I wanted to add some GUI to it.
I'm currently having quiet a lot of issues loading all my sprites from just one file which would contain all the figures dispaying features.
(So I'm planning on having a sprite array). I also have no idea, how to display them on a chess_board? How to get the positions etc...
I hope you can bring some light on these questions else thanks you for reading and trying to help I hope my questions were clear enough
Thank you !

Pages: [1]