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

Pages: 1 [2]
16
Graphics / Re: Sprite
« on: November 17, 2013, 12:37:46 pm »
I don't know what I've done wrong.
I've remade the example with minimum code and it work's fine ...

Thank you guys !

17
Graphics / Re: Sprite
« on: November 17, 2013, 12:09:28 pm »
the class is in another file.

if I declare in main a sprite and set the position to someVector, it change the position correctly.

18
Graphics / Sprite
« on: November 17, 2013, 11:37:08 am »
So I have my class :

class myClass{
private :
sf::Sprite my_sprite;
public :
void set_position( sf::Vector2f my_vector ) { my_sprite.setPosition( my_vector ); }
}

in main I have :

myClass class ;
sf::Vector2f someVector ;

someVector.x = (float) 50 ;
someVector.y = (float) 100 ;

class.set_position( someVector ) ;   //DOES NOT WORK. WHEN I DRAW THE OBJECT , THE POSITION IS STILL 0, 0

19
General / Re: resources
« on: July 29, 2013, 08:37:29 pm »
yes... I look so silly, like... almost all the time...
thank you very much, you are such a nice people...

20
General / Re: resources
« on: July 29, 2013, 07:11:52 pm »
I'm using windows and whrite the code in code::blocks using sfml 2.

21
General / Re: resources
« on: July 29, 2013, 07:04:01 pm »
I'm so sorry
I was totaly wrong.
I was thinking at somethig else when I was whriting the post.
It's not ram that is consuming, is CPU even with the smallest code that open a window.

22
General / resources
« on: July 28, 2013, 08:23:18 pm »
why the programas whrited in SFML consume lots of resources?
for example even a symple window consumes 40% RAM (I have 4GB).

23
Graphics / Re: sprites
« on: April 30, 2013, 05:46:01 am »
Well I find a solution to my problem that is so simple :
I've declared a pointer that is drawn last and every time I drag a shape, the pointer will contain the address of that shape.

24
Graphics / Re: sprites
« on: April 28, 2013, 08:31:05 am »
I'm sorry, I just dont know how to do it.
I cant just clear the window ...

Do you have any solution for me ? thank you

25
Graphics / Re: sprites
« on: April 27, 2013, 10:14:54 pm »
Yes, this must be it, thank you!

26
Graphics / Re: sprites
« on: April 27, 2013, 08:36:23 pm »
Yes I understand, but I've tried to redraw the first shape when dragging and it still got overlapped.


27
Graphics / sprites
« on: April 27, 2013, 07:56:43 pm »
So I have two sprites.

Window.draw(sprite1);
Window.draw(sprite2);

The problem is when I drag the first shape, over the second shape, the second shape overlaps the first shape.

I've tried to redraw the first shape when dragging but with no results.
I'm using SFML 2.

28
General / Re: mouse click's
« on: April 01, 2013, 02:38:05 pm »
Please give me that function if you know how to do it.This is all I need.Thank you !

29
General / Re: mouse click's
« on: April 01, 2013, 02:12:49 pm »
Read the tutorial and documentation about events.

Yes, I've done that and I still dont know how to do it.

30
General / mouse click's
« on: April 01, 2013, 01:11:07 pm »
Can anyone help me with a function that can count mouse left click's using SFML 2 ?
Thank you !

Pages: 1 [2]
anything