To scale the shapes evenly, you can use the sf::Transformable::setScale method, which takes two parameters: the horizontal and vertical scale factors. If you want to scale the shapes uniformly, you can pass the same value for both parameters. For example, if you want to scale the shape by 50%, you can do:
geometry dash
shape.setScale(0.5f, 0.5f);
You can also use the sf::Transformable::scale method, which takes the same parameters, but scales the shape relatively to its current scale. For example, if you want to scale the shape by 50% of its current size, you can do:
shape.scale(0.5f, 0.5f);
You can use the sf::Keyboard::isKeyPressed method to check if a key is pressed, and then apply the scaling accordingly. For example, if you want to scale the shape by 50% when the control key is pressed, you can do something like this:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::LControl))
{
shape.scale(0.5f, 0.5f);
}
To move all selected movers relatively, you can use the sf::Transformable::move method, which takes two parameters: the horizontal and vertical offset. This method moves the shape by the given offset, relative to its current position. For example, if you want to move the shape by 10 pixels to the right and 5 pixels down, you can do:
shape.move(10.f, 5.f);
You can also use the sf::Transformable::setPosition method, which takes the same parameters, but sets the absolute position of the shape. For example, if you want to move the shape to the position (100, 50), you can do:
shape.setPosition(100.f, 50.f);
You can use the sf::Mouse::isButtonPressed method to check if a mouse button is pressed, and then use the sf::Mouse::getPosition method to get the current position of the mouse cursor. You can then use the difference between the current and previous mouse positions to calculate the offset to move the shape. For example, if you want to move the shape by dragging the left mouse button, you can do something like this:
if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
sf::Vector2i mousePos = sf::Mouse::getPosition(window);
sf::Vector2f offset = mousePos - prevMousePos;
shape.move(offset);
prevMousePos = mousePos;
}
I hope this helps you improve your program