SFML community forums
Help => General => Topic started by: GamDev on September 22, 2017, 03:44:42 pm
-
Hello,
please tell me how can implement the selection with the mouse on the map,
in the photo selected area of 18x8 meters ?
I have tried:
sf::RectangleShape line[1] =
{
sf::RectangleShape(sf::Vector2f(64, 64))
};
line[0].setFillColor(sf::Color(100, 250, 50, 128));
EndMouseX = mouseX - StartMouseX + 1;
EndMouseY = mouseY - StartMouseY + 1;
line[0].setPosition(StartMouseX * 64, StartMouseY * 64);
line[0].setSize(sf::Vector2f(EndMouseX * 64, EndMouseY * 64));
sorry for bad english
-
Hi GamDev
Could you explain a bit more detailed what is what you need? I can“t understand this very well
If so, maybe I might give you a solution, but you would need someone to translate from C# to C++ ... or maybe someone directly writes the solution in C++
One thing by now, I don't know why you use a matrix (or array) of just one element
Your English is quite understandable for me, but not the concept ;)