/
_archive.sn
executable file
·176 lines (143 loc) · 5.17 KB
/
_archive.sn
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
164
165
166
167
168
169
170
171
172
173
174
175
176
[return cond=const.sn.frm.archive]
[add_frame id=archive src=_archive visible=false]
[event key='dom=archive:#do_loadsave' label=*do_loadsave global=true]
[event key='dom=archive:#do_del' label=*do_del call=true global=true]
[event key='dom=archive:#close' label=*exit global=true]
[set_focus add='dom=archive:button'] ; モーダルダイアログボタン
[return]
;*********************************************************
; TitleMenu -> Load
*title_load
&しおりモード = 'Load'
&呼び元 = 'Title'
[jump label=*main]
;*********************************************************
; 右クリック -> Load
*rclick_load
[return cond='! isGameState']
&しおりモード = 'Load'
&呼び元 = 'Text'
[jump label=*main]
;*********************************************************
; 右クリック -> Save
*rclick_save
[return cond='! isGameState']
&しおりモード = 'Save'
&呼び元 = 'Text'
[jump label=*main]
;*********************************************************
*main
[enable_event enabled=false]
[enable_event enabled=false layer=mes_sysmenu]
[clear_event]
; 最新値で更新
[set_frame id=archive var_name=val_mode text=&しおりモード]
[set_frame id=archive var_name=val_caller text=&呼び元]
[set_frame id=archive var_name=val_s_place text=&sys:const.sn.save.place]
[set_frame id=archive var_name=val_dic text=&const.sn.bookmark.json]
[let_frame id=archive var_name=val2ctrl function=true]
[set_focus add='dom=archive:.btn_delete' need_err=false]
[set_focus add='dom=archive:.hover-overlay' need_err=false]
[set_focus del='dom=archive:#tgl_del'] ; Enter受付、フォーカス順を最後に
[set_focus add='dom=archive:#tgl_del']
; 下部からスライドイン
[frame id=archive visible=true y=&const.sn.frm.archive.height]
[tsy_frame id=archive time=500 y=0]
[wait_tsy id=archive]
***
&isGameState = false
[event key=rightclick label=*exit]
[event key=meta label=*exit]
[event key=control label=*exit]
[event key=delete label=*exit]
[event key=backspace label=*exit]
[event key=shift label=*exit]
[event key=end label=*exit]
[set_focus to=null]
[s]
*do_loadsave
[let_frame id=archive var_name=val_place]
[jump label=*save cond="しおりモード=='Save'"]
[jump label=*load]
*do_del
[let_frame id=archive var_name=val_place]
[erasebookmark place=&const.sn.frm.archive.val_place]
[return]
;*********************************************************
*save
&_save.place = const.sn.frm.archive.val_place
[se fn=&sysse_ok1 buf=SYS]
[call label=*do_save]
[jump label=*no_cancel_exit]
*do_save_resume
&_save.place = 0
&pic = '_archive_resume.jpg'
[jump label=*do_save_noss]
*do_save
[let name=pic text="& 'userdata:/'+ _save.place +'/pic.jpg'"]
[snapshot fn=&pic layer=&dsp_lays smoothing=true cond=const.sn.isApp]
[let name=pic text='_archive_browser.jpg' cond=!const.sn.isApp]
*do_save_noss
[enable_event enabled=true] ; この状態も保存されるので本文に戻る前に変更
[enable_event enabled=true layer=mes_sysmenu]
[save place=&_save.place pic=&pic dt=&const.Date.getDateStr text=&const.sn.last_page_text]
[return]
;*****************************
*quick_save
[return cond='! isGameState']
[if exp='sys:archive.quick_place == null']
&sys:archive.quick_place = 1000
[else]
&sys:archive.quick_place = (sys:archive.quick_place -1000 +1) %10 +1000
[endif]
&_save.place = sys:archive.quick_place
[call label=*do_save]
[notice text='クイックセーブしました']
[return]
;*********************************************************
*load
&_load.place = const.sn.frm.archive.val_place
[se fn=&sysse_ok2_long buf=SYS]
[frame id=archive visible=false]
*do_load
[sys_scenario_start no_resume_save=true]
[copybookmark from=&_load.place to=0]
[load place=&_load.place]
; [load place=&_load.place fn=_archive label=*do_load_init]
*do_load_resume
[se fn=&sysse_ok2_long buf=SYS]
[sys_scenario_start no_resume_save=true]
[load place=0]
; [load place=0 fn=_archive label=*do_load_init]
; ロード後最初にしたい共通処理
*do_load_init
[return]
;*****************************
*quick_load
[return cond='! isGameState']
[return cond='sys:archive.quick_place == null']
&_load.place = sys:archive.quick_place
&pic = 'userdata:/'+ _load.place +'/pic.jpg'
[let name=pic text='_archive_browser.jpg' cond=!const.sn.isApp]
[graph layer=mes_yesno page=fore pic=&pic x==350 y==-100 width=&const.sn.config.window.width/6 height=&const.sn.config.window.height/6 wait=0]
[ask_ync mes='クイックロードしますか?' no_cleartext=true]
;#FONT クイックロードしますか?
[return cond="_yesno=='n'"]
[jump label=*do_load]
;*********************************************************
*exit
[se fn=&sysse_cancel buf=SYS]
*no_cancel_exit
[let_frame id=archive var_name=is_modal]
[if exp=const.sn.frm.archive.is_modal]
[let_frame id=archive var_name=modal_hide function=true]
[jump label=***before cond=const.sn.frm.archive.is_modal]
[endif]
[tsy_frame id=archive time=500 y=&const.sn.frm.archive.height]
[wait_tsy id=archive]
[frame id=archive visible=false]
[enable_event enabled=true]
[enable_event enabled=true layer=mes_sysmenu]
[set_focus to=null]
[let name='isGameState' text=true cond="呼び元=='Text'"]
[return]