2017-07-13 6 views
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)); 

答えて

0

です。 しかし、draw_text(x, y, str);のようなものはありません。私はいくつかの値を使ってコードを初期化してから、矩形にstr(テキスト)を描くことができました。 そうでない場合は、オブジェクトの変数テーブル全体、または実際に文字列を描く方法を含むこのオブジェクトの描画イベントコードを送信する方が良いと思います。

関連する問題