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

	<controlDefinition name="progressBarBlue"
		controller="de.ceiphren_Inc.pirateHell.controller.ProgressBarController">
		<image filename="gui/screensMission/bossHealthBar.png"
			imageMode="resize:76,1,76,21,76,1,76,0,76,1,76,21" childLayout="center">

			<image id="progress" filename="gui/screensMission/healthBarRed.png" align="center" valign="center" 
				imageMode="resize:0,1,0,12,0,1,0,1,0,1,0,12"  height="25px"/>
		</image>
	</controlDefinition>
	
	<controlDefinition name="progressBarViolet"
		controller="de.ceiphren_Inc.pirateHell.controller.ProgressBarController">
		<image filename="gui/screensMission/reloadBar.png"
			imageMode="resize:39,1,38,16,39,1,38,0,39,1,38,16" childLayout="center">

			<image id="progress" filename="gui/screensMission/reloadBarViolet.png" align="center" valign="center" 
				imageMode="resize:0,1,0,9,0,1,0,1,0,1,0,8"  height="18px"/>
		</image>
	</controlDefinition>

	<controlDefinition style="pirate-textfield" name="textfield"
		controller="de.lessvoid.nifty.controls.textfield.TextFieldControl"
		inputMapping="de.lessvoid.nifty.controls.textfield.TextFieldInputMapping"
		passwordChar="$passwordChar" maxLength="$maxLength">
		<panel style="#panel" focusable="true">
			<interact onClick="onClick()" onClickMouseMove="onClickMouseMove()" />
			<panel id="#field" style="#field" visibleToMouse="true">
				<text id="#text" style="#text" text="$text" />
			</panel>
			<panel style="#cursor-panel">
				<image id="#cursor" style="#cursor" />
			</panel>
		</panel>
	</controlDefinition>

	<controlDefinition name="pirate-button-normal"
		controller="de.ceiphren_Inc.pirateHell.controller.ButtonController">

		<panel id="normalButton" style="menuButtonNormal" childLayout="absolute" focusable="true" >

			<effect>
				<onStartHover name="nop" onStartEffect="onEnter()" length="0" />
				<onEndHover name="nop" onStartEffect="onExit()" length="0" />
				<onGetFocus name="nop" onStartEffect="onEnter()" length="0" />
				<onLostFocus name="nop" onStartEffect="onExit()" length="0" />
				<onShow name="nop" onStartEffect="hideImage()" length="0" />
			</effect>

			<image id="#buttonImage" style="#hoverImage" x="0" y="0" visibleToMouse="false" />
			<text id="#button-label" style="#Text" text="" />
		</panel>
	</controlDefinition>
	
	<controlDefinition name="pirate-textButton-normal" >
		<panel id="textButton" childLayout="absolute" visibleToMouse="true" height="25px">
			<effect>
				<onStartHover name="hide" targetElement="#label"/>
				<onEndHover name="show" targetElement="#label" />
				<onFocus name="hide" targetElement="#label" />
				<onLostFocus name="show" targetElement="#label" />
			</effect>
			
			<text id="#background" font="gui/font/georgia_25_glow.fnt" text="$buttonlabel" x="0" y="0" />
			<text id="#label" font="gui/font/georgia_25_gold.fnt" text="$buttonlabel" x="0" y="0" />
		</panel>
	</controlDefinition>

	<controlDefinition name="build-button"
		controller="de.ceiphren_Inc.pirateHell.controller.BuildButtonController">

		<panel id="buildButton" height="70px" width="70px" childLayout="absolute"
			backgroundImage="gui/screensHarbour/buttonBuild_normal.png"
			visibleToMouse="true">

			<effect>
				<onStartHover name="nop" onStartEffect="onEnter()" length="0" />
				<onEndHover name="nop" onStartEffect="onExit()" length="0" />
				<onFocus name="nop" onStartEffect="onEnter()" length="0" />
				<onLostFocus name="nop" onStartEffect="onExit()" length="0" />
			</effect>

			<image id="#buttonImage" filename="gui/screensHarbour/buttonBuild_hovered.png"
				width="70" height="70" x="0" y="0" visibleToMouse="false" />
			<image id="#buttonLabelImage" filename="gui/screensHarbour/buildIcons.png" visibleToMouse="false" 
				imageMode="$buildIcon" x="0" y="0" width="70" height="70" >
				<effect>
					<onCustom name="fade" start="#5" end="#5" length="0" inherit="true" neverStopRendering="true" />
				</effect>	
			</image>
			<text id="#button-label" style="#Text" text="" />
		</panel>
	</controlDefinition>
	
	<controlDefinition name="rageAttack-button"
		controller="de.ceiphren_Inc.pirateHell.controller.ButtonController">

		<panel id="buildButton" height="70px" width="70px" childLayout="absolute"
			backgroundImage="gui/screensHarbour/buttonBuild_normal.png"
			visibleToMouse="true">

			<effect>
				<onStartHover name="nop" onStartEffect="onEnter()" length="0" />
				<onEndHover name="nop" onStartEffect="onExit()" length="0" />
				<onFocus name="nop" onStartEffect="onEnter()" length="0" />
				<onLostFocus name="nop" onStartEffect="onExit()" length="0" />
			</effect>

			<image id="#buttonImage" filename="gui/screensHarbour/buttonBuild_hovered.png"
				width="70" height="70" x="0" y="0" visibleToMouse="false" />
				
			<panel id="#buttonSelected" width="70" height="70" x="0" y="0" backgroundImage="gui/screensHarbour/buildButtons-glow.png" visibleToMouse="false" >
			
			</panel>
			<image id="#buttonLabelImage" filename="gui/screensHarbour/buildIcons.png" imageMode="$buildIcon" x="0" y="0" width="70" height="70" >
				<effect>
					<onCustom name="fade" start="#5" end="#5" length="0" inherit="true" neverStopRendering="true" />
				</effect>	
			</image>
			<text id="#button-label" style="#Text" text="" />
		</panel>
	</controlDefinition>

	<controlDefinition name="pirate-button-Large"
		controller="de.ceiphren_Inc.pirateHell.controller.ButtonController">

		<panel id="largeButton" style="menuButtonLarge" childLayout="absolute">
			<effect>
				<onStartHover name="nop" onStartEffect="onEnter()"
					length="0" />
				<onEndHover name="nop" onStartEffect="onExit()" length="0" />
			</effect>

			<image id="#buttonImage" style="#hoverImage" x="0" y="0"
				visibleToMouse="true" />
			<text id="#button-label" style="#Text" text="" />
		</panel>

	</controlDefinition>

	<controlDefinition name="pirate-upgrade"
		controller="de.ceiphren_Inc.pirateHell.controller.UpgradePanelController">

		<panel id="upgradePanel" width="100" height="60" childLayout="vertical" visibleToMouse="true">
		
			<panel childLayout="horizontal">
				<text id="#label" text="$text" font="gui/font/georgia_25_gold.fnt" valign="center" width="90" textHAlign="left" />
				
				<text id="#cost" text="" font="gui/font/georgia_25_gold.fnt" valign="center" width="80" textHAlign="left" />
			</panel>
		
			<panel childLayout="horizontal" padding="0px,0px,0px,50px">
				<panel id="#minus" backgroundImage="gui/screensHarbour/buttonMinus.png" width="27" height="11" valign="center" visibleToMouse="true" focusable="true">
					<interact onClick="minus()"/>
					<effect>
						<onFocus name="imageOverlay" filename="gui/screensHarbour/buttonMinus_focused.png" post="true" />
					</effect>
				</panel>
				
				<panel id="#levelPanel" width="120" height="50" valign="center" childLayout="horizontal"/>
				
				<panel id="#plus" backgroundImage="gui/screensHarbour/buttonPlus.png" width="27" height="27" valign="center" visibleToMouse="true" focusable="true">
					<interact onClick="plus()"/>
					<effect>
						<onFocus name="imageOverlay" filename="gui/screensHarbour/buttonPlus_focused.png" post="true" />
					</effect>
				</panel>
			</panel>
		</panel>
	
	</controlDefinition>
	
    <controlDefinition name="pirateCheckbox" style="pirateCheckBox-style" controller="de.lessvoid.nifty.controls.checkbox.CheckboxControl">
		<panel style="#panel" focusable="true" visibleToMouse="true">
			<interact onClick="onClick()" /> 
			<image id="#select" style="#select" />
		</panel>
	</controlDefinition>

</nifty-controls>