Mysterious Bitmap Alignment

This has stumped me for longer than I'd like to admit, even if I'm still new at js. I created a window class for the menu called Window_Alert. It's supposed to have a custom image in the center of it. When I first enter the menu, the image is on the right side of the window, but if I exit out and return to it again, it will always be in the center of the window like I originally wanted. I played around with the code for hours and still don't know how it's doing this or how I can fix it so the image is in the center of the window the first time like every other time. Any help would be more than appreciated since I have a lot more work to do on this and a stubborn problem like this doesn't make me feel confident enough to finish making the other windows I need. the code where I think the problem lies is here: https://gist.github.com/anonymous/e6bab0aae2e22c62846c3ab80eac4ce9
Hi!


Could not test but try this.
I didn't notice a change for me but I really appreciate all the effort! I also liked how you streamlined it since mine was pretty sloppy. I'm going to try out your code in another project in case somehow other parts of the plugin or other plugins in general are causing this.


EDIT: Actually, it seemed to behave the same way in a brand new project too. Now it's really spooky.
Weird...


Check this one


Also, could not test cause i'm at work.


EDIT: check again, i forgot to add the update function.
Oh my goodness I love you. It was the update function that I needed the whole time. Thank you so much I never would have remembered to implement that on my own.
haha thought so, it took me a time to remember xD

Original thread: https://forums.rpgmakerweb.com/threads/mysterious-bitmap-alignment.66510/