2023-06-04 12:38:40 +02:00
|
|
|
function draw_text_over(_x, _y, _text, scale = 1) {
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_OVERRIDE;
|
2023-06-04 12:38:40 +02:00
|
|
|
draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_NORMAL;
|
|
|
|
}
|
|
|
|
|
2023-06-04 12:38:40 +02:00
|
|
|
function draw_text_ext_over(_x, _y, _text, _sep, _w, scale = 1) {
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_OVERRIDE;
|
2023-06-04 12:38:40 +02:00
|
|
|
draw_text_ext_transformed(_x, _y, _text, _sep, _w, scale, scale, 0);
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_NORMAL;
|
|
|
|
}
|
|
|
|
|
2023-06-04 12:38:40 +02:00
|
|
|
function draw_text_add(_x, _y, _text, scale = 1) {
|
2023-03-26 07:13:36 +02:00
|
|
|
BLEND_ALPHA_MULP;
|
2023-06-04 12:38:40 +02:00
|
|
|
draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_NORMAL;
|
2022-12-19 13:35:30 +01:00
|
|
|
}
|
|
|
|
|
2023-06-04 12:38:40 +02:00
|
|
|
function draw_text_ext_add(_x, _y, _text, _sep, _w, scale = 1) {
|
2023-03-26 07:13:36 +02:00
|
|
|
BLEND_ALPHA_MULP;
|
2023-06-04 12:38:40 +02:00
|
|
|
draw_text_ext_transformed(_x, _y, _text, _sep, _w, scale, scale, 0);
|
2023-02-14 05:32:32 +01:00
|
|
|
BLEND_NORMAL;
|
|
|
|
}
|
2023-03-24 10:12:44 +01:00
|
|
|
|
|
|
|
function draw_text_bbox(bbox, text) {
|
|
|
|
var ss = min(bbox.w / string_width(text), bbox.h / string_height(text));
|
|
|
|
ss = max(0.5, ss);
|
|
|
|
|
|
|
|
draw_text_cut(bbox.xc, bbox.yc, text, bbox.w, ss);
|
|
|
|
}
|