# Copyright (c) 2014 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.  See the GNU General Public License for more details.

# Colors used to reflect the active or hovered interface button.
color "hover" 1. 1. 1. 0.
color "active" .75 .75 .75 0.
color "inactive" .25 .25 .25 0.

# Colors generally used for drawing text or lines.
color "bright" .75 .75 .75 0.
color "medium" .5 .5 .5 0.
color "dim" .25 .25 .25 0.
color "faint" .1 .1 .1 0.

# Colors used for certain UI elements. These elements generally have a variable
# size (e.g. they may fit to the current screen dimensions).
color "panel background" .1 .1 .1 1.
color "dialog backdrop" 0. 0. 0. .7
color "conversation background" .125 .125 .125 1.
color "map side panel background" .125 .125 .125 1.
color "shop side panel background" .2 .2 .2 1.
color "shop side panel footer" .3 .3 .3 1.
color "tooltip background" .2 .2 .2 1.
color "logbook sidebar" .09 .09 .09 1.
color "logbook background" .125 .125 .125 1.
color "logbook line" .2 .2 .2 1.

# Colors used to draw certain HUD elements in-flight.
color "shields" .43 .55 .70 .75
color "hull" .70 .62 .43 .75
color "disabled hull" .3 0 0 .3
color "heat" .70 .43 .43 .75
color "overheat" .70 .61 .43 .75
color "energy" .6 .6 .6 .75
color "fuel" .70 .62 .43 .75

color "flagship highlight" .5 .8 .2 0.

color "drag select" .2 1. 0. 0.

# Colors used for drawing mission or job pointers on the map,
# to indicate where the player should go.
color "available job" .9 .6 0. 1.
color "available back" .5 .3 0. .5
color "unavailable job" .5 .3 0. 1.
color "unavailable back" .3 .1 0. .5
color "active mission" .2 .7 1. 1.
color "active back" 0. .4 .5 .5
color "blocked mission" 0. .4 .6 1.
color "blocked back" 0. .15 .2 .5
color "special mission" 1. 1. 1. 1.
color "waypoint" .1 .2 .9 1.
color "waypoint back" 0. .3 .7 .5

# Colors for the Escort HUD that is displayed in-flight.
color "escort present" .8 .8 .8 1.
color "escort elsewhere" .4 .4 .6 1.
color "escort not ready" .9 .8 0. 1.
color "escort blocked" .9 .2 0. 1.
color "escort selected" .2 .8 0. 1.
color "escort hostile" 1. .6 .4 1.

# Colors used when "status overlays" are enabled, and to show scan progress.
color "overlay friendly shields" 0. .5 0. .25
color "overlay friendly hull" .45 .5 0. .25
color "overlay friendly disabled" .5 0 0 .25
color "overlay hostile shields" .5 .15 0. .25
color "overlay hostile hull" .5 .3 0. .25
color "overlay hostile disabled" .3 .3 0 .25
color "overlay outfit scan" .5 .5 .5 .25
color "overlay cargo scan" .7 .7 .7 .25

# Colors used in the radar map while in-flight.
color "radar player" .2 1. 0. 0.
color "radar friendly" .4 .6 1. 0.
color "radar unfriendly" .8 .8 .4 0.
color "radar hostile" 1. .6 .4 0.
color "radar inactive" .4 .4 .4 0.
color "radar special" 1. 1. 1. 0.
color "radar anomalous" .7 0. 1. 0.
color "radar blink" 1. 1. 1. 0.
color "radar viewport" 0. .3 0. 0.

# Colors used for warning and error tooltip backdrops.
color "error back" .25 .1 .1 1.
color "warning back" .21 .18 .08 1.

# Colors used when drawing the map (system names, links, and the player's desired route).
# (The color of the ring that represents a given system is context-sensitive.)
color "map link" .6 .6 .6 .6
color "map name" .6 .6 .6 .6
color "map travel ok fleet" .2 .5 0. 0.
color "map travel ok flagship" .5 .4 0. 0.
color "map travel ok none" .55 .1 0. 0.
color "map used wormhole" .5 .2 .9 1.
color "map unused wormhole" .165 .066 .3 .333



interface "menu background"
	sprite "_menu/g0"
		center 0 -280
	sprite "_menu/forest2"
		center 0 280
	sprite "_menu/oberon"
		center 140 180



