Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_robot_build_controller_Draw_64

(view raw script w/o annotations or w/e)
1
display_set_gui_size(640, 480)
2
draw_set_alpha(draw_alpha)
3
draw_set_color(c_black)
4
draw_rectangle(0, 0, 640, 480, false)
5
var robot_box_xx = 60
6
var robot_box_yy = 20
7
var robot_box_width = robot_box_xx + 220
8
var robot_box_height = robot_box_yy + 260
9
draw_set_color(c_white)
10
draw_rectangle((robot_box_xx - 4), (robot_box_yy - 4), (robot_box_width + 4), (robot_box_height + 4), false)
11
draw_set_color(c_black)
12
draw_rectangle(robot_box_xx, robot_box_yy, robot_box_width, robot_box_height, false)
13
draw_set_color(c_green)
14
draw_rectangle((robot_box_xx + 20), (robot_box_yy + 20), (robot_box_width - 20), (robot_box_height - 20), true)
15
draw_line((robot_box_xx + 20 + 90), (robot_box_yy + 20), (robot_box_xx + 20 + 90), (robot_box_height - 20))
16
draw_line((robot_box_xx + 20), (robot_box_yy + 20 + 110), (robot_box_width - 20), (robot_box_yy + 20 + 110))
17
var box_select_xx = 580
18
var box_select_yy = 20
19
var box_select_width = box_select_xx - 220
20
var box_select_height = box_select_yy + 260
21
draw_set_color(c_white)
22
draw_rectangle((box_select_xx + 4), (box_select_yy - 4), (box_select_width - 4), (box_select_height + 4), false)
23
draw_set_color(c_dkgray)
24
draw_rectangle(box_select_xx, box_select_yy, box_select_width, box_select_height, false)
25
if (!global.dialogue_open)
26
{
27
    var dbox_xx = 60
28
    var dbox_yy = 320
29
    var dbox_width = dbox_xx + 420
30
    var dbox_height = dbox_yy + 128
31
    draw_set_color(c_white)
32
    draw_rectangle((dbox_xx - 4), (dbox_yy - 4), (dbox_width + 4), (dbox_height + 4), false)
33
    draw_set_color(c_black)
34
    draw_rectangle(dbox_xx, dbox_yy, dbox_width, dbox_height, false)
35
    draw_set_color(c_white)
36
    draw_set_font(fnt_main_battle)
37
    draw_text(80, 330, string_hash_to_newline(string("{0} - Select/Place#{1} - Cancel selection#{2} - Rotate/Scale item", global.action_key, global.pause_key, global.cancel_key)))
38
    var butt1_xx = 500
39
    var butt1_yy = 320
40
    var butt1_width = butt1_xx + 80
41
    var butt1_height = butt1_yy + 50
42
    var butt1_color = c_white
43
    if (gui_button_selected == 0)
44
        butt1_color = 65535
45
    draw_set_color(butt1_color)
46
    draw_rectangle((butt1_xx - 4), (butt1_yy - 4), (butt1_width + 4), (butt1_height + 4), false)
47
    draw_set_color(c_black)
48
    draw_rectangle(butt1_xx, butt1_yy, butt1_width, butt1_height, false)
49
    draw_set_font(fnt_mainb)
50
    draw_set_color(butt1_color)
51
    draw_text((butt1_xx + 14), (butt1_yy + 7), string_hash_to_newline("UNDO"))
52
    var butt2_xx = 500
53
    var butt2_yy = 398
54
    var butt2_width = butt2_xx + 80
55
    var butt2_height = butt2_yy + 50
56
    var butt2_color = c_white
57
    if (gui_button_selected == 1)
58
        butt2_color = 65535
59
    draw_set_color(butt2_color)
60
    draw_rectangle((butt2_xx - 4), (butt2_yy - 4), (butt2_width + 4), (butt2_height + 4), false)
61
    draw_set_color(c_black)
62
    draw_rectangle(butt2_xx, butt2_yy, butt2_width, butt2_height, false)
63
    draw_set_font(fnt_mainb)
64
    draw_set_color(butt2_color)
65
    draw_text((butt2_xx + 14), (butt2_yy + 7), string_hash_to_newline("DONE"))
66
}
67
var robot_item_number = instance_number(obj_robot_build_item)
68
draw_set_color(c_white)
69
if (robot_item_number >= item_number_max)
70
    draw_set_color(c_red)
71
draw_set_font(fnt_mainb)
72
draw_set_halign(fa_center)
73
draw_text(320, 280, string_hash_to_newline(string(robot_item_number) + " / " + string(item_number_max)))
74
draw_set_halign(fa_left)
75
draw_set_color(c_white)
76
draw_sprite_ext(robot_item[0], 0, 415, 85, robot_item_scale[0], robot_item_scale[0], 0, c_white, draw_alpha)
77
draw_sprite_ext(robot_item[1], 0, 525, 85, robot_item_scale[1], robot_item_scale[1], 0, c_white, draw_alpha)
78
draw_sprite_ext(robot_item[2], 0, 415, 225, robot_item_scale[2], robot_item_scale[2], 0, c_white, draw_alpha)
79
draw_sprite_ext(robot_item[3], 0, 525, 225, robot_item_scale[3], robot_item_scale[3], 0, c_white, draw_alpha)
80
draw_set_alpha(1)
81
display_set_gui_size(320, 240)