0
ヘルプ、私はゲームメーカーのスタジオを使用して新しく、ハートビーストチュートリアルのテキストボックスに従いますが、コードが同じでもテキストボックスはテキストを書きませんエラーメッセージも表示されません。ここでは最初の4行は、四角形を描画し、残りは長方形に合わせて文字列str
を操作し、私が見るものからコードゲームメーカーのスタジオのテキストボックスの書き込みエラー
// draw the box
draw_set_alpha(.5);
draw_roundrect_color(x, y, x+width, y+height, c_black, c_black, false);
draw_set_alpha(1);
// set the color to white
draw_set_color(c_white);
// line break
if (string_width(str) > width-padding-padding) {
// remove the space and replace with line break
message = string_delete (message, last_space, 1);
message = string_insert ("#", message, last_space);
ds_list_add(start, last_space+1);
}
// make sure we didnt reach the end of the message
if (count < string_length(message))
{
// are we at space, set last_space variable
if (string_char_at(message, count) == " ") {
last_space = count;
}
// increment count
count ++;
}
// did we go past the bottom? move up a line
if (string_height(str) > height-padding) {
line ++;
}
// grab the string
str = string_copy(message, ds_list_find_value(start, line), count-ds_list_find_value(start, line));