#-------------------------------#
# Create  special buttons    	#
#-------------------------------#

set ov_arm_enable 0
set ov_cam_enable 0

proc create_special_button { } {

global cam_ena arm_ena teleos_ena


# Frame to hold the 4 special buttons
set spec .ventana.editor.special
frame $spec -bg black


set cam_ena $spec.cam_enable
set arm_ena $spec.arm_enable
set auto_ena $spec.auto_enable
set teleos_ena $spec.teleos_enable
set bp_ena $spec.belly_enable
set pilot_interface_ena $spec.pilot_interface_enable

button $cam_ena -text "Camera Enable" -wraplength 50
button $arm_ena -text "Arm Enable" -wraplength 50
button $teleos_ena -text "Rock On" -wraplength 50
button $spec.pilot_interface_ena -text "Pilot Interface" -wraplength 70

pack $cam_ena $arm_ena $teleos_ena $spec.pilot_interface_ena -side left
place $spec -x 0 -y 500

bind $cam_ena <ButtonPress-1> {
	
	if { [$cam_ena cget -relief ] == "raised" } {
		sending_camera_enable 1
		$cam_ena configure -relief sunken
		$cam_ena configure -bg white
		set ov_cam_enable 1
	} else {
		sending_camera_enable 0
		$cam_ena configure -relief raised
		$cam_ena configure -bg grey
		set ov_cam_enable 0
	}
}



bind $arm_ena <ButtonPress-1> {
	
	if { [$arm_ena cget -relief ] == "raised" } {
		switch_arm_enable 1
		$arm_ena configure -relief sunken
		$arm_ena configure -bg white
		set ov_arm_enable 1
	} else {
		switch_arm_enable 0
		$arm_ena configure -relief raised
		$arm_ena configure -bg grey
		set ov_arm_enable 0
	}
}


bind $teleos_ena <ButtonPress-1> {
	
	if { [$teleos_ena cget -relief ] == "raised" } {
		
		switch_teleos_enable 1
		$teleos_ena configure -relief sunken
		$teleos_ena configure -bg white
		
	} else {
		switch_teleos_enable 0
		$teleos_ena configure -relief raised
		$teleos_ena configure -bg grey
	}
}

bind $spec.pilot_interface_ena <ButtonPress-1> {
	#if { [ $spec.pilot_interface_ena cget -relief ] == "raised" } {
		
		#pilot_interface
		#$spec.pilot_interface_ena configure -relief sunken
		#$spec.pilot_interface_ena configure -bg white
		
	#} else {
		#$spec.pilot_interface_ena configure -relief raised
		#$spec.pilot_interface_ena configure -bg grey
	pilot_interface
	#	}
}


# end of proc create_special_button
}
