Undertale script viewer

← back to main script listing

gml_Script_scr_shop_draw_talktitle

(view raw script w/o annotations or w/e)
1
var line = argument0;
2
var highlight = argument1;
3
var text = argument2;
4
var menu_x = 15;
5
var text_x = menu_x + 15;
6
var text_space = scr_shop_divider_pos
scr_shop_divider_pos

if (global.language == "ja") return 220; else return 210;
() - 10 - text_x;
7
if (highlight)
8
    draw_set_colour(c_yellow);
9
else
10
    draw_set_colour(c_white);
11
var scale = 1;
12
var text_width = string_width(text);
13
if (text_width > text_space)
14
    scale = text_space / text_width;
15
draw_text_transformed(text_x, 130 + (20 * line), text, scale, 1, 0);
16
if (highlight)
17
    draw_set_color(c_white);