# 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.

color bright .75 .75 .75 0.
color medium .5 .5 .5 0.
color dim .25 .25 .25 0.
color faint .1 .1 .1 0.
color "shields" .43 .55 .70 .75
color "hull" .70 .62 .43 .75
color "heat" .70 .43 .43 .75
color "energy" .6 .6 .6 .75
color "fuel" .70 .62 .43 .75

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. .5 .5 1.
color "blocked back" 0. .2 .2 .5
color "waypoint" .1 .2 .9 1.
color "waypoint back" 0. .3 .7 .5

interface "main menu"
	sprite "_menu/compass" 0 0
	sprite "_menu/title" 0 -170
	sprite "_menu/g0" 0 -280
	sprite "_menu/forest2" 0 280
	sprite "_menu/oberon" 140 180
	sprite "_menu/side panel" -360 0
	sprite "_menu/side panel" 360 0
	outline "ship sprite" 360 -90 dynamic
		size 120 120
	label "pilot:" 250 -15
		size 14
		color medium
		align left
	string "pilot" 310 -15
		size 14
		color bright
		align left
	label "ship:" 250 5
		size 14
		color medium
		align left
	string "ship" 310 5
		size 14
		color bright
		align left
	label "planet:" 250 35
		size 14
		color medium
		align left
	string "planet" 310 35
		size 14
		color bright
		align left
	label "system:" 250 55
		size 14
		color medium
		align left
	string "system" 310 55
		size 14
		color bright
		align left
	label "credits:" 250 85
		size 14
		color medium
		align left
	string "credits" 310 85
		size 14
		color bright
		align left
	label "date:" 250 105
		size 14
		color medium
		align left
	string "date" 310 105
		size 14
		color bright
		align left
	
	if "pilot loaded"
	button e 435 155
		size 90 30
	label "_Enter Ship" 435 148
		size 14
		color bright
		align center
	if "no pilot loaded"
	button n 435 155
		size 90 30
	label "_New Pilot" 435 148
		size 14
		color bright
		align center
	endif
	
	button l 300 155
		size 120 30
	label "_Load / Save..." 300 148
		size 14
		color bright
		align center
	
	# Left panel:
	button q -285 155
		size 90 30
	label "_Quit" -285 148
		size 14
		color bright
		align center
	button p -420 155
		size 120 30
	label "_Preferences..." -420 148
		size 14
		color bright
		align center

interface "load menu"
	sprite "_menu/g0" 0 -280
	sprite "_menu/forest2" 0 280
	sprite "_menu/oberon" 140 180
	sprite "_menu/side panel" -360 0
	sprite "_menu/side panel" 0 0
	sprite "_menu/side panel" 360 0
	outline "ship sprite" 360 -90 dynamic
		size 120 120
	label "pilot:" 250 -15
		size 14
		color medium
		align left
	string "pilot" 310 -15
		size 14
		color bright
		align left
	label "ship:" 250 5
		size 14
		color medium
		align left
	string "ship" 310 5
		size 14
		color bright
		align left
	label "planet:" 250 35
		size 14
		color medium
		align left
	string "planet" 310 35
		size 14
		color bright
		align left
	label "system:" 250 55
		size 14
		color medium
		align left
	string "system" 310 55
		size 14
		color bright
		align left
	label "credits:" 250 85
		size 14
		color medium
		align left
	string "credits" 310 85
		size 14
		color bright
		align left
	label "date:" 250 105
		size 14
		color medium
		align left
	string "date" 310 105
		size 14
		color bright
		align left
	
	# Greyed out buttons:
	if "!pilot selected"
	label "_Delete" -285 148
		size 14
		color dim
		align center
	label "_Add Snapshot" -60 148
		size 14
		color dim
		align center
	if "!snapshot selected"
	label "_Remove" 75 148
		size 14
		color dim
		align center
	if "!pilot loaded"
	label "_Load Game" 435 148
		size 14
		color dim
		align center
	endif
	
	button n -420 155
		size 120 30
	label "_New Pilot" -420 148
		size 14
		color bright
		align center
	if "pilot selected"
	button d -285 155
		size 90 30
	label "_Delete" -285 148
		size 14
		color bright
		align center
	
	button a -60 155
		size 120 30
	label "_Add Snapshot" -60 148
		size 14
		color bright
		align center
	if "snapshot selected"
	button r 75 155
		size 90 30
	label "_Remove" 75 148
		size 14
		color bright
		align center
	endif
	
	button b 300 155
		size 120 30
	label "_Back to Menu" 300 148
		size 14
		color bright
		align center
	if "pilot loaded"
	button l 435 155
		size 90 30
	label "_Load Game" 435 148
		size 14
		color bright
		align center
	endif

