<?xml version="1.0" encoding="utf-8" ?>
<Layout>
    <Image name="status_bar_bkg" x="24" y="0" image="/interface/up_board_2.png"/>

    <Widget x="0" y="0" xml="/interface/anim_status_bar.xml">
        <PaneController  name="status_bar" x="0" y="0" events="sb_change_pane">

            <Widget name="main" x="0" y="0">

                <StatusBarActionBox x="230" y="-10">
                    <Button name="status_bar_action_box" x="0" y="0" image="/shop_money/action_box_timer.png" create_if="$device.hasInAppSupport == true">
                        <Click cmd="show_bank" param="crossfade" />

                        <Text name="timer" x="30" y="22" width="100" height="20" font="author" text="99:99:99" align="C" color="FFFFE191"/>

                        <AnimController autoPlay="1">
                            <ActionChain>
                                <ActionRepeat delay="0.0" duration="0.0">
                                    <ActionChain>
                                        <EfxWait delay="18.0"/>

                                        <EfxScaleXY duration="0.3" from_x="1" from_y="1" to_x="1.2" to_y="1.2"/>
                                        <EfxScaleXY duration="0.3" from_x="1.2" from_y="1.2" to_x="1" to_y="1"/>
                                        <EfxScaleXY duration="0.3" from_x="1" from_y="1" to_x="1.2" to_y="1.2"/>
                                        <EfxScaleXY duration="0.3" from_x="1.2" from_y="1.2" to_x="1" to_y="1"/>
                                    </ActionChain>
                                </ActionRepeat>
                            </ActionChain>
                        </AnimController>

                    </Button>
                </StatusBarActionBox>

                <StatusBarQuestEndMsg x="0" y="0">
                    <StatusBarProgress name="progress" x="30" y="-7" alias="STATUS_BAR_PROGRESS">
                        <Text name="value" x="0" y="0" width="326" height="50" font="font" text="" align="W"/>
                    </StatusBarProgress>

                    <Text name="text" x="76" y="-8" width="300" height="50" font="font" text="" align="W"/>
                </StatusBarQuestEndMsg>

                <Widget x="390" y="-22">
                    <StatusBarItem x="0" y="0" commodity="disable_repetitions">
                        <Button name="icon_on" x="0" y="0" image="/interface/border_norepeat.png" color="FFFFFFFF">
                            <Click cmd="msg_box_commodity" param="disable_repetitions" />
                        </Button>

                        <Button name="icon_off" x="0" y="0" image="/interface/border_norepeat.png" color="80FFFFFF">
                            <Click cmd="msg_box_commodity" param="disable_repetitions" />
                        </Button>

                        <AnimController name="flash" autoPlay="0">
                            <ActionChain>
                                <EfxColor duration="0.2" from="FFFFFFFF" to="00FFFFFF"/>
                                <EfxColor duration="0.2" from="00FFFFFF" to="FFFFFFFF"/>
                                <EfxColor duration="0.2" from="FFFFFFFF" to="00FFFFFF"/>
                                <EfxColor duration="0.2" from="00FFFFFF" to="FFFFFFFF"/>
                            </ActionChain>
                        </AnimController>
                    </StatusBarItem>
                    <StatusBarItem x="54" y="0" commodity="gray">
                        <Button name="icon_on" x="0" y="0" image="/interface/border_finish.png" color="FFFFFFFF">
                             <Click cmd="msg_box_commodity" param="gray" />
                        </Button>

                        <Button name="icon_off" x="0" y="0" image="/interface/border_finish.png" color="80FFFFFF">
                              <Click cmd="msg_box_commodity" param="gray" />
                        </Button>
                    </StatusBarItem>

                    <StatusBarItem x="108" y="0" commodity="dotted">
                        <Button name="icon_on" x="0" y="0" image="/interface/border_dotted.png" color="FFFFFFFF">
                            <Click cmd="msg_box_commodity" param="dotted" />
                        </Button>

                        <Button name="icon_off" x="0" y="0" image="/interface/border_dotted.png" color="80FFFFFF">
                           <Click cmd="msg_box_commodity" param="dotted" />
                        </Button>
                    </StatusBarItem>

                    <StatusBarPentagram show_if="$device.getGameType == f2p | $device.getGameType == blitz" x="162" y="0" alias="STATUS_BAR_GROUPS">
                        <!-- ##################################### -->
                        <ProgressBarWidget name = "pentagram_progress" x = "63" y = "22">
                            <Properties>
                                <Property key="bar">mask</Property>
                                <Property key="dir">E</Property>
                            </Properties>
                            <Image x="0" y="0" name="mask" tex_rect="0,0,120,36" image="/interface/toolbar_penta_progress_02.png" />
                        </ProgressBarWidget>
                        <!-- -->
                        <Image x="36" y="21" width="155" height="45" name="mask_bar" image="/interface/toolbar_penta_progress_01.png" />
                        <!-- -->
                        <Text name="pentagram_stat" x="70" y="28" width="100" height="20" font="author" text="20/20" align="C" color="FFFFE191"/>
                        <Text name="pentagram_more" x="20" y="60" width="200" height="20" font="small" text="" align="C" color="FFFFFFFF" visible="false"/>
                        <Button name="button" x="180" y="2" image="/interface/plus_energy.png" create_if="$device.hasInAppSupport == true">
                            <Click cmd="layout" param="Shop">
                                <Param value="crossfade"/>
                            </Click>
                        </Button>
                        <!--  #################################### -->
                        <Button name="pentagram_btn" x="0" y="0" image="/interface/border_pentagram_01.png">
                            <State name="1" image="/interface/border_pentagram_01.png"/>
                            <State name="2" image="/interface/border_pentagram_02.png"/>
                            <State name="3" image="/interface/border_pentagram_03.png"/>


                            <Click cmd="layout" param="Shop">
                                <Param value="crossfade"/>
                            </Click>

                            <AnimController name="flash_on" autoPlay="0" events="pentagram_flash_on">
                                <ActionRepeat repeat="-1">
                                    <ActionChain>
                                        <EfxColor duration="0.5" from="00FFFFFF" to="FFFFFFFF"/>
                                        <EfxColor duration="0.5" from="FFFFFFFF" to="00FFFFFF"/>
                                    </ActionChain>
                                </ActionRepeat>
                            </AnimController>

                            <AnimController name="flash_off" autoPlay="0" events="pentagram_flash_off">
                                <ActionChain>
                                    <EfxColor duration="0.2" from="00FFFFFF" to="FFFFFFFF"/>
                                </ActionChain>
                            </AnimController>
                        </Button>
                    </StatusBarPentagram>
                </Widget>

                <ManaWidget x="825" y="0" xml="/shop/sb_mana_short.xml"  create_if="$device.hasInAppSupport == true"/>

                <Button name="status_bar_energy" x="916" y="-17" create_if="$device.hasInAppSupport == true">
                    <Image name="button" x="0" y="0" image="/interface/plus_energy.png">
                        
                    </Image>
                    <!--Image name="button" x="0" y="0" image="/interface/plus_energy.png" /-->
                    <Click cmd="show_bank" param="crossfade" />
                </Button>
                <Particles name="ps_star1" x="942" y="11" file="/main_menu/win8_far_star2.ps" />

            </Widget>

            <!-- HINT 2 TITLE -->
            <Widget name="hint2">
                <Text x="152" y="-7" width="700" height="50" font="font" text="HINT2_TITLE" align="C"/>

                <AnimController autoPlay="1">
                    <ActionGroup>
                        <EfxSendEvent delay="0" event="e_quest_hint2_controller">{"enable":true}</EfxSendEvent>

                        <ActionRepeat count="-1">
                            <ActionChain>
                                <EfxColor duration="0.5" from="FFFFFFFF" to="FFFF0000" modifier="sindiminish" />
                                <EfxColor duration="0.5" from="FFFF0000" to="FFFFFFFF" modifier="sindiminish" />
                            </ActionChain>
                        </ActionRepeat>
                    </ActionGroup>
                </AnimController>
            </Widget>
        </PaneController>

        <AnimController autoPlay="0" events="use_hint_2">
            <ActionGroup>
                <EfxSendEvent event="sb_change_pane" param="hint2"/>
            </ActionGroup>
        </AnimController>

        <AnimController autoPlay="1">
            <ActionGroup>
                <EfxSendEvent event="sb_change_pane" param="main"/>
            </ActionGroup>
        </AnimController>

    </Widget>

    <EventSwitchWidget event="e_quest_hint2_controller">
        <Case id="e_user_interaction" group="hide"/>

        <Group id="hide">
            <Event id="e_quest_hint2_controller">{"enable":false,}</Event>
            <Event id="sb_change_pane">{"page":"main",}</Event>
        </Group>
    </EventSwitchWidget>
</Layout>
