-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,friend_update].cs2
163 lines (163 loc) · 5.51 KB
/
[proc,friend_update].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// 125
[proc,friend_update](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8)
~friends_sortbutton_draw($component1, 2, 3, 2, "Sort by name", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8);
~friends_sortbutton_draw($component2, 8, 9, 9, "Sort by last world change", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8);
~friends_sortbutton_draw($component3, 4, 5, 4, "Sort by world", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8);
~friends_sortbutton_draw($component4, 0, 1, 0, "Legacy sort", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8);
cc_deleteall($component5);
def_int $count9 = 0;
def_int $int10 = 0;
def_string $string0 = "";
def_string $string1 = "";
def_int $world11 = 0;
def_int $height12 = 0;
def_int $int13 = 15;
def_boolean $boolean14 = null;
def_int $count15 = friend_count;
if ($count15 <= -2) {
if (%varbit8119 = 1) {
if_settext("Loading friends list<br>Please wait...", $component7);
} else {
if_settext("You must set a name<br>before using this.", $component7);
}
if_sethide(true, $component0);
} else if ($count15 = -1) {
if (%varbit8119 = 1) {
if_settext("Loading friends list<br>Please wait...", $component7);
} else {
if_settext("You must set a name<br>before using this.", $component7);
}
if_sethide(true, $component0);
} else if ($count15 = 0) {
if_settext("You may add friends by using the button below, or by <~text_device("right-clicking", "long pressing")> on a message from them and selecting to add them as a friend.", $component7);
if_sethide(true, $component0);
} else {
$boolean14 = ~on_mobile;
if ($boolean14 = true) {
$int13 = scale(8, 5, $int13);
}
if_settext("", $component7);
if_sethide(false, $component0);
_3628;
switch_int (%varcint183) {
case 1 :
_3629(false);
case 2 :
_3633(true);
_3630(true);
case 3 :
_3633(true);
_3630(false);
case 8 :
_3633(true);
_3632(true);
case 9 :
_3633(true);
_3632(false);
case 4 :
_3633(true);
_3636(true);
_3631(true);
switch_int (%varcint205) {
case default :
_3630(true);
case 3 :
_3630(false);
case 8 :
_3632(true);
case 9 :
_3632(false);
}
case 5 :
_3633(true);
_3636(true);
_3631(false);
switch_int (%varcint205) {
case default :
_3630(true);
case 3 :
_3630(false);
case 8 :
_3632(true);
case 9 :
_3632(false);
}
}
_3639;
while ($count9 < $count15) {
$string0, $string1 = friend_getname($count9);
cc_create($component5, ^iftype_text, $int10);
$int10 = calc($int10 + 1);
cc_settext($string0);
cc_setsize(0, $int13, ^setsize_minus, ^setsize_abs);
cc_setposition(0, $height12, ^setpos_abs_centre, ^setpos_abs_top);
cc_setcolour(^white);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_setopbase("<col=ff9040><$string0></col>");
$world11 = friend_getworld($count9);
if ($world11 ! 0) {
cc_setop(1, "Message");
cc_setop(2, "");
} else {
cc_setop(1, "");
cc_setop(2, "Message");
}
cc_setop(3, "Delete");
.cc_create($component5, ^iftype_graphic, $int10);
$int10 = calc($int10 + 1);
.cc_setsize(14, 14, ^setsize_abs, ^setsize_abs);
.cc_setposition(calc(parawidth($string0, 190, p12_full) + 3), calc($height12 + ($int13 - 14) / 2), ^setpos_abs_left, ^setpos_abs_top);
.cc_setgraphic("friends_changed_name");
.cc_setgraphicshadow(0x333333);
if (string_length($string1) > 0) {
if ($boolean14 = true) {
cc_setop(10, "Reveal previous name");
cc_setonop("friend_op(event_op, event_opbase, event_com, cc_getid, .cc_getid, $string1, $string0)");
} else {
$string1 = "Previous name:<br><$string1>";
cc_setonmouserepeat("tooltip_mouserepeat(event_com, event_comsubid, $component8, $string1, 25, 190)");
cc_setonmouseleave("deltooltip($component8)");
cc_setonop("friend_op(event_op, event_opbase, null, -1, -1, "null", "null")");
}
.cc_sethide(false);
} else {
cc_setonmouseover("deltooltip($component8)");
.cc_sethide(true);
cc_setonop("friend_op(event_op, event_opbase, null, -1, -1, "null", "null")");
}
cc_create($component5, ^iftype_text, $int10);
$int10 = calc($int10 + 1);
cc_setsize(0, $int13, ^setsize_minus, ^setsize_abs);
cc_setposition(0, $height12, ^setpos_abs_centre, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_right, ^settextalign_centre, 0);
cc_settextshadow(true);
if ($world11 = 0) {
cc_settext("Offline");
cc_setcolour(^red);
} else if ($world11 = map_world) {
cc_settext("World <tostring($world11)>");
cc_setcolour(0x0dc10d);
} else {
if ($world11 > 5000) {
cc_settext("<col=ffff00>Classic <tostring(calc($world11 - 5000))>");
} else {
cc_settext("<col=ffff00>World <tostring($world11)>");
}
cc_setcolour(^yellow);
}
$count9, $height12 = calc($count9 + 1), calc($height12 + $int13);
}
if ($count15 >= 1) {
$height12 = calc($height12 + 5);
}
}
if ($height12 > if_getheight($component5)) {
if_setscrollsize(0, $height12, $component5);
~scrollbar_resize($component6, $component5, %varcint9);
} else {
if_setscrollsize(0, 0, $component5);
~scrollbar_resize($component6, $component5, 0);
}