<?xml version="1.0" encoding="UTF-8"?>
<nifty xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="nifty.xsd">

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- register effects we want to use -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <registerEffect name="colorBar" class="de.lessvoid.nifty.effects.ColorBar" />
  <registerEffect name="textColor" class="de.lessvoid.nifty.effects.TextColor" />
  <registerEffect name="textSize" class="de.lessvoid.nifty.effects.TextSize" />
  <registerEffect name="textSizePulsate" class="de.lessvoid.nifty.effects.TextSizePulsate" />
  <registerEffect name="imageSize" class="de.lessvoid.nifty.effects.ImageSize" />
  <registerEffect name="imageSizePulsate" class="de.lessvoid.nifty.effects.ImageSizePulsate" />
  <registerEffect name="pulsate" class="de.lessvoid.nifty.effects.Pulsate" />
  <registerEffect name="blendIn" class="de.lessvoid.nifty.effects.BlendIn" />
  <registerEffect name="moveIn" class="de.lessvoid.nifty.effects.MoveIn" />
  <registerEffect name="moveOut" class="de.lessvoid.nifty.effects.MoveOut" />
  <registerEffect name="particle" class="de.lessvoid.nifty.effects.Particle" />

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- blendAllOut effect -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <effectGroup id="blendAllOut">
    <for>
      <id>topPanel</id>
      <id>topLogo</id>
      <id>mainPanel</id>
      <id>mainMenu</id>
      <id>newGame</id>
      <id>loadGame</id>
      <id>options</id>
      <id>exit</id>
      <id>slickLogo</id>
      <id>niftyLogo</id>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="500"/>
    </for>
  </effectGroup>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- switch effect -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <effectGroup id="switch">
    <for>
      <id>topPanel</id>
    </for>
    <for>
      <id>topLogo</id>
    </for>
    <for>
      <id>mainPanel</id>
      <onStartScreen name="moveIn" direction="bottom" length="200" />
      <onEndScreen name="moveOut" direction="bottom" length="200" startDelay="0" />
    </for>
    <for>    
      <id>newGame</id>
      <id>options</id>
      <onStartScreen name="moveIn" direction="right" length="200" startDelay="300"/>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
      <onEndScreen name="moveOut" direction="left" length="200" startDelay="100"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="100"/>
      <onHover name="pulsate" startColor="#00000090" endColor="#00c00080" width="170%" />      
    </for>
    <for>
      <id>loadGame</id>
      <id>exit</id>
      <onStartScreen name="moveIn" direction="left" length="200" startDelay="300"/>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
      <onEndScreen name="moveOut" direction="right" length="200" startDelay="100"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="100"/>
      <onHover name="pulsate" startColor="#00000090" endColor="#00c00080" width="170%" />
    </for>
    <for>
      <id>slickLogo</id>
      <id>niftyLogo</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="500"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="200"/>
    </for>
  </effectGroup>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- start screen effect -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <effectGroup id="mainMenuEffects">
    <for>
      <id>topPanel</id>
      <onStartScreen name="moveIn" direction="top" length="200" />
    </for>
    <for>
      <id>topLogo</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
    </for>
    <for>
      <id>mainPanel</id>
      <onStartScreen name="moveIn" direction="bottom" length="200" />
      <onEndScreen name="moveOut" direction="bottom" length="200" startDelay="0" />
    </for>
    <for>    
      <id>newGame</id>
      <id>options</id>
      <onStartScreen name="moveIn" direction="right" length="200" startDelay="300"/>
      <onEndScreen name="moveOut" direction="left" length="200" startDelay="100"/>
    </for>
    <for>
      <id>loadGame</id>
      <id>exit</id>
      <onStartScreen name="moveIn" direction="left" length="200" startDelay="300"/>
      <onEndScreen name="moveOut" direction="right" length="200" startDelay="100"/>
    </for>
    <for>    
      <id>newGame</id>
      <id>options</id>
      <id>loadGame</id>
      <id>exit</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="100"/>
      <onHover name="textSize" maxSize="20%" falloffConstraint="vertical" falloffType="linear" hoverWidth="parent:300%" hoverHeight="350%"/>
      <onHover name="textSizePulsate" startSize="20%" endSize="30%" hoverWidth="parent:300%" />
      <onHover name="colorBar"  color="#90000090" hoverWidth="parent:300%" width="parent:300%"/>
      <onHover name="textColor" color="#00cc00ff" hoverWidth="parent:300%"/>
    </for>
    <for>
      <id>slickLogo</id>
      <id>niftyLogo</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="500"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="200"/>
    </for>
  </effectGroup>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- standard screen effect -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <effectGroup id="newGameEffects">
    <for>
      <id>mainPanel</id>
      <onStartScreen name="moveIn" direction="bottom" length="200" />
      <onEndScreen name="moveOut" direction="bottom" length="200" startDelay="200" />
    </for>
    <for>    
      <id>easy</id>
      <id>normal</id>
      <id>hard</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="200"/>
      <onHover name="imageSize" maxSize="20%" falloffType="linear" falloffConstraint="both" hoverHeight="200%" hoverWidth="200%"/>
      <onHover name="imageSizePulsate" startSize="20%" endSize="35%" effectTime="100"/> 
    </for>
    <for>
      <id>return</id>
      <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="300"/>
      <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="100"/>
      <onHover name="textSize" maxSize="20%" falloffConstraint="vertical" falloffType="linear" hoverWidth="parent:300%" hoverHeight="350%"/>
      <onHover name="textSizePulsate" startSize="20%" endSize="30%" hoverWidth="parent:300%" />
      <onHover name="colorBar" color="#90000090" hoverWidth="parent:300%" width="parent:300%"/>
      <onHover name="textColor" color="#00cc00ff" hoverWidth="parent:300%"/>
    </for>
  </effectGroup>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- start screen -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <screen id="start" controller="de.lessvoid.nifty.demo.Splash">
    <layer id="stuff" layout="vertical" backgroundColor="#000000ff">
      <panel id="topPanel" layout="center" backgroundImage="splash.tga">
        <effect>
          <onStartScreen name="blendIn" startColor="#ffffff00" endColor="#ffffffff" length="200" startDelay="500"/>
          <onEndScreen name="blendIn" startColor="#ffffffff" endColor="#ffffff00" length="200" startDelay="3500"/>
        </effect>
      </panel>
    </layer>  
  </screen>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- main menu screen -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <screen id="mainMenu" controller="de.lessvoid.nifty.demo.StartScreen" effectGroup="mainMenuEffects">
    <layer id="stuff" layout="vertical" backgroundColor="#000000ff">
      <panel id="topPanel" layout="center" height="22%" backgroundImage="top.tga">
        <image id="topLogo" filename="bfjse-logo.tga"/>
      </panel>
      <panel id="mainPanel" layout="center" height="78%" backgroundImage="bottom.tga" >
        <menu id="mainMenu" font="menu.fnt" layout="vertical" align="center" controller="de.lessvoid.nifty.demo.StartScreen">
          <menuItem id="newGame" text="New Game" effectGroupOverride="switch" onClick="newGame" hotSpotWidth="parent:300%" />
          <menuItem id="loadGame" text="Load Game" effectGroupOverride="switch" onClick="test" hotSpotWidth="parent:300%" />
          <menuItem id="options" text="Options" effectGroupOverride="switch" onClick="test" hotSpotWidth="parent:300%" />
          <menuItem id="exit" text="Exit" effectGroupOverride="blendAllOut" onClick="exit" hotSpotWidth="parent:300%" />
        </menu>      
      </panel>
    </layer>
    <layer id="logos" layout="vertical">
      <panel layout="center" height="*" />
      <panel layout="horizontal" height="7%">
        <image id="niftyLogo" filename="nifty.tga" valign="bottom" />
        <panel layout="center" width="*" backgroundColor="#00000000"/>
        <image id="slickLogo" filename="slick.tga" valign="bottom" />
      </panel>
    </layer>
  </screen>

  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <!-- new game screen -->
  <!-- +++++++++++++++++++++++++++++++++++++++ -->
  <screen id="newGame" controller="de.lessvoid.nifty.demo.NewGameScreen" effectGroup="newGameEffects">
    <layer layout="vertical" backgroundColor="#000000ff">
      <panel id="topPanel" layout="center" height="22%" backgroundImage="top.tga" >
        <image id="topLogo" filename="bfjse-logo.tga" />
      </panel>
      <panel id="mainPanel" layout="vertical" height="78%" backgroundImage="bottom.tga">
        <panel layout="center" height="70%">
          <panel layout="horizontal" width="90%" height="50%">
            <panel backgroundColor="#00ff0020" width="30%" layout="center">
              <image id="easy" filename="easy.tga" onClick="back"/>
            </panel>
            <panel width="5%" layout="center" />
            <panel backgroundColor="#0000ff20" width="30%" layout="center">
              <image id="normal" filename="normal.tga" onClick="back"/>
            </panel>
            <panel width="5%" layout="center" />
            <panel backgroundColor="#ff000020" width="30%" layout="center">
              <image id="hard" filename="hard.tga" onClick="back"/>
            </panel>
          </panel>
        </panel>
        <panel layout="center" height="30%">
          <menu font="menu.fnt" layout="vertical" align="center" controller="de.lessvoid.nifty.demo.NewGameScreen">
            <menuItem id="return" text="Return" onClick="back" hotSpotWidth="parent:300%"/>
          </menu>
        </panel>
      </panel>
    </layer>
  </screen>
  
</nifty>