interface "main menu"
	sprite "_menu/compass"
		center 0 0
	sprite "_menu/title"
		center 0 -170
	sprite "_menu/side panel"
		center -360 0
	sprite "_menu/side panel"
		center 360 0
	
	visible if "pilot loaded"
	button e "_Enter Ship"
		center 435 155
		dimensions 90 30
	visible if "!pilot loaded"
	button n "_New Pilot"
		center 435 155
		dimensions 90 30
	
	visible
	button l "_Load / Save..."
		center 300 155
		dimensions 120 30
	
	# Left panel (credits):
	button q "_Quit"
		center -285 155
		dimensions 90 30
	button p "_Preferences..."
		center -420 155
		dimensions 120 30



interface "menu player info"
	outline "ship sprite"
		center 360 -90
		dimensions 120 120
	label "pilot:"
		from 250 -15
		align left
	string "pilot"
		from 310 -15
		align left
	label "ship:"
		from 250 5
		align left
	string "ship"
		from 310 5
		align left
	label "planet:"
		from 250 35
		align left
	string "planet"
		from 310 35
		align left
	label "system:"
		from 250 55
		align left
	string "system"
		from 310 55
		align left
	label "credits:"
		from 250 85
		align left
	string "credits"
		from 310 85
		align left
	label "date:"
		from 250 105
		align left
	string "date"
		from 310 105
		align left



interface "load menu"
	sprite "_menu/side panel"
		center -360 0
	sprite "_menu/side panel"
		center 0 0
	sprite "_menu/side panel"
		center 360 0
	
	button n "_New Pilot"
		center -420 155
		dimensions 120 30
	active if "pilot selected"
	button D "Delete"
		center -285 155
		dimensions 90 30
	
	active if "pilot alive"
	button a "_Add Snapshot"
		center -60 155
		dimensions 120 30
	active if "snapshot selected"
	button R "Remove"
		center 75 155
		dimensions 90 30
	
	active
	button b "_Back to Menu"
		center 300 155
		dimensions 120 30
	active if "pilot loaded"
	button l "_Load Game"
		center 435 155
		dimensions 90 30



interface "controls"
	sprite "ui/keys panel"
		center -65 -20
	button c "_Controls"
		center -300 -230
		dimensions 90 30
		color bright
	button s "_Settings"
		center -300 -190
		dimensions 90 30
		color medium
		hover bright
	button p "_Plugins"
		center -300 -150
		dimensions 90 30
		color medium
		hover bright



interface "settings"
	sprite "ui/settings panel"
		center -20 -20
	button c "_Controls"
		center -300 -230
		dimensions 90 30
		color medium
		hover bright
	button s "_Settings"
		center -300 -190
		dimensions 90 30
		color bright
	button p "_Plugins"
		center -300 -150
		dimensions 90 30
		color medium
		hover bright



interface "plugins"
	sprite "ui/settings panel"
		center -20 -20
	button c "_Controls"
		center -300 -230
		dimensions 90 30
		color medium
		hover bright
	button s "_Settings"
		center -300 -190
		dimensions 90 30
		color medium
		hover bright
	button p "_Plugins"
		center -300 -150
		dimensions 90 30
		color bright



interface "preferences"
	button b "_Back to Menu..."
		center 195 210
		dimensions 120 30
	bar "volume"
		from 280.5 15
		dimensions 0 -200
		color "energy"
		size 3



