|
1
|
if (init)
|
|
2
|
{
|
|
3
|
if (global.lang == "ja")
|
|
4
|
draw_set_font(fnt_ja_dotumche);
|
|
5
|
else
|
|
6
|
draw_set_font(fnt_dotumche);
|
|
7
|
if (bubblewidth == -1)
|
|
8
|
bubblewidth = round(string_width(truetext) / 2) + bubblepadding;
|
|
9
|
if (bubbleheight == -1)
|
|
10
|
bubbleheight = round(string_height(truetext) / 2) + bubblepadding;
|
|
11
|
if (taillength == -1)
|
|
12
|
taillength = abs(bubblewidth + bubbleheight) * 1.25;
|
|
13
|
if (tailwidth == -1)
|
|
14
|
tailwidth = 8;
|
|
15
|
var taildir = point_direction(x + tailxoffset, y + tailyoffset, tx, ty);
|
|
16
|
if (bubbletype == 1)
|
|
17
|
taildir = type1direction;
|
|
18
|
var tailendx = x + lengthdir_x(taillength, taildir);
|
|
19
|
var tailendy = y + lengthdir_y(taillength, taildir);
|
|
20
|
if (bubbletype == 2)
|
|
21
|
{
|
|
22
|
tailxoffset = 0;
|
|
23
|
tailyoffset = 0;
|
|
24
|
tailendx = t2x;
|
|
25
|
tailendy = t2y;
|
|
26
|
taildir = point_direction(x + tailxoffset, y + tailyoffset, t2x, t2y);
|
|
27
|
taillength = point_distance(x, y, t2x, t2y);
|
|
28
|
}
|
|
29
|
var tailendxthick = x + lengthdir_x(taillength + outlineThickness, taildir);
|
|
30
|
var tailendythick = y + lengthdir_y(taillength + outlineThickness, taildir);
|
|
31
|
var tailtopx1 = x + tailxoffset + lengthdir_x(tailwidth, taildir + 90);
|
|
32
|
var tailtopy1 = y + tailyoffset + lengthdir_y(tailwidth, taildir + 90);
|
|
33
|
var tailtopx2 = (x - tailxoffset) + lengthdir_x(tailwidth, taildir - 90);
|
|
34
|
var tailtopy2 = (y - tailyoffset) + lengthdir_y(tailwidth, taildir - 90);
|
|
35
|
draw_set_color(outlineColor);
|
|
36
|
draw_circle(x - bubblewidth, y - bubbleheight, 8 + outlineThickness, 0);
|
|
37
|
draw_circle(x + bubblewidth, y - bubbleheight, 8 + outlineThickness, 0);
|
|
38
|
draw_circle(x - bubblewidth, y + bubbleheight, 8 + outlineThickness, 0);
|
|
39
|
draw_circle(x + bubblewidth, y + bubbleheight, 8 + outlineThickness, 0);
|
|
40
|
ossafe_fill_rectangle(x - bubblewidth, y - bubbleheight - 8 - outlineThickness, x + bubblewidth, y + bubbleheight + 8 + outlineThickness, 0);
|
|
41
|
ossafe_fill_rectangle(x - bubblewidth - 8 - outlineThickness, y - bubbleheight, x + bubblewidth + 8 + outlineThickness, y + bubbleheight, 0);
|
|
42
|
draw_line_width(tailendxthick, tailendythick, tailtopx1, tailtopy1, outlineThickness * 2);
|
|
43
|
draw_line_width(tailendxthick, tailendythick, tailtopx2, tailtopy2, outlineThickness * 2);
|
|
44
|
draw_set_color(textbubbleColor);
|
|
45
|
draw_circle(x - bubblewidth, y - bubbleheight, 8, 0);
|
|
46
|
draw_circle(x + bubblewidth, y - bubbleheight, 8, 0);
|
|
47
|
draw_circle(x - bubblewidth, y + bubbleheight, 8, 0);
|
|
48
|
draw_circle(x + bubblewidth, y + bubbleheight, 8, 0);
|
|
49
|
ossafe_fill_rectangle(x - bubblewidth, y - bubbleheight - 8, x + bubblewidth, y + bubbleheight + 8, 0);
|
|
50
|
ossafe_fill_rectangle(x - bubblewidth - 8, y - bubbleheight, x + bubblewidth + 8, y + bubbleheight, 0);
|
|
51
|
draw_triangle(tailendx, tailendy, tailtopx1, tailtopy1, tailtopx2, tailtopy2, 0);
|
|
52
|
draw_set_halign(fa_center);
|
|
53
|
draw_set_valign(fa_middle);
|
|
54
|
if (dropshadow == true)
|
|
55
|
{
|
|
56
|
draw_set_color(dropColor);
|
|
57
|
draw_set_alpha(0.25);
|
|
58
|
draw_text(x, y + 1, string_hash_to_newline(truetext));
|
|
59
|
draw_text(x + 1, y + 1, string_hash_to_newline(truetext));
|
|
60
|
draw_text(x + 1, y, string_hash_to_newline(truetext));
|
|
61
|
}
|
|
62
|
draw_set_alpha(1);
|
|
63
|
draw_set_color(textColor);
|
|
64
|
if (textColor == textbubbleColor)
|
|
65
|
textColor = 0;
|
|
66
|
draw_text(x, y, string_hash_to_newline(truetext));
|
|
67
|
draw_set_halign(fa_left);
|
|
68
|
draw_set_valign(fa_top);
|
|
69
|
draw_set_color(c_white);
|
|
70
|
}
|