Hey all
Thats my second project and i am really new in all this,i study c++ for hobby.
Now to my problem if you can help me with documentation or advices will be apreciated
i use SFML obviously and this for animation
http://www.sfml-dev.org/wiki/en/sources/frame_anim_animatedi have an animation and i want to be able to click it with the mouse where ever will be.
for mouse click i use that :
if(events.Type == events.MouseButtonReleased && events.MouseButton.Button == sf::Mouse::Left)
if((input.GetMouseX()>=Tr.x && input.GetMouseX()<=Bl.x) && (input.GetMouseX()>=Bl.y && input.GetMouseY()<=Bl.y))
{
App.Close(); // thats just for testing to see that if actually works,but it doesnt
}
the coordination is right Tr stands for top right corner and Bl for bottom left
in main i have that
for(int loop=totalBalloons-1;loop>=0;loop--)
{
BALLOONS[loop].Move(0,yAxis);
topLeftCorner=BALLOONS[loop].GetPosition();
bottomRightCorner.x=topLeftCorner.x+50;
bottomRightCorner.y=topLeftCorner.y+65;
App.Draw(BALLOONS[loop]);
BALLOONS[loop].Update();
}
i am almost sure that the problem is that the animations are inside vectors .
so they share things,any suggestions?
thanks for your time