1 |
function scr_mail_pinscr_mail_pinfunction scr_mail_pin(argument0) //gml_Script_scr_mail_pin
{
var first_val = ds_list_find_value(global.mail_list, 0)
if (global.mail_pinned == false || argument0 != first_val)
{
global.mail_pinned = true
var old_pos = ds_list_find_index(global.mail_list, argument0)
ds_list_delete(global.mail_list, old_pos)
ds_list_sort(global.mail_list, true)
ds_list_insert(global.mail_list, 0, argument0)
audio_play_sound(snd_mail_pin, 1, 0)
}
else
{
global.mail_pinned = false
ds_list_sort(global.mail_list, true)
audio_play_sound(snd_mail_unpin, 1, 0)
}
} (argument0) //gml_Script_scr_mail_pin |
2 |
{ |
3 |
var first_val = ds_list_find_value(global.mail_list, 0) |
4 |
if (global.mail_pinned == false || argument0 != first_val) |
5 |
{ |
6 |
global.mail_pinned = true |
7 |
var old_pos = ds_list_find_index(global.mail_list, argument0) |
8 |
ds_list_delete(global.mail_list, old_pos) |
9 |
ds_list_sort(global.mail_list, true) |
10 |
ds_list_insert(global.mail_list, 0, argument0) |
11 |
audio_play_sound(snd_mail_pin, 1, 0) |
12 |
} |
13 |
else |
14 |
{ |
15 |
global.mail_pinned = false |
16 |
ds_list_sort(global.mail_list, true) |
17 |
audio_play_sound(snd_mail_unpin, 1, 0) |
18 |
} |
19 |
} |