Cannot center my top numbers with rest of written characters
hey all trying to make a minesweeper game, but I cannot seem to center the X number key above the characters, any help would be greatly appreciated, here;s the function
9 Replies
its worth noting that below each is a whitespace, then a character (if nothing there then its just another whitespace)
Ok I actually found a fix really fast, just added another whitespace, and shorted the space between the double digits after 9
here is the fixed version if anyone is wondering
The real solution would be to use a monospaced font
I personally dont know how to change the font in the console
Sure, but I wouldn’t try to match a variable width font, it’ll break on another user’s system if the widths are different for their font
Oh, interesting, I thought the font was just constant, is there a way in the code itself to change the font, or would I have to add another resource
Yes, and also consider the width of your columns
You have 1 and you have 10
Make sure the width is consistent
01 and 10 (or space + 1)
Yea, right now I have it as
if less than 10
{" # "}
if more than 9
{" #"}
Formatting should allow you to do fixed with automatically
See string.format