How do I format a string, composed of a pre-defined string and a calculated integer? Let's say I need to display a value on statusbar, but I want the number to be preceeded by a number.
I have this code here used to display item weights in opened inventory bar:
Code: Select all
if (item.Mass > 0) {
DrawString(mYelFont, FormatNumber(item.Mass, 3, 5), (103 + 35*i, 38), DI_TEXT_ALIGN_RIGHT, Font.CR_GREEN);
}
All I need to know is how do defined the string to display 'W: 27'?
I just don't know how to define the string with pre-defined "W:" and the FormatNumber(item.Mass, 3, 5) following.
I'm little slow in this part and zscript offers toomuch possibilities on how to achieve this, so I'm asking for an advice on how to make this.