interface "preferences"
	sprite "_menu/g0" 0 -280
	sprite "_menu/forest2" 0 280
	sprite "_menu/oberon" 140 180
	sprite "ui/keys panel" -65 -20
	button b 195 210
		size 120 30
	label "_Back to Menu..." 195 203
		size 14
		color bright
		align center
	bar "volume" 280.5 15
		size 0 -200
		color "energy"
		width 3

interface "status"
	position top right
	sprite "ui/status" 0 0
	outline "player sprite" -40 120 dynamic
		size 70 70
	string "location" -20 18
		color medium
	string "date" -20 38
		color medium
	string "credits" -20 58
		color medium
	ring "shields" -15 95
		size 120 120
		color "shields"
		width 1.5
	ring "hull" -20 100
		size 110 110
		color "hull"
		width 1.5
	bar "fuel" -53.5 425
		size 0 -192
		color "fuel"
		width 2
	bar "energy" -33.5 415
		size 0 -192
		color "energy"
		width 2
	bar "heat" -13.5 403
		size 0 -192
		color "heat"
		width 2

interface "targets"
	position top left
	sprite "ui/radar" 0 0
	point radar
		position 128 128
		size 110 130
	sprite "ui/navigation" 200 0
	point target
		position 75 315
		size 70 70
	sprite "ui/target" 0 240
	string "navigation mode" 215 12
		color medium
	string "destination" 230 30
		color medium
	outline "target sprite" 40 280 dynamic
		size 70 70
		colored
	string "target name" 75 385
		align center
		color medium
	string "target type" 75 405
		align center
		color medium
	string "target government" 75 425
		align center
		color medium
	ring "target shields" 15 255
		size 120 120
		color "shields"
		width 1.5
	ring "target hull" 20 260
		size 110 110
		color "hull"
		width 1.5

interface "planet"
	sprite "land" -60 -141 dynamic
	sprite "ui/planet dialog" -60 0
	button l -60 -141
		size 720 360
	
	if "has shipyard"
	sprite "ui/planet dialog button" 280 90
	label "_Shipyard" 340 82
		size 18
		color bright
		align right
	button s 280 90
		size 140 40
	
	if "has outfitter"
	sprite "ui/planet dialog button" 280 150
	label "_Outfitter" 340 142
		size 18
		color bright
		align right
	button o 280 150
		size 140 40
	
	if "is inhabited"
	sprite "ui/planet dialog button" -400 150
	label "_Job Board" -460 142
		size 18
		color bright
		align left
	button j -400 150
		size 140 40
	
	sprite "ui/planet dialog button" -400 90
	label "_Trading" -460 82
		size 18
		color bright
		align left
	button t -400 90
		size 140 40
	
	sprite "ui/planet dialog button" 280 210
	label "_Hire Crew" 340 202
		size 18
		color bright
		align right
	button h 280 210
		size 140 40
	
	if "has bank"
	sprite "ui/planet dialog button" -400 210
	label "_Bank" -460 202
		size 18
		color bright
		align left
	button b -400 210
		size 140 40
	
	if "has spaceport"
	sprite "ui/planet dialog button" -400 270
	label "Space _Port" -460 262
		size 18
		color bright
		align left
	button p -400 270
		size 140 40
	
	if "has ship"
	sprite "ui/planet dialog button" 280 270
	label "_Depart" 340 262
		size 18
		color bright
		align right
	button d 280 270
		size 140 40
	endif