interface "hud"
	# Player status.
	anchor top right
	
	sprite "ui/status"
		from 0 0
		align top right
	
	string "location"
		from -20 25
		color "medium"
		align right
	string "date"
		from -20 45
		color "medium"
		align right
	string "credits"
		from -20 65
		color "medium"
		align right
	
	outline "player sprite"
		center -75 155
		dimensions 70 70
	ring "shields"
		center -75 155
		dimensions 120 120
		color "shields"
		size 1.5
	ring "hull"
		center -75 155
		dimensions 110 110
		color "hull"
		size 1.5
	ring "disabled hull"
		center -75 155
		dimensions 110 110
		color "disabled hull"
		size 1.5
	bar "fuel"
		from -53.5 425
		dimensions 0 -192
		color "fuel"
		size 2
	bar "energy"
		from -33.5 415
		dimensions 0 -192
		color "energy"
		size 2
	bar "heat"
		from -13.5 403
		dimensions 0 -192
		color "heat"
		size 2
	bar "overheat"
		from -13.5 403
		dimensions 0 -192
		color "overheat"
		size 2
	bar "overheat blink"
		from -13.5 403
		dimensions 0 -192
		color "dim"
		size 2

	# Targets.
	anchor top left
	sprite "ui/radar"
		from 0 0
		align top left
	point "radar"
		center 128 128
	value "radar radius" 110
	value "radar pointer radius" 130
	
	sprite "ui/navigation"
		from 200 0
		align top left
	string "navigation mode"
		from 215 20
		align left
		color "medium"
	string "destination"
		from 230 40
		align left
		color "medium"
	
	sprite "ui/target"
		from 0 240
		align top left
	point "target"
		center 75 315
		dimensions 140 140
	value "target radius" 70
	outline "target sprite"
		center 75 315
		dimensions 70 70
		colored
	ring "target shields"
		center 75 315
		dimensions 120 120
		color "shields"
		size 1.5
	ring "target hull"
		center 75 315
		dimensions 110 110
		color "hull"
		size 1.5
	ring "target disabled hull"
		center 75 315
		dimensions 110 110
		color "disabled hull"
		size 1.5
	
	visible if "range display"
	sprite "ui/range"
		from 130 263
		align top left
	string "target range"
		from 160 260
		align top left
	visible if "tactical display"
	sprite "ui/tactical"
		from 130 290
		align top left
	string "target crew"
		from 162 298
		align top left
	string "target fuel"
		from 162 318
		align top left
	string "target energy"
		from 157 338
		align top left
	string "target heat"
		from 147 358
		align top left
	visible
	
	string "target name"
		center 75 395
		color "bright"
	string "target type"
		center 75 415
		color "medium"
	string "target government"
		center 75 435
		color "medium"
	point "faction markers"
		center 75 435
	string "mission target"
		center 75 455
		color "medium"
	
	# Other HUD elements:
	box "escorts"
		from 0 460 top left
		to 120 0 bottom left
	box "messages"
		from 120 0 bottom left
		to -110 -200 bottom right
	box "ammo"
		from -110 450 top right
		to 0 0 bottom right
	anchor top
	point "mini-map"
		center 0 100



interface "planet"
	image "land"
		center -60 -140
	sprite "ui/planet dialog"
		center -60 0
	button l
		center -60 -140
		dimensions 720 360
	
	visible if "has shipyard"
	sprite "ui/planet dialog button"
		center 280 90
	button s "_Shipyard"
		center 280 90
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "has outfitter"
	sprite "ui/planet dialog button"
		center 280 150
	button o "_Outfitter"
		center 280 150
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "is inhabited"
	sprite "ui/planet dialog button"
		center -400 150
	button j "_Job Board"
		center -400 150
		dimensions 140 40
		size 18
		align left
		pad 10 0
	sprite "ui/planet dialog button"
		center 280 210
	button h "_Hire Crew"
		center 280 210
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "has trade"
	sprite "ui/planet dialog button"
		center -400 90
	button t "_Trading"
		center -400 90
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has bank"
	sprite "ui/planet dialog button"
		center -400 210
	button b "_Bank"
		center -400 210
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has spaceport"
	sprite "ui/planet dialog button"
		center -400 270
	button p "Space_port"
		center -400 270
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has ship"
	sprite "ui/planet dialog button"
		center 280 270
	button d "_Depart"
		center 280 270
		dimensions 140 40
		size 18
		align right
		pad 10 0



interface "news"
	sprite "ui/news"
		center -160 -45
	image "portrait"
		center -340 -40
	string "name"
		from -270 -100
		align center left
		color "bright"
	box "message"
		from -270 -80
		to 80 10



