Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_mainmenu_Draw_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
with (other)
4
{
5
    draw_set_font(fnt_main)
6
    draw_set_halign(fa_left)
7
    if (room == rm_mainmenu)
8
    {
9
        var xx = 160
10
        var bg_yy = 175
11
        if (route != 3)
12
            draw_sprite(global.menu_sprite, 0, xx, bg_yy)
13
        var yy = 70
14
        if (p[1] == true)
15
            draw_set_color(c_yellow)
16
        draw_text_outline(((__view_get((0 << 0), 0)) + 85), yy, string_hash_to_newline("Continue"))
17
        draw_set_color(c_white)
18
        if (p[2] == true)
19
            draw_set_color(c_yellow)
20
        draw_text_outline(((__view_get((0 << 0), 0)) + 175), yy, string_hash_to_newline("Reset"))
21
        draw_set_color(c_white)
22
        if (p[3] == true)
23
            draw_set_color(c_yellow)
24
        draw_set_halign(fa_center)
25
        draw_text_outline(((__view_get((0 << 0), 0)) + 160), (yy + 20), string_hash_to_newline("Config"))
26
        draw_set_color(c_white)
27
        draw_set_color(c_white)
28
        draw_set_halign(fa_left)
29
        ini_open("Save.sav")
30
        draw_text_outline(((__view_get((0 << 0), 0)) + 65), (yy - 50), string_hash_to_newline("Clover"))
31
        draw_text_outline(((__view_get((0 << 0), 0)) + 145), (yy - 50), string_hash_to_newline("LV" + (string(ini_read_real("Save1", "LV", 1)))))
32
        var play_time = ini_read_real("Playtime", "Seconds", 0)
33
        var string_minutes = string(play_time div 60)
34
        var string_seconds = string(play_time % 60)
35
        if (real(string_minutes) < 10)
36
            string_minutes = "0" + string_minutes
37
        if (real(string_seconds) < 10)
38
            string_seconds = "0" + string_seconds
39
        draw_text_outline(((__view_get((0 << 0), 0)) + 210), (yy - 50), string_hash_to_newline(string_minutes + ":" + string_seconds))
40
        draw_text_outline(((__view_get((0 << 0), 0)) + 65), (yy - 30), string_hash_to_newline(ini_read_string("Save1", "rmName", "Room Name")))
41
        ini_close()
42
    }
43
    else
44
    {
45
        draw_set_halign(fa_center)
46
        draw_set_font(fnt_battle)
47
        draw_set_color(c_white)
48
        if (p[1] == true)
49
            draw_set_color(c_yellow)
50
        draw_text_outline(160, 170, string_hash_to_newline("Begin Game"))
51
        draw_set_color(c_white)
52
        if (p[2] == true)
53
            draw_set_color(c_yellow)
54
        draw_text_outline(160, 190, string_hash_to_newline("Config"))
55
        draw_set_halign(fa_left)
56
        draw_set_color(c_white)
57
    }
58
}