Need help with draw_set

D

Doooooli

Guest
I need some help! I have buttons with the draw event:

draw_self()

draw_set_halign(fa_center);
draw_set_valign(fa_middle);
draw_set_font(fnt_gameplay2);
draw_set_color(c_orange);

draw_text(x,y,text);

and it draws the text where i want (on the middle of the buttons)

but the problem is all my other text in the game get's affected by the valign and halign, but i don't have those script in their draw event! So how do i fix so my other obj/text isn't affected by the buttons draw script? thx!
 

jo-thijs

Member
Reset the values by using:
Code:
draw_set_halign(fa_left);
draw_set_valign(fa_top);
draw_set_font(-1);
draw_set_color(c_black);
 
D

Doooooli

Guest
Reset the values by using:
Code:
draw_set_halign(fa_left);
draw_set_valign(fa_top);
draw_set_font(-1);
draw_set_color(c_black);
So do i put that on my other text's draw events? also thx for fast response!
 

jo-thijs

Member
The least amount of work would be to put it at the end of the code you gave us,
but I'd personally put it in front of the draw_texts of other draw events.
Basically, you put this where you want to reset how the fonts are drawn to their defaults.
 
D

Doooooli

Guest
The least amount of work would be to put it at the end of the code you gave us,
but I'd personally put it in front of the draw_texts of other draw events.
Basically, you put this where you want to reset how the fonts are drawn to their defaults.
THANK YOU! <3
 
Top