Here is new code and output from system terminal:
http://s21.postimg.org/8pgs324ef/new_get_position.pnghere is code:
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(400, 400), "SFML window");
window.setFramerateLimit(60);
window.setPosition(sf::Vector2i(700, 400));
int curPositionX = window.getPosition().x;
int curPositionY = window.getPosition().y;
cout << "X: " << curPositionX << endl;
cout << "Y: " << curPositionY << endl;
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == sf::Event::Closed)
window.close();
}
// Clear screen
window.clear();
// Update the window
window.display();
}
return EXIT_SUCCESS;
}
There is no coincidence between 700x400 and 640x325 or there is ? Ide terminal is still 10 and 30.
~Cola