とりあえず、入力が正しいときに、文字を表示するところから始めたのですが、DrawFormatString関数でそのつど出力すると、文字列がずれてしまいます。
何かいい方法はないでしょうか。
以下、プログラムコードです。
#include "DxLib.h"
void Type_sora(){
char type[20] = "sora";
int White = GetColor(255, 255, 255);
DrawFormatString(10, 10, White, "次の文字列を打ってください");
DrawFormatString(10, 30, White, type);
while(1){
if(CheckHitKey(KEY_INPUT_S) == 1){
DrawFormatString(10, 50, White, "s");
break;
}
}
while(1){
if(CheckHitKey(KEY_INPUT_O) == 1){
DrawFormatString(20, 50, White, "o");
break;
}
}
while(1){
if(CheckHitKey(KEY_INPUT_R) == 1){
DrawFormatString(30, 50, White, "r");
break;
}
}
while(1){
if(CheckHitKey(KEY_INPUT_A) == 1){
DrawFormatString(40, 50, White, "a");
break;
}
}
}
DXライブラリも新・ゲームプログラミングの館で学び始めたばかりです。
よろしくお願いします。