Fandom

Game Maker

Draw text color

281pages on
this wiki
Add New Page
Talk0 Share

This function will draw text in a similar way to draw_text only now you can choose the colors to use for coloring the text as well as the alpha value, and these new values will be used instead of the base drawing color and alpha. NOTE: Gradient blending is not available for the HTML5 target unless WebGL is enabled.

SyntaxEdit

draw_text_color(x, y, string, c1, c2, c3, c4, alpha);


Argument

Description

x

The x coordinate of the drawn string.

y

The y coordinate of the drawn string.

string

The string to draw.

c1

The color for the top left of the drawn text.

c2

The color for the top right of the drawn text.

c3

The color for the bottom right of the drawn text.

c4

The color for the bottom left of the drawn text.

alpha

The alpha for the text.

ExampleEdit

draw_set_color(c_white); 
draw_text(100, 100, "Health"); 
draw_text_color(100, 200, string(health), c_lime, c_lime, c_green, c_green, 1);

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.