how to clear a text or change it

Heavybrush

Member
Hi, I have a problem trying to change a text generated by a for loop

///draw slots
draw_set_halign(fa_left);
draw_set_valign(fa_middle);
draw_set_font(fnt_damageinc);
draw_set_color(c_white);

var m;
for (m = 0; m < array_length_1d(saveload); m+=1) {
draw_text_transformed(x,y + (m * space) + 9,string(saveload[m]),1,0.2,0);
}

this draw a text for an array list of things

if(mpos == 0) {
draw_text(x,y + (mpos * space),string(saveload[0]));
}

this add a text well scaled when I am in a certain position, but doesn't clear the crunched text, I have to change the y scale of the text where I am, or to clear the previous crounched text
 
A

Aura

Guest
You'd want to do that inside the FOR loop perhaps.

Code:
var m;
for (m = 0; m < array_length_1d(saveload); m+=1) {
   if (mpos == 0) {
      //Draw special text
      continue;
   }
   draw_text_transformed(x, y + (m * space) + 9, string(saveload[m]), 1, 0.2, 0);
}
 
A

Aura

Guest
Glad I could help :3

Also, since the issue's been solved, you'd want to set the status of the topic as solved. To do that, go to Edit Title/Thread Tools >> Edit Title >> Set the topic prefix to Solved.
 
Top