例えば スコア300という文字列があったとします。
スコアを白、300を赤としたいです。この場合私は二つのDrawFormatString関数を
使って設定していますが、ひとつの関数でまとめることは可能でしょうか?
よろしくお願いします。
文字の色
Re:文字の色
例えば、それを関数化して、
int MyDrawFormatString(int x, int y, const char *str, int score, int color1, int color2 ) { const int distance = 16; DrawFormatString(x, y, color1, "%s ",str); DrawFormatString(x+GetDrawStringWidth(str, 0xff)+distance, y, color2, "%d\n",score); return 0; }なんて書けます。