Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_title_placeholder_Draw_0

(view raw script w/o annotations or w/e)
1
if (specialmode == 0)
2
{
3
    draw_set_color(c_white);
4
    draw_set_font(fnt_mainbig);
5
    draw_set_halign(fa_center);
6
    draw_text(camerax() + (view_wport[0] / 2), cameray() + 80, "Chapter 2");
7
    draw_set_halign(fa_left);
8
    for (var i = 0; i < array_length_1d(choice); i++)
9
    {
10
        var text_color = (choice_index == i) ? c_yellow : c_white;
11
        draw_set_color(text_color);
12
        draw_text(camerax() + 240, cameray() + 160 + (i * 40), choice[i]);
13
    }
14
    draw_set_color(c_white);
15
    draw_sprite(spr_heart_centered, 0, camerax() + 220, cameray() + 175 + (choice_index * 40));
16
}
17
if (keyboard_check_pressed(ord("N")))
18
{
19
    if (specialmode == 0)
20
        specialmode = 1;
21
    else
22
        specialmode = 0;
23
}
24
if (keyboard_check_pressed(ord("M")))
25
{
26
    if (auto == 0)
27
        auto = 1;
28
    else
29
        auto = 0;
30
}
31
if (specialmode == 1)
32
{
33
    draw_set_color(c_black);
34
    draw_rectangle(-10, -10, 999, 999, false);
35
    height = 0;
36
    draw_set_color(c_white);
37
    draw_set_font(fnt_main);
38
    for (var i = 0; i < 20; i++)
39
    {
40
        draw_sprite(i + n, autotimer / 5, x + 300, y + height + (i * 10));
41
        draw_text(x, y + height, sprite_get_name(i + n));
42
        height += sprite_get_height(i + n);
43
    }
44
    if (right_p())
45
        n++;
46
    if (down_p())
47
        n += 20;
48
    if (left_p())
49
        n--;
50
    if (up_p())
51
        n -= 20;
52
    if (auto)
53
        autotimer++;
54
    if (autotimer >= 90)
55
    {
56
        n += 5;
57
        autotimer = 0;
58
    }
59
    if (n < 0)
60
        n = 0;
61
}