<?xml version="1.0" encoding="utf-8" ?>
<Layout>

<Widget x="-30" y="-30">

    <GPScrollViewController>
        <Action type="1" axis="2" val="-0.5" use_val="1" cmd="left"/>
        <Action type="1" axis="2" val="0.5" use_val="1" cmd="right"/>
        <Action type="1" axis="3" val="-0.5" use_val="1" cmd="up"/>
        <Action type="1" axis="3" val="0.5" use_val="1" cmd="down"/>
        <Action type="0" btn="8" cmd="press"/>
        
        <Container class="GPGraphContainer"/>

        <Item path="../*/point_1/unlock" scale="1 1" def="1" />
        <Item path="../*/point_2/unlock" scale="1 1" />
        <Item path="../*/point_3/unlock" scale="1 1" />
        <Item path="../*/point_4/unlock" scale="1 1" />
        <Item path="../*/point_5/unlock" scale="1 1" />
        <Item path="../*/point_6/unlock" scale="1 1" />
        <Item path="../*/point_7/unlock" scale="1 1" />
        <Item path="../*/point_8/unlock" scale="1 1" />
        <Item path="../*/point_9/unlock" scale="1 1" />
        <Item path="../*/point_1/complete" scale="1 1" def="1" />
        <Item path="../*/point_2/complete" scale="1 1" />
        <Item path="../*/point_3/complete" scale="1 1" />
        <Item path="../*/point_4/complete" scale="1 1" />
        <Item path="../*/point_5/complete" scale="1 1" />
        <Item path="../*/point_6/complete" scale="1 1" />
        <Item path="../*/point_7/complete" scale="1 1" />
        <Item path="../*/point_8/complete" scale="1 1" />
        <Item path="../*/point_9/complete" scale="1 1" />
        
        <ScrollView path="../battle_map"/>
    </GPScrollViewController>
    
    
    <!-- battle map -->
	<BkgImage name="bgr" x="30" y="330" width="485" height="265" image="/demon_battle/bkg_gradient.png" />
    
    <ScrollView name="battle_map" x="30" y="330" width="485" height="265" sliderx="480" force_border="true" slider_mode="always" clip="1" auto_layout="0">
        
        <Widget name="bkg" x="0" y="0">
            <Image name="terra" x="0" y="0" image="/demon_battle/terra_tile.png" />
            <Image name="terra" x="0" y="204" image="/demon_battle/terra_tile.png" />
        </Widget>
        
        <Widget name="block_1" x="-10" y="0">
            <Widget name="point_1" x="50" y="0" xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="1" handler="cur_sublayout"/>
            </Widget>
			
            <Widget name="point_2" x="180" y="20"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="2" handler="cur_sublayout"/>
            </Widget>
			
            <Widget name="point_3" x="310" y="30"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="3" handler="cur_sublayout"/>
            </Widget>
            
            <Widget name="point_4" x="210" y="100"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="4" handler="cur_sublayout"/>
            </Widget>
            
            <Widget name="point_5" x="60" y="100"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="5" handler="cur_sublayout"/>
            </Widget>
        </Widget>
        <Widget name="block_2" x="0" y="180">
		
            <Widget name="point_6" x="30" y="0" xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="6" handler="cur_sublayout"/>
            </Widget>
			
            <Widget name="point_7" x="170" y="10"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="7" handler="cur_sublayout"/>
            </Widget>
			
            <Widget name="point_8" x="315" y="55"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="8" handler="cur_sublayout"/>
            </Widget>
            
            <Widget name="point_9" x="170" y="90"  xml="battle_map_item_template.xml">
                <Click cmd="set_demon_ai" param="9" handler="cur_sublayout"/>
            </Widget>
			
        </Widget>
		
    </ScrollView>
	
	<Image name="mask" x="0" y="44" image="/demon_battle/book_mask.png" />
	
    <Button name="change_demon" x="280" y="80" scale="0.9">
        <Image name="button" x="0" y="0" image="/demon_battle/btn_change.png"> 
            <Text name="text" x="60" y="10" width="120" height="60" font="font" text="DEMON_CHANGE_BTN" align="W" color="FFFFFFFF"/>
        </Image>
        
        <SelectorController>
            <Action type="0" btn="9" cmd="press"/>
            <Container class="GPOnceContainer"/>
            <Item path=".." scale="1 1" alias="btn_rb" offset="-10 12"/>
        </SelectorController>
        
		<Click handler="cur_layout" cmd="on_right" param="DemonList">
            <Param value="crossfade"/>
        </Click>	 
    </Button>
	
	
    <!-- demon info -->
    <Widget name="current_demon" x="20" y="50" scale="0.9" >
        <Image name="demon_border" x="40" y="120" image="/demon_battle/demon_border.png" scale="1.1" />
        <Image name="icon" x="-15" y="-45" scale="0.8"/>
        
		<Image name="demon_name" x="16" y="210" scale="0.8" image="/demon_list/board_name.png">
            <Text name="name" x="55" y="18" width="150" height="12" font="font" text="" align="C" color="FFFFFFFF"/>
        </Image>
        
        <Widget name="attack" x="260" y="130">
            <Text name="text" x="40" y="-4" width="150" height="10" font="small" text="DEMON_ATTACK_TITLE" align="C" color="FFF6982D" />
            <Image name="border" x="0" y="0" image="/demon_battle/attack_board_01.png" />
            <Text name="value_text" x="58" y="18" width="120" height="12" font="author" text="" align="C" color="FFFFFFFF"/>
        </Widget>
        
        <Widget name="hp" x="260" y="175">
            <Text name="text" x="40" y="-4" width="150" height="10" font="small" text="DEMON_HP_TITLE" align="C" color="FFF6982D" />
            <Image name="border" x="0" y="0" image="/demon_battle/hp_board_01.png" />
            <Image name="value" x="43.5" y="16.5" width="154" height="20" image="/demon_battle/hp_board_02.png" />
            <Text name="value_text" x="58" y="18" width="120" height="12" font="author" text="" align="C" color="FFFFFFFF"/>
        </Widget>
		
        <Widget name="mana" x="260" y="220">
            <Text name="text" x="40" y="-4" width="150" height="10" font="small" text="DEMON_MANA_TITLE" align="C" color="FFF6982D" />
            <Image name="border" x="0" y="0" image="/demon_battle/mana_board_01.png" />
            <Image name="value" x="43.5" y="16.5" width="154" height="20" image="/demon_battle/mana_board_02.png" />
            <Text name="value_text" x="58" y="18" width="120" height="12" font="author" text="" align="C" color="FFFFFFFF"/>
        </Widget>
		
    </Widget>
	
	</Widget>
	
	<AnimController autoPlay="1">
		<ActionGroup>
			<EfxPlaySound sound="demons_screen_open"/>			
			<EfxSendEvent event="back_pane" param="back_main"/>
			<EfxSendEvent event="reset_pane" param="shop"/>
			<EfxSendEvent event="shop_pane" param="empty"/>			
			<EfxSendEvent event="play_menu_right" param="demon"/>
		</ActionGroup>
	</AnimController>
	
    <Properties>
		<Property key="btn_selected">item_Demon</Property>
	</Properties>
    
    <AnimController autoPlay="1">
        <ActionGroup>
            <EfxSendCmd cmd="music_set_pl" param="Menu"/>
        </ActionGroup>
    </AnimController>
    
    <GPPanel x="360" y="315">
        <GPPanelIcon x="0" y="0" alias="rs" auto_visible="0"/>
        <GPPanelIcon x="40" y="0" alias="btn_lb" auto_visible="0"/>
    </GPPanel>
    
</Layout>
