<?xml version="1.0" encoding="UTF-8"?>

<!-- this file lists the global panels that should be installed -->
<panel>
	<layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true"/>

	<widget class="background" file="backgrounds/default" id="bgnd">
		<record id="object_property">
			<integer id="get_property" value="bgnd" />
			<integer id="set_property" value="file" />
		</record>
	</widget>

	<container file="background_selector/backgrounds"/>

	<container class="plain_box" id="iblk" appearance="boxes/black/paper">
		<attachment class="test_global_attachment" get_property="FS  " value="false" set_property="hidn" />
		<layout class="stick_to_sides_attachment" alignment="all" inset="0"/>
	</container>

	<container>
		<layout class="arrange_vertical_attachment" alignment="top, extend" gap="0" offset="0"/>
		<layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true"/>

		<!-- header area at top of screen - with title, menus, etc -->
		<container id="head" class="header_panel">

			<!-- hide this panel in "navigation disabled" mode -->
			<attachment class="test_global_attachment" get_property="FS  " value="true" set_property="hidn" />

			<record id="object_property">
				<integer id="get_property" value="objt" />
				<integer id="set_property" value="objt" />
			</record>
		</container>

		<container>
			<layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true"/>

			<!-- match - covers entire lower part of screen when looking at a match -->
			<widget class="match_highlights_panel" id="full" pitch_unique_id="full">

				<attachment class="test_multiple_globals_attachment" default_value="true">
					<list id="get_properties">
						<record get_property="MatS" test_mode="0" value="false" skip_if_null="true"/>
						<record get_property="nfsM" test_mode="0" comparison_mode="1" value="true" skip_if_null="true"/>
						<record get_property="dtty" test_mode="1" comparison_mode="1" value="53" skip_if_null="true"/>
					</list>
					<integer id="set_property" value="hidn"/>
				</attachment>

				<record id="object_property">
					<integer id="get_property" value="objt" />
					<integer id="set_property" value="objt" />
				</record>
			</widget>

			<!-- rest of the panels -->
      <container>
        <layout class="arrange_vertical_attachment" alignment="top, extend" gap="0" offset="0"/>
        <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true"/>

        <!--actions bar-->
        <container height="45" diAN="true">
          <layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true"/>

          <attachment class="test_event_attachment" event_id="shAC" get_property="hidn" set_property="hidn"/>

          <!-- Only enable animations on the full match screen and when auto-hide is on -->
          <attachment class="test_multiple_globals_attachment" default_value="true">
            <list id="get_properties">
              <record get_property="MaMi" test_mode="0" value="true" default_value="true"/>
              <record get_property="dsAH" test_mode="0" comparison_mode="1" value="true" skip_if_null="true"/>
              <record get_property="dsAO" test_mode="0" comparison_mode="1" value="true" skip_if_null="true"/>
            </list>
            <integer id="set_property" value="diAN"/>
          </attachment>

          <!-- Convert mouse enter/exit into animation trigger events so that other widgets can also use these triggers -->
          <!-- animation_relay_attachment get disabled when animations are disbaled to prevent them from wastefully firing in the rest of the game -->
          <attachment class="animation_relay_attachment" event_id="msen">
            <record id="action_event">
              <flags id="event_id" value="SliM"/>
              <integer id="evfl" value="7" />
              <flags id="evtg" value="root" />
            </record>
          </attachment>
          <attachment class="animation_relay_attachment" event_id="msex">
            <record id="action_event">
              <flags id="event_id" value="SloM"/>
              <integer id="evfl" value="7" />
              <flags id="evtg" value="root" />
            </record>
          </attachment>

          <!-- These events are sent by modal popup panels on the match screen to disable animations when they are opened and then re-enable them when closed -->
          <attachment class="event_relay_attachment" event_id="DsAn">
            <record id="action_event">
              <flags id="event_id" value="SETP"/>
              <flags id="id" value="pasA" />
              <boolean id="value" value="true" />
            </record>
          </attachment>
          <attachment class="event_relay_attachment" event_id="EnAn">
            <record id="action_event">
              <flags id="event_id" value="SETP"/>
              <flags id="id" value="pasA" />
              <boolean id="value" value="false" />
            </record>
          </attachment>

          <!-- An animations to ensure that the panel's default position is off the screen -->
          <animation class="translate_animation" start_value="0,-36" end_value="0,-36" duration="2" end_mode="hold_end" coord_mode="absolute_to_target" apply_to_mouse="false"/>
          <!--slide in on mouse enter-->
          <animation class="translate_animation" trigger_start="SliM" trigger_end="SloM" end_mode="hold_auto_reverse_hold" coord_mode="absolute_to_target" apply_to_mouse="false">
            <!-- This is really just a normal slide out but some extra waiting is required at the end to compensate for a timing issue when pausing -->
            <list id="storyboard">
              <record interval="0.0" value="0,0" tween="ease_in_out"/>
              <record interval="0.3" value="0,36" tween="linear"/>
              <record interval="0.4" value="0,36" tween="linear"/>
            </list>
          </animation>

          <!-- coloured actions bar image -->
          <widget class="picture" id="ACTb" file="">
            <attachment class="test_multiple_globals_attachment" default_value="true">
              <list id="get_properties">
                <record get_property="TTyp" test_mode="1" value="2" skip_if_null="false"/>
                <record get_property="dtty" test_mode="1" comparison_mode="1" value="53" skip_if_null="true"/>
              </list>
              <integer id="set_property" value="hidn"/>
            </attachment>
          </widget>

          <!-- coloured actions bar image (match)-->
          <widget class="picture" id="macb" file="interface/header/actions/bar">
            <attachment class="test_multiple_globals_attachment" default_value="true">
              <list id="get_properties">
                <record get_property="TTyp" test_mode="1" value="2" skip_if_null="false"/>
                <record get_property="dtty" test_mode="1" comparison_mode="1" value="53" skip_if_null="false"/>
              </list>
              <integer id="set_property" value="hidn"/>
            </attachment>
          </widget>

          <!-- actions bar -->
          <container class="menu_strip" id="acts" appearance="interface/header/actions/bar" offset="10" gap="10" default_widget_type="action_button_action" submenu_type="popup_button_actions" separator_type="picture">
            <record id="default_widget_properties"/>
            <record id="submenu_properties" fixed="true">
              <event id="click_notification_event" event_id="DMCN" item="NULL"/>
              <event id="menu_layout_notification_event" event_id="MLNO"/>
            </record>
            <record id="separator_properties" file="interface/actions_separator" auto_size="horizontal" height="52"/>
            <record id="more_button_properties"/>
          </container>
        </container>

        <container class="plain_box" >
          <layout class="arrange_vertical_attachment" alignment="bottom, extend" gap="0" offset="0"/>
          <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true"/>

          <!-- main area - contains sections/actions panel and content areas -->
          <container id="main" >
            <layout class="arrange_horizontal_attachment" alignment="middle, extend" gap="0" offset="0"/>
            <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true"/>


            <!-- screen content area -->
            <container id="scca" auto_size="horizontal">
              <layout class="stick_to_sides_attachment" alignment="all" layout_children="true" inset="0"/>
            </container>

          </container>


          <!-- footer area at bottom of screen -->
          <container id="foot" file="footer"/>
        </container>
      </container>
    </container>
  </container>

</panel>