interface "boarding"
	sprite "ui/boarding dialog" 0 0
	
	label "item" -320 -197
		size 14
		color medium
		align left
	label "value" -60 -197
		size 14
		color medium
		align right
	label "size" 10 -197
		size 14
		color medium
		align right
	
	label "cargo space free:" -320 67
		size 14
		color medium
		align left
	string "cargo space" 10 67
		size 14
		color bright
		align right
	
	label "crew" 190  -120
		size 14
		color medium
		align right
	label "attack" 260  -120
		size 14
		color medium
		align right
	label "defense" 330  -120
		size 14
		color medium
		align right
	
	label "your ship:" 50 -100
		size 14
		color medium
		align left
	string "your crew" 190 -100
		size 14
		color bright
		align right
	string "your attack" 260 -100
		size 14
		color bright
		align right
	string "your defense" 330 -100
		size 14
		color bright
		align right
	
	label "enemy ship:" 50 -80
		size 14
		color medium
		align left
	string "enemy crew" 190 -80
		size 14
		color bright
		align right
	string "enemy attack" 260 -80
		size 14
		color bright
		align right
	string "enemy defense" 330 -80
		size 14
		color bright
		align right
	
	label "capture odds (attacking):" 50 -50
		size 14
		color medium
		align left
	string "attack odds" 330 -50
		size 14
		color bright
		align right
	label "expected casualties:" 50 -30
		size 14
		color medium
		align left
	string "attack casualties" 330 -30
		size 14
		color bright
		align right
	
	label "survival odds (defending):" 50 0
		size 14
		color medium
		align left
	string "defense odds" 330 0
		size 14
		color bright
		align right
	label "expected casualties:" 50 20
		size 14
		color medium
		align left
	string "defense casualties" 330 20
		size 14
		color bright
		align right
	
	if "!can take"
	label "_Take" -235 107
		size 14
		color dim
		align center
	if "can take"
	label "_Take" -235 107
		size 14
		color bright
		align center
	button t -235 115
		size 70 30
	endif
	
	if "!can exit"
	label "_Done" -155 107
		size 14
		color dim
		align center
	if "can exit"
	label "_Done" -155 107
		size 14
		color bright
		align center
	button x -155 115
		size 70 30
	endif
	
	if "!can capture"
	label "Attempt _Capture" -40 107
		size 14
		color dim
		align center
	if "can capture"
	label "Attempt _Capture" -40 107
		size 14
		color bright
		align center
	button c -40 115
		size 140 30
	endif
	
	if "!can attack"
	label "_Attack" 120 177
		size 14
		color dim
		align center
	if "can attack"
	label "_Attack" 120 177
		size 14
		color bright
		align center
	button a 120 185
		size 80 30
	endif
	
	if "!can defend"
	label "_Defend" 210 177
		size 14
		color dim
		align center
	if "can defend"
	label "_Defend" 210 177
		size 14
		color bright
		align center
	button d 210 185
		size 80 30
	endif

# The top of the text panel is the planet dialog is at +70, and it is 500 x 260.
# Text is 14 pixels tall
interface "hiring"
	label "flagship" -70 80
		size 14
		color bright
		align right
	label "entire fleet" 50 80
		size 14
		color bright
		align right
	label "salary" 170 80
		size 14
		color bright
		align right
	
	label "bunks" -290 105
		size 14
		color medium
		align left
	string "flagship bunks" -70 105
		size 14
		color bright
		align right
	string "fleet bunks" 50 105
		size 14
		color bright
		align right
	
	label "required crew" -290 125
		size 14
		color medium
		align left
	string "flagship required" -70 125
		size 14
		color bright
		align right
	string "fleet required" 50 125
		size 14
		color bright
		align right
	string "salary required" 170 125
		size 14
		color bright
		align right
	
	label "extra crew" -290 145
		size 14
		color medium
		align left
	string "flagship extra" -70 145
		size 14
		color bright
		align right
	string "salary extra" 170 145
		size 14
		color bright
		align right
	
	sprite "ui/dialog cancel" 140 355
	button h 140 355
		size 80 40
	if "!can hire"
	label "_Hire" 140 348
		size 14
		color dim
		align center
	if "can hire"
	label "_Hire" 140 348
		size 14
		color bright
		align center
	endif
	
	sprite "ui/dialog cancel" 60 355
	button f 60 355
		size 80 40
	if "!can fire"
	label "_Fire" 60 348
		size 14
		color dim
		align center
	if "can fire"
	label "_Fire" 60 348
		size 14
		color bright
		align center
	endif
	string "modifier" -65 145
		size 14
		color dim
		align left
	
	label "passenger space" -290 175
		size 14
		color medium
		align left
	string "flagship unused" -70 175
		size 14
		color bright
		align right
	string "fleet unused" 50 175
		size 14
		color bright
		align right
	
	label "passengers" -290 195
		size 14
		color medium
		align left
	string "passengers" 50 195
		size 14
		color bright
		align right
	
	label "(Extra crew for your flagship increases your odds of capturing ships," -60 278
		size 14
		color medium
		align center
	label "and once you capture a ship you need crew members to serve on it.)" -60 298
		size 14
		color medium
		align center

