Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_talk_shop_Draw_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
var shop_name = global.shop_name;
4
var other_talker = false;
5
if (box_portait[0] != -4 && box_portait[message_current] != -4)
6
    other_talker = true;
7
var xx = obj_talk_screen_shop.x + 30;
8
if (other_talker)
9
    xx = obj_talk_screen_shop.x + 88;
10
var portrait_xx = 48;
11
draw_set_font(fnt_main);
12
draw_set_halign(fa_left);
13
draw_set_valign(fa_top);
14
if (other_talker)
15
{
16
    var prt_animate;
17
    if (characters < message_length)
18
        prt_animate = -1;
19
    else
20
        prt_animate = 0;
21
    var portrait_y_disjoint = 130 + (sprite_get_height(box_portait[message_current]) / 3) + 28;
22
    if (box_portait[message_current] != -4)
23
        draw_sprite_ext(box_portait[message_current], prt_animate, portrait_xx, portrait_y_disjoint, 0.5, 0.5, 0, c_white, 1);
24
}
25
if (shop_name == "Hotel Shop")
26
{
27
    draw_set_color(c_fuchsia);
28
    draw_text_ext(xx, obj_talk_screen_shop.y + 10, string_hash_to_newline(message_draw_alt), global.text_separation_shop, global.text_linebreak_limit_shop);
29
}
30
draw_set_color(c_white);
31
draw_text_ext(xx, obj_talk_screen_shop.y + 10, string_hash_to_newline(message_draw), global.text_separation_shop, global.text_linebreak_limit_shop);