;#USE-FONT	ipam
	[return cond="const._submenu.inited"]
	&const._submenu.inited = true

	[add_lay layer="mes_submenu" class=txt]

	[event global=true call=true key=rightclick label=*main]
	[event global=true call=true key=shift label=*main]
	[gesture_event global=true call=true f2tap=*main f3tap=*toggle_skip]

;****************************
; マクロ 言語を設定
[macro name=_submnu.lang]
	[clear_lay layer="mes_submenu" page=both]
	[lay layer="mes_submenu" page=fore back_clear=true visible=false]
	[lay layer="mes_submenu" page=fore b_pic="_submenu" b_alpha=1 b_left=0 b_top=0 b_width=&const.an.xmlConfig.window.width b_height=&const.an.xmlConfig.window.height]
		[button layer="mes_submenu" page=fore pic="Mnu_btnReturn" left=916 top=8 global=true label=*cancel hint=&mes.ゲームに戻る enterse=&sysse_choice]
		[button layer="mes_submenu" page=fore pic="Mnu_btnQuit" left=775 top=68 global=true label=*close hint=&mes.ゲーム終了 enterse=&sysse_choice cond="const.flash.system.Capabilities.playerType == 'Desktop'"]
		[button layer="mes_submenu" page=fore pic="Mnu_btnTitle" left=916 top=68 global=true label=*title hint=&mes.タイトルに戻る enterse=&sysse_choice]

		[button layer="mes_submenu" page=fore pic="Mnu_btnSave" left=350 top=128 global=true label=*save hint=&mes.セーブ enterse=&sysse_choice]
		[button layer="mes_submenu" page=fore pic="Mnu_btnLoad" left=350 top=168 global=true label=*load hint=&mes.ロード enterse=&sysse_choice]
		[button layer="mes_submenu" page=fore pic="Mnu_btnHideText" left=350 top=365 global=true label=*hide_text hint=&mes.テキスト窓非表示 enterse=&sysse_choice]
		[button layer="mes_submenu" page=fore pic="Mnu_btnHistory" left=350 top=405 global=true label=*log hint=&mes.文字履歴を表示 enterse=&sysse_choice]
		[button layer="mes_submenu" page=fore pic="Mnu_btnConfig" left=350 top=550 global=true label=*config hint=&mes.ゲーム設定 enterse=&sysse_choice]
[endmacro]
	[_submnu.lang]

[return]

;*********************************************************
*main
	[return cond="! isGameState"]

		[se fn=&sysse_ok1 buf=SYS]
		[lay layer="mes_submenu" page=fore visible=true]

		[let name=sysmenu_v text=&const.an.lay.mes_sysmenu.fore.visible cond=useSysMenu]
		[sys_menu visible=false]

	&isGameState = false
*retry
	[enable_event layer="mes_submenu" enabled=true]
	[enable_event enabled=false]
	[clear_event]

	[event key=rightclick label=*cancel]
	[event key=shift label=*cancel]
	[set_focus to=null]
[s]

;*********************************************************
*toggle_skip
	[jump fn=sub label=*toggle_skip]

;*********************************************************
*save
	[se fn=&sysse_ok1 buf=SYS]
	[call label=*exit_smooth]
	[let name="isGameState" text=true]
	[jump fn="_saveload" label=*rclick_save]

;*********************************************************
*load
	[se fn=&sysse_ok1 buf=SYS]
	[call label=*exit_smooth]
	[let name="isGameState" text=true]
	[jump fn="_saveload" label=*rclick_load]

;*********************************************************
*config
	[se fn=&sysse_ok1 buf=SYS]
	[call label=*exit_smooth]
	[let name="isGameState" text=true]
	[jump fn="_config" label=*rclick_config]

;*********************************************************
*hide_text
	[se fn=&sysse_ok1 buf=SYS]
	[call label=*exit]
	[let name="isGameState" text=true]
	[jump fn="_hidetext" label=*main]

;*********************************************************
*log
	[se fn=&sysse_ok1 buf=SYS]
	[call label=*exit_smooth]
	[let name="isGameState" text=true]
	[jump fn="_history" label=*show_history]

;*********************************************************
*title
	[enable_event layer="mes_submenu" enabled=false]
	[ask_ync mes=&mes.タイトルに戻りますか？]
	[jump label=*retry cond="_yesno != 'y'"]

	[call label=*exit]

	[fadeoutse buf=音声 time=1000]
	; テキストレイヤ全画面設定
	[txt_lay_fullscreen b_alpha=0]
	[grp bg="black" sys_menu=false b_alpha=0]

	[pop_stack clear=true]
	[jump fn="main" label=*title]

;*********************************************************
*close
	[enable_event layer="mes_submenu" enabled=false]
	[ask_ync mes=&mes.ゲームを終了しますか？]
	[jump label=*retry cond="_yesno != 'y'"]

	[jump fn="main" label=*close_do]

;*********************************************************
*exit
	[lay layer="mes_submenu" page=fore visible=false]
	[sys_menu visible=&sysmenu_v]
[return]

*exit_smooth
	[lay layer="mes_submenu" page=fore visible=false]
	[sys_menu visible=&sysmenu_v]
[return]

;*********************************************************
*cancel
	[se fn=&sysse_cancel buf=SYS]
	[lay layer="mes_submenu" page=fore visible=false]
	[sys_menu visible=&sysmenu_v]
	[wait time=200]		; パフォーマンス改善

	[enable_event enabled=true]
	[let name="isGameState" text=true]
[return]
