It's the text alignment. You must be setting it before you draw the text box that pops up but NOT before the HUD text, so the HUD text then gets the new alignment from the text box. By default text will be left aligned (which is what your HUD appears to be), but if you set it anywhere else, then all text will be drawn with the new alignment. So, basically, always add draw_set_halign() before drawing text.