interface "boarding"
	sprite "ui/boarding dialog"
	
	label "item"
		from -320 -189
		align left
	label "value"
		from -60 -189
		align right
	label "size"
		from 10 -189
		align right
	
	label "cargo space free:"
		from -320 75
		align left
	string "cargo space"
		from 10 75
		align right
	
	label "crew"
		from 190 -112
		align right
	label "attack"
		from 260 -112
		align right
	label "defense"
		from 330 -112
		align right
	
	label "your ship:"
		from 50 -92
		align left
	string "your crew"
		from 190 -92
		align right
	string "your attack"
		from 260 -92
		align right
	string "your defense"
		from 330 -92
		align right
	
	label "enemy ship:"
		from 50 -72
		align left
	string "enemy crew"
		from 190 -72
		align right
	string "enemy attack"
		from 260 -72
		align right
	string "enemy defense"
		from 330 -72
		align right
	
	label "capture odds (attacking):"
		from 50 -42
		align left
	string "attack odds"
		from 330 -42
		align right
	label "expected casualties:"
		from 50 -22
		align left
	string "attack casualties"
		from 330 -22
		align right
	
	label "survival odds (defending):"
		from 50 8
		align left
	string "defense odds"
		from 330 8
		align right
	label "expected casualties:"
		from 50 28
		align left
	string "defense casualties"
		from 330 28
		align right
	
	active if "can take"
	button t "_Take"
		center -235 115
		dimensions 70 30
	
	active if "can exit"
	button x "_Done"
		center -155 115
		dimensions 70 30
	
	active if "can capture"
	button c "Attempt _Capture"
		center -40 115
		dimensions 140 30
	
	active if "can attack"
	button a "_Attack"
		center 120 185
		dimensions 80 30
	
	active if "can defend"
	button d "_Defend"
		center 210 185
		dimensions 80 30



# The top of the text panel is the planet dialog is at +70, and it is 500 x 260.
interface "hiring"
	label "flagship"
		center -70 85
		color "bright"
		align right
	label "entire fleet"
		center 50 85
		color "bright"
		align right
	label "salary"
		center 170 85
		color "bright"
		align right
	
	label "bunks"
		center -290 110
		align left
	string "flagship bunks"
		center -70 110
		align right
	string "fleet bunks"
		center 50 110
		align right
	
	label "required crew"
		center -290 130
		align left
	string "flagship required"
		center -70 130
		align right
	string "fleet required"
		center 50 130
		align right
	string "salary required"
		center 170 130
		align right
	
	label "extra crew"
		center -290 150
		align left
	string "flagship extra"
		center -70 150
		align right
	string "salary extra"
		center 170 150
		align right
	
	active if "can hire"
	sprite "ui/dialog cancel"
		center 140 355
	button h "_Hire"
		center 140 355
		dimensions 80 40
	
	active if "can fire"
	sprite "ui/dialog cancel"
		center 60 355
	button f "_Fire"
		center 60 355
		dimensions 80 40
	
	active
	string "modifier"
		from -65 150
		color "dim"
		align left
	
	label "passenger space"
		center -290 180
		align left
	string "flagship unused"
		center -70 180
		align right
	string "fleet unused"
		center 50 180
		align right
	
	label "passengers"
		center -290 200
		align left
	string "passengers"
		center 50 200
		align right
	
	label "(Extra crew for your flagship increases your odds of capturing ships,"
		center -60 290
	label "and once you capture a ship you need crew members to serve on it.)"
		center -60 310



interface "trade"
	active if "can buy"
	sprite "ui/dialog cancel"
		center 40 355
	button B "Buy All"
		center 40 355
		dimensions 70 30
	
	sprite "ui/wide button"
		center 130 355
	
	active if "can sell"
	visible if "!can sell outfits"
	button S "Sell All"
		center 130 355
		dimensions 90 30
	
	active if "can sell outfits"
	visible if "can sell outfits"
	button S "Sell Outfits"
		center 130 355
		dimensions 90 30



interface "bank"
	active if "can pay"
	sprite "ui/dialog cancel"
		center 140 355
	button a "Pay _All"
		center 140 355
		dimensions 80 40



interface "mission" bottom
	sprite "ui/mission"
		align bottom
	
	label "cargo space free:"
		center -130 -85
	string "cargo free"
		center -130 -65
	
	label "passenger space:"
		center 0 -85
	string "bunks free"
		center 0 -65
	
	label "today's date:"
		center 130 -85
	string "today"
		center 130 -65
	
	active if "can accept"
	button a "_Accept Mission"
		center -45 -25
		dimensions 130 30
	
	active if "can abort"
	button A "Abort"
		center 70 -25
		dimensions 80 30



