void TileIsoHexa::setPosition(const int& X,const int& Y) { sf::Vector2f pos(mapCoordsToPixel(X,Y)); shape.setPosition(pos); if(sprite) sprite->setPosition(pos); };
sf::IntRect SquareIso::getTextureRect(int x,int y,float scale) { sf::Vector2f pos = mapCoordsToPixel(x,y,scale); sf::IntRect res(pos.x, pos.y, width * scale, height * scale); return res; }
Vector2i RenderTarget::mapCoordsToPixel(const Vector2f& point) const { return mapCoordsToPixel(point, getView()); }
void Window::setMousePositionView(sf::Vector2f pos, sf::View const& view) { sf::Mouse::setPosition(mapCoordsToPixel(pos,view)); }
void Window::setMousePositionMap(sf::Vector2f pos) { sf::Mouse::setPosition(mapCoordsToPixel(pos)); }
sf::Vector2f TileIsoHexa::mapCoordsToPixel(const sf::Vector2i& pos) { return mapCoordsToPixel(pos.x,pos.y); }