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

Pages: 1 [2] 3
16
Let's say we have the event handler with the

sf::Event event

and we are looking for

event.type == Event::MouseButtonPressed

and only if that is true, we are trying to find out which button is actually being pressed,

does it make a difference if we do

event.mouseButton.button == Mouse::Left

or

Mouse::isButtonPressed(Mouse::Left)

or are those identical in that situation?

17
Okay, sorry about that. I just didn't want to ask it there, because from my own experimentation everything else worked, but I just overlooked the const before the sf::Window.

Have a nice day!

18
Hi,

I am trying to understand std::functions, so I tried the following:

auto bp = sf::Mouse::isButtonPressed;

and that works fine.

I tried the something similar:

auto gp = sf::Mouse::getPosition;

and it gave me the error
unable to deduce 'auto' from 'sf::Mouse::getPosition'

when I switched
auto
to
std::function<sf::Vector2i(const sf::Window&)>

I got
error: conversion from '<unresolved overloaded function type>' to non-scalar type 'std::function<sf::Vector2<int>(const sf::Window&)>' requested

What am I doing wrong? I am sure, I am misunderstanding this whole concept, but I find it wierd, that the first one worked without a problem and the other one didn't. Is it because of the overload?

19
General / Re: Where do I get MinGW 6.1.0?
« on: October 06, 2016, 02:15:45 pm »
True. I have no idea how i missed that. Thank you!

20
General / Where do I get MinGW 6.1.0?
« on: October 05, 2016, 06:04:35 pm »
Hi,

since I got an error yesterday which resulted from the incompatablillity of my G++ version in MinGW (5.3.0) and the version SFML was made for (6.1.0), I updated my MinGW suite. I still have 5.3.0, though and I can't find the download for 6.1.0, so I wanted to ask where you got it from, to compile it for that version.

Thanks,
Kim

21
Hi!

I have installed cygwin with GCC. I have successfully compiled a few programs, so it works. But niw I wanted to compile my first SFML project. Which version do I have to download? And do I have to follow thesehttp://www.sfml-dev.org/tutorials/2.0/start-linux.php instructions or are there specific ones?

Thanks for your help!

22
Feature requests / Re: sf::Texture::Texture(std::string file)
« on: December 28, 2014, 09:43:49 am »
Okay, I did not think about that. But just be able to print an image in 1 or 2 liness would be nice (and without using too many variables).

23
General / Re: How to avoid "the white square problem"?
« on: December 28, 2014, 09:34:21 am »
I know C++, I just wanted to know if that's what I'm looking for, or does somebody have a better solution? I am not making the Project OOP yet, so everything is in main. The 2 vectors are declared at the top of main, the while loop if further down. But the texture doesn't seem to load into that vector, but strangely it sometimes does.

24
Oh, sorry and thanks!

25
General discussions / Where can I find the changelog for new SFML versions?
« on: December 27, 2014, 10:00:10 pm »
There is just a download for SFML 2.2, but no changelog. Where is it?

26
General / How to avoid "the white square problem"?
« on: December 27, 2014, 09:47:22 pm »
I am experiencing  "the white square problem" (http://www.sfml-dev.org/tutorials/2.0/graphics-sprite.php#the-white-square-problem). I have 2 std::vectors, one sf::Texture and one sf::Sprite, using that Texture. Both are being declared, the texture is being loaded from a file and the Sprite is using the texture, all in a while loop. So how am I supposed to make the texture last outside the while loop. what about
sf::Texture *tex = new sf::Texture
or something like that? I have never used that before and I don't really know what it does and how to use it. What is very strange, is that some Sprites work! the first 2 don't, but the third for example does. And some of the other sprites have wrong textures. But the vectors are being declared outside the loop, so I am able to draw and compile everything just fine.

Thank you for your help!

27
Feature requests / Re: sf::Texture::Texture(std::string file)
« on: December 27, 2014, 09:02:23 pm »
I would just like to be able to do


Code: [Select]
window.draw(sf::Sprite(sf::Texture("texture.png")));
or


Code: [Select]
window.draw(sf::Sprite(sf::Texture::loadFromFile("texture.png");
and maybe instead of an exception have a variable, like

Code: [Select]
bool sf::Texture::loadSuccess

28
Feature requests / sf::Texture::Texture(std::string file)
« on: December 23, 2014, 02:13:23 pm »
Please make a constructor, that has sf::Texture::loadFromFile(string file) built in.

Thank, you, SFML is great!  ;)

29
General / Re: sf::font::loadFromFile is spamming the console (Video)
« on: September 03, 2014, 01:20:02 pm »
No I didn't. When I do that The window doesn't even open. I built both versions in CMake and linked both of them too. there are 2 folders. A Debug and a Release one and I have linked them properly.

30
General / Re: sf::font::loadFromFile is spamming the console (Video)
« on: September 03, 2014, 12:39:53 pm »
Okay I tried it in release and it works. Very strange...

Pages: 1 [2] 3