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

Pages: 1 ... 222 223 [224]
3346
Graphics / Re: RenderWindow doesn't clear
« on: February 07, 2014, 01:54:50 pm »
If you're not going to manage game states as eXpl0it3r suggested (you should) then you should at least take the showLogo() and sleep functions out of the main loop ;)

3347
Graphics / Re: Does anyone use the built in sf move function?
« on: February 07, 2014, 01:47:33 pm »
move() irks me. what's it doing there..? a little blemish on an otherwise perfect library. ;D
It makes more sense to use:
object.move(offset);
than:
object.setPosition(object.getPosition() + offset);

3348
Graphics / Re: Does anyone use the built in sf move function?
« on: February 07, 2014, 01:21:52 am »
I use the move function for a simple drop-down shadow function.

3349
Graphics / Re: Circular movement
« on: February 07, 2014, 01:15:36 am »
st would be the speed of rotation, not the speed of movement.
If it's turning too quickly, divide st by n or - as Azaral suggested - convert to radians.
If it's moving (changing position) too quickly, you'll need to divide sx and sy by n.

n, in this case, is dependent on your computer's speed. It would be trial and error. If you wanted to be able to multiply by a speed variable, you'd need to divide by a higher number.

3350
Window / Re: Window does not activate if you click inside it
« on: February 02, 2014, 09:14:32 pm »
But not in the current release?
I'm new and I've been using C++ and SFML for only a few days after I had to build it from the source code myself. I found that this workaround temporarily fixes the problem until the latest version has the proper fix.

That said, I have no idea what github is.

3351
Window / Re: Window does not activate if you click inside it
« on: February 02, 2014, 08:19:37 pm »
I'm sorry for resurrecting an old thread; I believe it's still relevant, however, as the problem still exists. (I'm aware that this is being fixed in the library)

I ended up on this thread because I was having this problem too. I came back because I found a simple workaround. It may be bad practice but it seems to work until the fix is applied.

This is for Windows only. You'll also need to
#include <Windows.h>

If, in your main loop, you put the code:
SetForegroundWindow(renderWindow.getSystemHandle());
with "renderWindow" being your RenderWindow object, it should allow you to click the client area to refocus the window. Oddly, it doesn't actually set the focus of the window or activate it by itself as it is supposed to.

I hope this helps for now. I'm looking forward to the new version of SFML (hopefully with a VS2013 build as my build seemed to fail at creating debug libraries :( )

Pages: 1 ... 222 223 [224]
anything