Relative Content

Tag Archive for c++sfml

SFML texture not displaying at the right location

I have a game in c++ using SFML library, if I press escape a menu should be drawn, for that i have a UI class, this class is drawn when I press escape so when the player opens the menu, for this UI i have a Button class that creates a button with a texture and a function to call when pressed, but my problem is that even though the button position is set to 0,0 the Sprite is somewhere around 200,200 but to call the function that the button should execute, I have to click at around 0,0? But the texture position isnt set to anything but the 0,0?
This is the button: