Pixel-Composer/scripts/draw_text_delimiter/draw_text_delimiter.gml

18 lines
401 B
Text
Raw Normal View History

2023-02-14 02:48:33 +01:00
function draw_text_delimiter(ch_x, ch_y, _str) {
var _x = ch_x;
var _y = ch_y;
var cc = draw_get_color();
for( var i = 1; i <= string_length(_str); i++ ) {
var ch = string_char_at(_str, i);
if(ch == " ") {
ch = __txtx("delimiter_space", "<space>");
2023-02-14 02:48:33 +01:00
draw_set_color(COLORS._main_text_sub);
} else
draw_set_color(cc);
2023-08-13 13:10:20 +02:00
draw_text_add(_x, _y, ch);
2023-02-14 02:48:33 +01:00
_x += string_width(ch);
}
}