-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocedure.xml
75 lines (69 loc) · 2.18 KB
/
procedure.xml
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
<data>
<action>
function generateNoteListItem(note){
var id = note.id;
var name = note.title;
var desc = note.text;
var book = note.book;
if (name == null) return null;
var icon = "paper.ico";
list =
"<listItem icon='"+icon+"' title='notebook.eval{text:"+name+"}' >
<tooltip>
<option title='notebook.eval{text:"+desc+"}' size='small' />
</tooltip>
<closeWindows modal='true' />
<action> noteActions(evalXml,"+id+",'"+book+"') </action>
</listItem>";
return list;
// <closeWindows modal="true" />
}
</action>
<action>
// Empty action
</action>
<procedure id="notebook">
<!-- Check for Legacy Notes -->
<section if="getFlag('legacyNoteCheck') == false">
<action>
legacyNoteWindow(player,evalXml); setFlag('legacyNoteCheck',true);
</action>
<stop/>
</section>
<!-- Main Procedure -->
<action>
var icon = "quill.ico";
var anim = "single";
//shows your notes
var book = "notebook_notes";
string = "<window type='craft' title='item.names>notebook' >";
if (getString(book) != "") for (note in separateNotes(player,book)){
string += generateNoteListItem(note);
}
//create another one
string +=
'<listItem icon="'+icon+'" title="notebook.create" >
<tooltip>
<option title="notebook.create_desc" size="small" />
</tooltip>
<closeWindows modal="true" />
<action>
editNote(evalXml);
</action>
</listItem>';
//Force legacy check
string +=
'<listItem icon="'+icon+'" title="notebook.legacy" >
<closeWindows modal="true" />
<tooltip>
<option title="notebook.legacy_desc" size="small" />
</tooltip>
<action>
legacyNoteWindow(player,evalXml);
</action>
</listItem>';
string += "</window>";
evalXml(string);
</action>
</procedure>
</data>