Z
Zefyrinus
Guest
Note: I'm using GM 6.1. I know it's outdated, but because I started this game project using 6.1, I'm also going to finish it with it.
I think this topic has been posted about before, but I can't find anything relevant. Maybe I just don't know what keywords to search for.
Anyway, in my game the player has money which can maximally be $ 999 999 999 999. This figure is drawn on screen. But it's confusing if you see for example 100000000000 on screen, so it would be better if it was drawn as 100 000 000 000, with a space between each group of three digits. I have no idea how to go about programming this. Surely someone must've already come up with a solution for this?
Also, for it to look pretty in context of my game, the number needs to be right-aligned, and preceded by a $ in smaller size than the number. So the $ probably needs to be drawn as a separate string, but given that the number string is right-aligned and of variable length, how do I define the horizontal placement of the $ string so that it's always slightly to the left of the left edge of the number string?
I think this topic has been posted about before, but I can't find anything relevant. Maybe I just don't know what keywords to search for.
Anyway, in my game the player has money which can maximally be $ 999 999 999 999. This figure is drawn on screen. But it's confusing if you see for example 100000000000 on screen, so it would be better if it was drawn as 100 000 000 000, with a space between each group of three digits. I have no idea how to go about programming this. Surely someone must've already come up with a solution for this?
Also, for it to look pretty in context of my game, the number needs to be right-aligned, and preceded by a $ in smaller size than the number. So the $ probably needs to be drawn as a separate string, but given that the number string is right-aligned and of variable length, how do I define the horizontal placement of the $ string so that it's always slightly to the left of the left edge of the number string?