center image onscreen

Is there a cleaner way to do this than assigning a number of pixels and eyeballing it? Is there a way to set an image to stay centered regardless of the screen size (like how CSS can do this?) Thanks.
Hmm what do you mean? You set your own screen width in the settings. And you can put the picture origin as center. If you want to use script it's like Graphics.boxWidth/2 and Graphics.boxHeight/2
Might wanna round. You can set variables to those or use script to show pictures.
Hmm what do you mean? You set your own screen width in the settings. And you can put the picture origin as center. If you want to use script it's like Graphics.boxWidth/2 and Graphics.boxHeight/2
Might wanna round. You can set variables to those or use script to show pictures.
I don't understand this response. Please explain the process. Assigning the origin as center does not work as expected.
But your coordinates are 0,0? And the center goes to those coordinates.
If your game is 816*624 give coordinates 408, 312
Eyeballing? Why would you eyeball this? The center of your game window will always be width/2 and height/2?

Chose origin center(Which is the center of your image, not your screen of course) and use the coordinates that align with the center of your game window...
Please explain the process.
If you set the origin to center, then everything needs to focus on the center for it to work.
you cannot use top left coordinates for this.

Basically if set to center any picture will be centered on the coordinates given, no matter how large that picture is.
But to center the picture on the screen, you need to use the center coordinates of the screen as well - otherwise it will be centered on the origin point 0,0 and only a quarter of it will be visible.
Thanks for this feedback. Much better!

Original thread: https://forums.rpgmakerweb.com/threads/center-image-onscreen.183123/