(Mods, feel free to move this message or let me know if it belongs somewhere else.)
Because the text centering thing has been driving me crazy (and I like my variable-width fonts, dangit! XD), I started hacking DrawText alignment options into BizHawk. I don't even know the first thing about using git, and haven't even coded in C# until tonight -- I just downloaded a zip of the source code from GitHub and started poking at it.
In the version I've been working at tonight, I added two parameters to DrawText. The first is "horizalign" (horizontal alignment), which can be either "left" (default), "center", or "right". The second is "vertalign" (vertical alignment), which can either be "bottom" (default), "middle", or "top". Left at their defaults, DrawText works exactly as it does now. But as an example, I generated this overlay:
with this lua script:
Language: lua
while true do
gui.drawLine(80,0,80,240,"white")
gui.drawText(80,10,"Left-Aligned Text","white","black",10,"Munro","regular")
gui.drawText(80,20,"Centered Text","white","black",10,"Munro","regular","center")
gui.drawText(80,30,"Right-Aligned Text","white","black",10,"Munro","regular","right")
gui.drawLine(0,80,240,80,"white")
gui.drawText(0,80,"Top Text","white","black",10,"Munro","regular","left","top")
gui.drawText(50,80,"Middle Text","white","black",10,"Munro","regular","left","middle")
gui.drawText(120,80,"Bottom Text","white","black",10,"Munro","regular","left")
emu.frameadvance()
end
event.onexit(function ()
gui.clearGraphics()
end)
The alignment isn't quite right yet, because it's depending on the coordinates that draw the text backgrounds, and those also seem to be off. (This has the same behavior in release 1.12.0.) If I fix this so the alignment works properly, I'll upload my changes somewhere so they can hopefully be brought into BizHawk officially, if there'd be any interest in that.