Colored font

hey GMC! So I'm trying to display text in my game, already have that down, and I have the font set to one of the preset colors, but I was wondering if there's a way to set font color using the rbg color code function?
 

jo-thijs

Member
Yup, make_colour_rgb(RRR, GGG, BBB) does that.
Or if you like hexadecimal notation, you can use $BBGGRR.
 
@jo_thijs So how would I do that?

Currently I have:
if room != rm_win {
draw_set_font(font_1);
make_color_rgb(19, 22, 18);
draw_text(x-110, y+923, "Torchlight: " + string(showTime));
}

Seems to not register and makes the text white by default
 
make_color_rgb(19, 22, 18);
should be
Code:
draw_set_color(make_color_rgb(19, 22, 18));
Edit: You probably want to set your color back to white afterwards with draw_set_color(c_white). The draw color is a sort of global variable that will affect all your instances when you manipulate it (so, if you draw a line in another instance, it will be the color of whatever draw_set_color was last).
 
M

maggot9779

Guest
You can also set it to a variable like: puke_green = make_color_rgb(123, 138, 85); then you can just do draw_set_color(puke_green);
 
Top