###############################################################################
#
# menu-gui.txt
# original menu GUI for XR7: EarthStrike developed by Drake Analytics, Inc.
# www.xandis.com
#
# GUIs are simple in XR7 and represent just enough to get input from
# the player and nothing more. No frills but reasonable flexibility to
# ensure that most "looks" can be supported one way or the other.
#
# Note that the GUI-spec will refer to images that are defined in the
# level data file. Images and references in the GUI are based on screen
# coordinates (transformed). So, they are integers and do not include the
# Z axis. XR7 operates in an 800x600 environment.
#
# *** NOTE ***
#	The 'id' values of the buttons should not be changed since the program
#	itself expects these ids for particular buttons.
#
#	Since the sprites are all transformed and the PtInRect is always dealing
#	in a 2D environment the Z value is always 0.0f.
#
###############################################################################

######### MOUSE ##########
#
# Only one mouse is referenced per GUI. A mouse is
# defined by a SPRITE in the normal level data file. 
# 
def mouse MOUSE
	id		= 1
	hitpoint	= 0 0		# an offset into the mouse sprite
	image		= GUIMouse	# sprite image defined in the level data file
	pos		= 400 300	# starting point for mouse
	speed		= 1		# update mouse rate (bigger means slower rate)
end

########## BUTTONS #########
#
# The menu GUI has only buttons and the mouse.
# Buttons have various states (normal, mouse over, etc.) and
# can show a different image depending on the state.
# (See the setup-gui.txt for usage of the checkbox and radio
# button flags.)
#
# STATES = NOTSELECTED MOUSEOVER_NOTSELECTED MOUSEDOWN_NOTSELECTED
#	   SELECTED MOUSEOVER_SELECTED MOUSEDOWN_SELECTED
#
# It is _not_ necessary to have a unique image for each state.
# (In this case, only 4 states have unique images since the other
# states aren't really used.)
#
def button Play
	id		= 2
	family		= 2
	value		= 0 0 0 1 1 1
	image		= GUIPlayBtn1 GUIPlayBtn2 GUIPlayBtn3 GUIPlayBtn4
	pos		= 100 100		# position on screen
	hitbox		= 114 188 345 240	# hitbox absolute screen coordinates
	checkbox	= f
	radio		= f
	selected	= f
end

def button Setup
	id		= 3
	family		= 3
	value		= 0 0 0 1 1 1
	image		= GUISetupBtn1 GUISetupBtn2 GUISetupBtn3 GUISetupBtn4
	pos		= 100 180		# position on screen
	hitbox		= 114 268 345 320	# hitbox absolute screen coordinates
	checkbox	= f
	radio		= f
	selected	= f
end

def button HighScores
	id		= 4
	family		= 4
	value		= 0 0 0 1 1 1
	image		= GUIScoresBtn1 GUIScoresBtn2 GUIScoresBtn3 GUIScoresBtn4
	pos		= 100 260		# position on screen
	hitbox		= 114 348 345 400	# hitbox absolute screen coordinates
	checkbox	= f
	radio		= f
	selected	= f
end

def button Quit
	id		= 5
	family		= 5
	value		= 0 0 0 1 1 1
	image		= GUIQuitBtn1 GUIQuitBtn2 GUIQuitBtn3 GUIQuitBtn4
	pos		= 640 470
	hitbox		= 662 489 746 573
	checkbox	= f
	radio		= f
	selected	= f
end

### END OF GUI ITEM DEFINITIONS

