<!-- normal header container used on all screens except the match screen -->
<panel>
  <layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true"/>

  <boolean id="should_force_refresh" value="true"/>

  <!-- coloured title bar image -->
  <widget class="picture" id="colb" file="interface/header/titlebar" rthr="68">
    <!-- set the colour of the image to the team background colour -->
    <record id="object_property">
      <integer id="get_property" value="tbcl" />
      <integer id="set_property" value="colr" />
    </record>
  </widget>

  <container>
    <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
    <layout class="arrange_horizontal_attachment" layout="0, 300, -1" offset="0" gap="0" />
      <container/>
        <widget class="picture" id="lftB" auto_size="all">
	  <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
	  <record id="object_property">
	    <integer id="get_property" value="mbpc"/>
	    <integer id="set_property" value="file"/>
	  </record>	
        </widget>
      <container/>	
  </container>

  <container>
    <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
    <layout class="arrange_horizontal_attachment" layout="-1, 300, 0" offset="0" gap="0" />
      <container/>
        <widget class="picture" id="rigB" auto_size="all">
	  <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
	  <record id="object_property">
	    <integer id="get_property" value="sbpc"/>
	    <integer id="set_property" value="file"/>
	  </record>	
        </widget>
      <container/>	
  </container>

  <!-- battery indicator, only shows up for laptops -->
  <container>
    <layout class="arrange_horizontal_attachment" alignment="right" gap="0" offset="3"/>
    <layout class="stick_to_sides_attachment" alignment="top" inset="0" layout_children="true" />
    <layout class="stick_to_sides_attachment" alignment="top, right" inset="0"/>

    <layout class="fit_children_attachment" alignment="vertical"/>
    <layout class="fit_children_attachment" alignment="horizontal, fill" offset="3"/>

    <widget class="battery_power_indicator" width="20" height="20"/>
  </container>

  <!-- main logos container -->
  <container id="MnLg">
    <layout class="arrange_horizontal_attachment" alignment="left,extend" offset="0" gap="0"/>
    <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true"/>

    <!--spacer-->
    <container width="10">
      <attachment class="test_global_attachment" get_property="MnuS" mode="0" value="true" set_property="hidn" skip_if_null="true"/>
    </container>

    <!--home button-->
    <widget class="button" id="homb" click_event="home" auto_size="all" appearance="button/exit match/button">
      <layout class="centre_in_parent_attachment" alignment="vertical"/>
      <attachment class="test_global_attachment" get_property="MnuS" mode="0" value="true" set_property="hidn" skip_if_null="true"/>
    </widget>

    <!--spacer-->
    <container width="12">
      <attachment class="test_global_attachment" get_property="MnuS" mode="0" value="true" set_property="hidn" skip_if_null="true"/>
    </container>

    <!--left sided main logo and quick flicks-->
    <container id="flik" width="100">
      <layout class="arrange_horizontal_attachment" layout="-1, 18" gap="0" inset="0"/>

      <!-- Primary Logo -->
      <widget class="picture" id="lgtF" scale_picture="true" keep_aspect_ratio="true" image_alignment="centre">
        <layout class="stick_to_sides_attachment" alignment="vertical" inset="10"/>

        <attachment class="test_setting_attachment" get_setting="show_badges" default_value="true" set_property="hidn">
          <boolean id="value" value="false"/>
        </attachment>

        <!-- tells the picture to listen to the 'main picture' global property being set, and set its own file property from it -->
        <record id="object_property">
          <integer id="get_property" value="mnpc" />
          <integer id="set_property" value="file" />
        </record>
      </widget>

      <container>
        <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>

        <widget class="quick_flick_button" id="flkl" auto_size="all" appearance="button/custom/quickflicks/left/button" cached="true" step="-1">
          <layout class="stick_to_sides_attachment" alignment="left" inset="0"/>
          <layout class="stick_to_sides_attachment" alignment="top" inset="18"/>

          <attachment class="get_global_attachment" get_property="stPQ" set_property="clke"/>
        </widget>

        <widget class="quick_flick_button" id="flkr" auto_size="all" appearance="button/custom/quickflicks/right/button" cached="true" step="1">
          <layout class="stick_to_sides_attachment" alignment="left" inset="0"/>
          <layout class="stick_to_sides_attachment" alignment="top" inset="38"/>

          <attachment class="get_global_attachment" get_property="stNQ" set_property="clke"/>
        </widget>
      </container>

    </container>

    <!-- manager and club names -->
    <container id="text">
      <layout class="arrange_vertical_attachment" alignment="top, extend" gap="-3" offset="18"/>
      <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true"/>

      <container height="25">

        <layout class="arrange_horizontal_attachment" alignment="left,extend" offset="0" gap="2" />
        <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true" />

        <!-- title area -->
        <widget class="text" id="sect" alignment="left, top" size="14.5" style="bold, shadowed" multiline="false" auto_size="all">
          <record id="object_property">
            <list id="get_properties">
              <record>
                <integer id="get_property" value="titl" />
                <integer id="set_property" value="text" />
              </record>
              <record>
                <integer id="get_property" value="ttcl" />
                <integer id="set_property" value="colr" />
              </record>
            </list>
          </record>
        </widget>

        <!-- Context Menu -->
        <widget class="popup_button" id="" auto_size="all" appearance="button/custom/quickflicks/right" fixed="true">

          <layout class="stick_to_sides_attachment" alignment="top" inset="5"/>
          <attachment class="get_global_attachment" get_property="lnks" set_property="itms" />
          <attachment class="test_global_attachment" get_property="lnks" set_property="hidn">
            <list id="value">
              <integer value="0" />
            </list>
          </attachment>
        </widget>

      </container>

      <!-- description -->
      <widget class="text" id="subs" size="9" style="shadowed" alignment="left, top" multiline="false" auto_size="all">
        <record id="object_property">
          <list id="get_properties">
            <record>
              <integer id="get_property" value="subt" />
              <integer id="set_property" value="text" />
            </record>
            <record>
              <integer id="get_property" value="ttcl" />
              <integer id="set_property" value="colr" />
            </record>
          </list>
        </record>
      </widget>

<!--instant match button-->
    	<widget class="button" text="INSTANT RESULT[COMMENT: text for a button that will generate an instant result for the upcoming match rather than having to go through and play it]" id="INST" size="8" appearance="button/custom/continue/instant/button" width="120" height="0" font="fonts/continue instant" colour="red" alignment="center" disable_layout_attachments_when_embedded="true">
    		<record id="click_event" event_id="INST" event_target="glob"/>
    		<layout class="stick_to_sides_attachment" alignment="top" inset="60" />
		<layout class="stick_to_sides_attachment" alignment="right" inset="345" />	
    		<attachment class="test_global_attachment" get_property="sect" mode="1" set_property="hidn">
    			<list id="value">
    				<integer value="phtc"/>
    				<integer value="PhcT"/>
    				<integer value="PhcP"/>
    				<integer value="PhcS"/>
    				<integer value="PhcN"/>
    				<integer value="PhcC"/>
    				<integer value="PhcF"/>
    				<integer value="patc"/>
    				<integer value="PacT"/>
    				<integer value="PacP"/>
    				<integer value="PacS"/>
    				<integer value="PacN"/>
    				<integer value="PacC"/>
    				<integer value="PacF"/>
    			</list>
    		</attachment>
    	</widget>
    </container>

  </container>

</panel>

