Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_bathroom_eavesdrop_Draw_0

(view raw script w/o annotations or w/e)
1
if (dhaver == 1)
2
{
3
    draw_set_color(c_black);
4
    draw_set_alpha(0.15 * speech_alpha);
5
    prevalpha[0] = 1;
6
    var text_height = string_height(current_text) * 0.25;
7
    var text_width = string_width(current_text) * 0.65;
8
    for (i = 6; i > 0; i -= 1)
9
    {
10
        prevalpha[i] = prevalpha[i - 1];
11
        if (prevalpha[i] > 0)
12
        {
13
            var ypadding = 2;
14
            var xpadding = 2;
15
            xpos_offset = 0;
16
            ypos_offset = 0;
17
            xpos = speech_xpos - 20;
18
            ypos = speech_base_ypos - text_height - 10;
19
            if (cameray() < 300)
20
                ypos = (cameray() + 110) - text_height - 5;
21
            xpos = camerax() + 60;
22
            ossafe_fill_rectangle(xpos - (10 - i) - xpadding, ypos - (10 - i) - ypadding, xpos + text_width + (10 + i) + xpadding, ypos + text_height + (10 + i) + ypadding, false);
23
        }
24
    }
25
    draw_set_alpha(1);
26
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("dotumche");
27
    draw_set_color(c_white);
28
    draw_set_alpha(speech_alpha);
29
    var xpos_offset = 0;
30
    var ypos_offset = 0;
31
    var xpos = speech_xpos - 20;
32
    var ypos = speech_base_ypos - text_height - 5;
33
    if (cameray() < 300)
34
        ypos = (cameray() + 115) - text_height - 5;
35
    xpos = camerax() + 60;
36
    draw_text_transformed(xpos, ypos - (text_height / 2) - 2, current_text, 0.5, 0.5, 0);
37
    draw_set_alpha(1);
38
}