interface "trade"
	sprite "ui/dialog cancel" 60 355
	button B 60 355
		size 80 40
	if "!can buy"
	label "Buy All" 60 348
		size 14
		color dim
		align center
	if "can buy"
	label "Buy All" 60 348
		size 14
		color bright
		align center
	endif
	
	sprite "ui/dialog cancel" 140 355
	button S 140 355
		size 80 40
	if "!can sell"
	label "Sell All" 140 348
		size 14
		color dim
		align center
	if "can sell"
	label "Sell All" 140 348
		size 14
		color bright
		align center
	endif

interface "bank"
	sprite "ui/dialog cancel" 140 355
	button a 140 355
		size 80 40
	if "!can pay"
	label "Pay _All" 140 348
		size 14
		color dim
		align center
	if "can pay"
	label "Pay _All" 140 348
		size 14
		color bright
		align center
	endif

interface "mission"
	position bottom center
	sprite "ui/mission" 0 0
	
	label "cargo space free:" -130 -93
		size 14
		color medium
		align center
	string "cargo free" -130 -73
		size 14
		color bright
		align center
	
	label "passenger space:" 0 -93
		size 14
		color medium
		align center
	string "bunks free" 0 -73
		size 14
		color bright
		align center
	
	label "today's date:" 130 -93
		size 14
		color medium
		align center
	string "today" 130 -73
		size 14
		color bright
		align center
	
	if "can accept"
	label "_Accept Mission" -45 -33
		size 14
		color bright
		align center
	endif
	if "can abort"
	label "_Abort Mission" -45 -33
		size 14
		color bright
		align center
	endif
	if "cannot accept"
	label "_Accept Mission" -45 -33
		size 14
		color dim
		align center
	endif
	if "cannot abort"
	label "_Abort Mission" -45 -33
		size 14
		color dim
		align center
	endif
	button a -45 -10
		size 130 30
	
	label "_Done" 70 -33
		size 14
		color bright
		align center
	button d 70 -10
		size 80 30

interface "map buttons"
	position bottom right
	sprite "ui/dialog cancel" 0 0
	sprite "ui/dialog cancel" -80 0
	sprite "ui/wide button" -160 0
	sprite "ui/wide button" -260 0
	sprite "ui/zoom" 0 -40

	if "!max zoom"
	label "_+" -25 -75
		size 18
		color bright
		align center
	endif
	if "max zoom"
	label "_+" -25 -75
		size 18
		color dim
		align center
	endif
	button + -10 -50
		size 30 30

	if "!min zoom"
	label "_-" -65 -75
		size 18
		color bright
		align center
	endif
	if "min zoom"
	label "_-" -65 -75
		size 18
		color dim
		align center
	endif
	button - -50 -50
		size 30 30

	if "!is ports"
	label "_Ports" -45 -33
		size 14
		color bright
		align center
	endif
	if "is ports"
	label "_Ports" -45 -33
		size 14
		color dim
		align center
	endif
	button p -10 -10
		size 70 30
	
	if "!is missions"
	label "M_issions" -125 -33
		size 14
		color bright
		align center
	endif
	if "is missions"
	label "M_issions" -125 -33
		size 14
		color dim
		align center
	endif
	button i -90 -10
		size 70 30
	
	if "!is outfitters"
	label "_Outfitters" -215 -33
		size 14
		color bright
		align center
	endif
	if "is outfitters"
	label "_Outfitters" -215 -33
		size 14
		color dim
		align center
	endif
	button o -170 -10
		size 90 30
	
	if "!is shipyards"
	label "_Shipyards" -315 -33
		size 14
		color bright
		align center
	endif
	if "is shipyards"
	label "_Shipyards" -315 -33
		size 14
		color dim
		align center
	endif
	button s -270 -10
		size 90 30
	
	if "!is missions"
	sprite "ui/dialog cancel" -370 0
	label "_Done" -415 -33
		size 14
		color bright
		align center
	endif
	button d -380 -10
		size 70 30

