Nov-24-2020, 01:51 AM
I tried changing the object's position with the center of get_rect () and I got a different result without using center and using center
My game screen size: 400, 300
This code changes the object to the center of the screen:
My game screen size: 400, 300
This code changes the object to the center of the screen:
text_rect_obj = text_surface_obj.get_rect() print(text_rect_obj) text_rect_obj.center = (200, 150) print(text_rect_obj)and this code creates the object close to the edge of the screen:
text_rect_obj = text_surface_obj.get_rect() print(text_rect_obj) text_rect_obj = (200, 150) print(text_rect_obj)my question is what does the center do and what is the correct position with coordinates 200, 150 at the edge of the screen or in the middle of the screen?