This repository was archived by the owner on Jan 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
draw_text_outline()
Xubiod edited this page Nov 14, 2017
·
1 revision
Syntax
draw_text_outline(x, y, text, outline width, text color, border color)
Argument | Description |
---|---|
x | The x position of the text. |
y | The y position of text. |
outline width | The width of the outline. |
text color | The color of the text. |
border color | The color of the outline. |
Returns: Nothing
This function draws text to the window or surface with an outline with a specific outline width and color.
draw_text_outline(4,4, "Health: " + string(health), 4, c_white, c_black);
Draws the built-in health variable 4 pixels from the left and top with an outline width of 4 pixels.
You can not use the function by doing this:
_draw_x = 4;
_draw_y = 4;
_width = 4;
_string = "Health: " + string(health);
draw_set_colour(c_black);
draw_text(_draw_x-_width,_draw_y-_width,_string);
draw_text(_draw_x ,_draw_y-_width,_string);
draw_text(_draw_x+_width,_draw_y-_width,_string);
draw_text(_draw_x-_width,_draw_y ,_string);
draw_text(_draw_x ,_draw_y ,_string);
draw_text(_draw_x+_width,_draw_y ,_string);
draw_text(_draw_x-_width,_draw_y+_width,_string);
draw_text(_draw_x ,_draw_y+_width,_string);
draw_text(_draw_x+_width,_draw_y+_width,_string);
draw_set_colour(c_white);
draw_text(_draw_x ,_draw_y ,_string);
Maintained with <3 by xubiod