I have a split view as the code will show below. the mouse seems to only be close to the rect displayed in the center and as it moves towards the edges it drifts farther from the rect. I'm thinking this is caused by the fact that the mouse uses the total window for it positioning but the draw function scales with the view??? is there a way to tie the mouse to a view.
sf::View tileView, mapView;
tileView.setViewport(sf::FloatRect(0, 0, 1.0f, 1.0f));
//tileView.setSize(100, DWIN_HEIGHT);
mapView.setViewport(sf::FloatRect(0, 0.074f, 1.0f, 1.0f));
//mapView.setSize(DWIN_WIDTH, DWIN_HEIGHT - (DWIN_HEIGHT/10) );
...
displayWindow.setView(tileView);
currentLevel->UpdateTileView(pWindow);
//display are map here
displayWindow.setView(mapView);
currentLevel->UpdateMapView(pWindow);
//event I'm using
case sf::Event::MouseMoved:
currentLevel->setTilePosistion(sf::Mouse::getPosition(displayWindow));
break;
// last but not least drawing the rect
sf::RectangleShape selector(sf::Vector2f(30, 30));
selector.setFillColor(sf::Color::Transparent);
selector.setOutlineColor(sf::Color::Black);
selector.setOutlineThickness(1.0f);
selector.setPosition((tileSelectedX), (tileSelectedY));
window->draw(selector);