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

Pages: [1]
1
Graphics / Re: View and rectangle "hitbox" problem
« on: February 05, 2021, 01:48:28 pm »
Ok thank you, i had to read your reply ten times  but i did it. :)

2
Graphics / Re: View and rectangle "hitbox" problem
« on: February 05, 2021, 11:43:58 am »
Ye but how can i do that? when i am doing that:

sf::Vector2i pixelPos = sf::Mouse::getPosition(app);
sf::Vector2f worldPos = app.mapPixelToCoords(pixelPos);

nothing happen. I added that line:
button.setButtonPosition(worldPos.x,worldPos.y);
but now my button is always at cursor position

3
Graphics / View and rectangle "hitbox" problem
« on: February 05, 2021, 10:12:26 am »
Hey, i have really confusing problem. i have just created a button class, and it work fine but when i use view move() method button is moving, but click hitbox is still staying in the same position. I am new at sfml and i have no idea how to solve it.

In the attachment are class .h, .cpp files and main.cpp file.

Help ;c

PS: Sorry for my English

Pages: [1]