interface "map buttons" bottom right
	active if "!is shipyards"
	sprite "ui/wide button"
		from -464 -50 to -354 0
	button s "_Shipyards"
		from -454 -40 to -364 -10
	
	active if "!is outfitters"
	sprite "ui/wide button"
		from -364 -50 to -254 0
	button o "_Outfitters"
		from -354 -40 to -264 -10
	
	active if "!is missions"
	sprite "ui/dialog cancel"
		from -264 -50 to -174 0
	button i "M_issions"
		from -254 -40 to -184 -10
	
	active if "!is ports"
	sprite "ui/dialog cancel"
		from -184 -50 to -94 0
	button p "_Ports"
		from -174 -40 to -104 -10
	
	active
	sprite "ui/dialog cancel"
		from -90 -50 to 0 0
	button d "_Done"
		from -80 -40 to -10 -10
	
	sprite "ui/zoom"
		from 0 -40 to -90 -90
	active if "!max zoom"
	button + "_+"
		from -10 -50 to -40 -80
		size 18
	active if "!min zoom"
	button - "_-"
		from -50 -50 to -80 -80
		size 18



interface "info panel"
	sprite "ui/info panel"
		center 0 -5
	visible if "five buttons"
	sprite "ui/five info buttons"
		center 0 305
	visible if "three buttons"
	sprite "ui/three info buttons"
		center 0 305
	
	box "player"
		from -500 -290 to -250 280
	box "fleet"
		from -250 -290 to 500 280
	
	box "stats"
		from -500 -290 to -250 280
	box "outfits"
		from -250 -290 to 500 30
	box "weapons"
		from -250 30 to 250 280
	box "cargo"
		from 250 -290 to 500 280
	
	visible if "ship tab"
	button R
		center -375 -270
		dimensions 250 30
	sprite "ui/ship tab"
		center 0 -310
	label "Ship Info"
		center -300 -305
		color "bright"
	label "Player _Info"
		center -420 -305
	button i
		center -420 -305
		dimensions 120 30
	
	visible if "player tab"
	sprite "ui/player tab"
		center 0 -310
	label "_Ship Info"
		center -300 -305
	label "Player Info"
		center -420 -305
		color "bright"
	button s
		center -300 -305
		dimensions 120 30
	
	visible
	button d "_Done"
		center 455 305
		dimensions 90 30
	button m "_Missions..."
		center 355 305
		dimensions 90 30
	active if "enable logbook"
	button l "_Logbook..."
		center 255 305
		dimensions 90 30
	active
	
	visible if "five buttons"
	button n "_Next"
		center 145 305
		dimensions 90 30
	button p "_Previous"
		center 45 305
		dimensions 90 30
	
	visible if "show park"
	active if "can park"
	sprite "ui/dialog cancel"
		center -55 305
	button P "Park"
		center -55 305
		dimensions 70 30
	active
	
	visible if "show unpark"
	sprite "ui/dialog cancel"
		center -55 305
	button P "Unpark"
		center -55 305
		dimensions 70 30
	
	visible if "show disown"
	sprite "ui/dialog cancel"
		center -150 305
	button D "Disown"
		center -150 305
		dimensions 70 30
	
	visible if "show dump"
	active if "enable dump"
	sprite "ui/wide button"
		center -65 305
	button c "Dump _Cargo"
		center -65 305
		dimensions 90 30
	active
	
	visible if "show park all"
	sprite "ui/wide button"
		center 145 305
	button A "Park All"
		center 145 305
		dimensions 90 30
	visible if "show unpark all"
	sprite "ui/wide button"
		center 145 305
	button A "Unpark All"
		center 145 305
		dimensions 90 30



interface "hail panel"
	sprite "ui/hail panel"
	string "header"
		center -50 -65
		align left

	button d "_Done"
		center 250 115
		dimensions 80 30

	active if "can bribe"
	button b "Offer _Bribe"
		center 130 115
		dimensions 140 30
		
	visible if "show dominate"
	active if "can dominate"
	button t "Demand _Tribute"
		center -20 115
		dimensions 140 30
	visible if "show relinquish"
	button t "Relinquish _Tribute"
		center -20 115
		dimensions 140 30
	visible if "show assist"
	active if "can assist"
	button h "Ask For _Help"
		center -20 115
		dimensions 140 30
