Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_menu_item_Draw_0

related scripts: Create_0Draw_0 Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
draw_self();
4
if (item_category == "consumable")
5
{
6
    var info_box_xx = 506;
7
    var info_box_yy = 192;
8
    draw_set_color(c_white);
9
    draw_rectangle(info_box_xx, info_box_yy, info_box_xx + 100, info_box_yy + 53, false);
10
    draw_set_color(c_black);
11
    draw_rectangle(info_box_xx + 4, info_box_yy + 4, (info_box_xx + 100) - 4, (info_box_yy + 53) - 4, false);
12
    draw_set_font(fnt_mainb);
13
    draw_set_color(c_white);
14
    draw_set_halign(fa_center);
15
    var cons_type = " HP";
16
    switch (item_type)
17
    {
18
        case "speed":
19
            cons_type = " SP";
20
            break;
21
        case "protection":
22
            cons_type = " PP";
23
            break;
24
    }
25
    draw_text(info_box_xx + 50, info_box_yy + 10, "+" + string(item_number) + cons_type);
26
    draw_set_halign(fa_left);
27
}