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

	[add_lay layer=履歴 class=txt]
	[loadplugin fn="plgHistory" layer=履歴]

[if exp='lang == "ja"']
	; *** テキストレイヤ縦書き左設定 ***
	[txt_lay_v_left layer=履歴 page=fore visible=false fcol=0xFFFFFF l=620 no_sysmenu_draw=true b_pic=null]
[else]
	[lay layer=履歴 page=fore visible=false max_col=30 chk_overrow=false layout='paddingLeft="118" paddingRight="118" paddingTop="118" fontLookup="embeddedCFF" renderingMode="cff"']
	[lay layer=履歴 page=fore max_col=300 onend=nop layout='lineBreak="toFit"' cond='lang != "zh-CN"']
		; 電子演劇部 ちょっと修正＆一口メモ
		; http://famibee.blog38.fc2.com/blog-entry-85.html
[endif]
	[lay layer=履歴 page=fore b_left=0 b_top=0 b_width=&const.an.xmlConfig.window.width b_height=&const.an.xmlConfig.window.height b_color=0x000044 b_alpha=0.8]

	[event global=true call=true key=r label=*show_history]
	[event global=true call=true key=up label=*show_history]
	[event global=true call=true key=upwheel label=*show_history]
[return]

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

	&bk_chkFontMode = an.chkFontMode	; 履歴では一時無効
	&an.chkFontMode = false
	[enable_event enabled=false]
	[clear_event]
	[lay layer=履歴 layout='fontFamily="ipam"']
	[lay layer=履歴 layout='fontFamily="SourceHanSansCN_Normal"' cond='lang == "zh-CN"']
		; フォントを遅延ロードしているので指定はここまで遅らせる
	[h_ss_upd]	; 履歴画面用スナップショットを撮る
	[history_redraw text=&save:const.an.sLog]
		[button layer=履歴 page=fore pic="Icon_btnX" left=984 top=8 global=true label=*cancel hint="閉じる" enterse=&sysse_choice cond="const.flash.system.Capabilities.playerType != 'Desktop'"]
	[let name=sysmenu_v text=&const.an.lay.mes_sysmenu.fore.visible cond=useSysMenu]
	[sys_menu visible=false]

	&isGameState = false
*retry
	[event key=rightclick label=*cancel]
	[event key=r label=*cancel]
	[event key=delete label=*cancel]
	[event key=backspace label=*cancel]
	[event key=shift label=*cancel]
	[gesture_event swipe=*swipe f2tap=*cancel f3tap=*cancel]

	[event key=up label=*scroll call=true arg=-1]
	[event key=down label=*scroll call=true arg=1]
	[event key=right label=*scroll call=true arg=-1]
	[event key=left label=*scroll call=true arg=1]
	[event key=page_down label=*scroll call=true arg=5]
	[event key=page_up label=*scroll call=true arg=-5]
	[event key=home label=*scroll call=true arg=-999]
	[event key=end label=*scroll call=true arg=999]
	[event key=upwheel label=*scroll call=true arg=-1]
	[event key=downwheel label=*scroll call=true arg=1]
[s]

;*********************************************************
*scroll
	[jump label=*cancel_2 cond="logpage.isEnd && (const.an.eventArg > 0) && (const.an.eventArg !=999)"]
	[history_scroll move=&const.an.eventArg][return]

*swipe
	[se fn="PageD_16" buf=SYS]
	[history_scroll move=1 cond="const.an.eventArg == 'u'"]
	[history_scroll move=-1 cond="const.an.eventArg == 'd'"]
	[history_scroll move=-1 cond="const.an.eventArg == 'l'"]
	[history_scroll move=1 cond="const.an.eventArg == 'r'"]
[jump label=*retry]

;*********************************************************
*cancel_2
	[pop_stack]

;*********************************************************
*cancel
	[lay layer=履歴 page=fore visible=false]
	[sys_menu visible=&sysmenu_v]
	[enable_event enabled=true]
	[set_focus to=null]
	&isGameState = true
	&an.chkFontMode = bk_chkFontMode	; 復帰
[return]
