Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Mouse Select  (Read 1435 times)

0 Members and 1 Guest are viewing this topic.

GamDev

  • Newbie
  • *
  • Posts: 29
    • View Profile
Mouse Select
« 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:
Quote
                            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

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Mouse Select
« Reply #1 on: September 28, 2017, 03:04:28 am »
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  ;)