interface "info panel"
	sprite "ui/info panel" 0 -5
	if "four buttons"
	sprite "ui/four info buttons" 0 295
	endif
	if "two buttons"
	sprite "ui/two info buttons" 0 295
	endif
	
	button R -375 -260
		size 250 30
	
	if "ship tab"
	sprite "ui/ship tab" 0 -300
	label "_Ship Info" -300 -303
		size 14
		color bright
		align center
	label "_Player Info" -420 -303
		size 14
		color medium
		align center
	button i -420 -295
		size 120 30
	endif
	
	if "player tab"
	sprite "ui/player tab" 0 -300
	label "_Ship Info" -300 -303
		size 14
		color medium
		align center
	label "_Player Info" -420 -303
		size 14
		color bright
		align center
	button s -300 -295
		size 120 30
	endif
	
	label "_Done" 455 287
		size 14
		color bright
		align center
	button d 455 295
		size 90 30
	
	label "_Missions..." 355 287
		size 14
		color bright
		align center
	button m 355 295
		size 90 30
	
	if "four buttons"
	label "_Next" 250 287
		size 14
		color bright
		align center
	button n 250 295
		size 90 30
	label "_Previous" 150 287
		size 14
		color bright
		align center
	button p 150 295
		size 90 30
	endif
	
	button P 55 295
		size 70 30
	if "show park"
	sprite "ui/dialog cancel" 55 295
	label "Park" 55 287
		size 14
		color bright
		align center
	endif
	if "show unpark"
	sprite "ui/dialog cancel" 55 295
	label "Unpark" 55 287
		size 14
		color bright
		align center
	endif
	
	button c 10 295
		size 20 30
	if "enable dump"
	sprite "ui/wide button" 45 295
	label "Dump _Cargo" 45 287
		size 14
		color bright
		align center
	endif
	if "show dump"
	sprite "ui/wide button" 45 295
	label "Dump _Cargo" 45 287
		size 14
		color dim
		align center
	endif
	
	if "show park all"
	sprite "ui/wide button" 250 295
	label "Park All" 250 287
		size 14
		color bright
		align center
	endif
	if "show unpark all"
	sprite "ui/wide button" 250 295
	label "Unpark All" 250 287
		size 14
		color bright
		align center
	endif

interface "hail panel"
	sprite "ui/hail panel" 0 0
	string "header" -50 -70
		size 14
		color bright
		align left
	
	if "can dominate"
	label "Demand _Tribute" -20 108
		size 14
		color bright
		align center
	if "cannot dominate"
	label "Demand _Tribute" -20 108
		size 14
		color dim
		align center
	if "can assist"
	label "Ask For _Help" -20 108
		size 14
		color bright
		align center
	if "cannot assist"
	label "Ask For _Help" -20 108
		size 14
		color dim
		align center
	endif
	button a -20 115
		size 140 30
	
	if "can bribe"
	label "Offer _Bribe" 130 108
		size 14
		color bright
		align center
	if "!can bribe"
	label "Offer _Bribe" 130 108
		size 14
		color dim
		align center
	endif
	button b 130 115
		size 140 30
	
	label "_Done" 250 108
		size 14
		color bright
		align center
	button d 250 115
		size 80 30

