Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_crayon_minigame_Draw_64

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
draw_set_alpha(draw_alpha)
4
draw_set_color(c_white)
5
draw_sprite_ext(spr_crayon_id, 0, id_xx, id_yy, 1, 1, 0, c_white, draw_alpha)
6
for (var i = 0; i < array_length(button_x); i++)
7
{
8
    draw_set_color(c_white)
9
    if (button_highlight[i] == true)
10
        draw_set_color(c_yellow)
11
    draw_rectangle((button_x[i] - 3), (button_y[i] - 3), (button_x[i] + button_width + 3), (button_y[i] + button_height + 3), false)
12
    draw_set_color(c_black)
13
    draw_rectangle(button_x[i], button_y[i], (button_x[i] + button_width), (button_y[i] + button_height), false)
14
    draw_set_halign(fa_center)
15
    draw_set_valign(fa_middle)
16
    draw_set_font(fnt_main)
17
    draw_set_color(c_white)
18
    draw_text((button_x[i] + button_width * 0.5), (button_y[i] + button_height * 0.5), button_text[i])
19
    draw_set_halign(fa_left)
20
    draw_set_valign(fa_top)
21
}
22
for (var j = 0; j < ds_grid_height(drawing_grid); j++)
23
{
24
    for (i = 0; i < ds_grid_width(drawing_grid); i++)
25
    {
26
        var grid_current = ds_grid_get(drawing_grid, i, j)
27
        if (grid_current != 0)
28
            draw_sprite_ext(spr_crayon_pixel, 0, (id_xx + i), (id_yy + j), 1, 1, 0, pencil_color[(grid_current - 1)], draw_alpha)
29
    }
30
}
31
draw_sprite_ext(spr_crayon_cursor, 0, cursor_x, cursor_y, 1, 1, 0, c_white, draw_alpha)
32
draw_set_alpha(1)