# 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.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.


# 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 "dimmer" .18 .18 .18 0.
color "faint" .1 .1 .1 0.
color "dark" .05 .05 .05 0.

# Colors used for drawing ship list in player info panel.
color "flagship" .5 .5 .1 0.
color "disabled" .5 .3 .1 0.
color "dead" .4 0. 0. 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 "panel outline" .45 .45 .45 1.
color "performance info background" .1 .1 .1 .7
color "dialog backdrop" 0. 0. 0. .7
color "conversation background" .125 .125 .125 1.
color "map side panel background" .125 .125 .125 1.
color "map view range color" .1 .1 .1 .0
color "map jump range color" .3 .3 .3 .0
color "shop side panel background" .2 .2 .2 1.
color "shop side panel footer" .3 .3 .3 1.
color "shop info panel background" .055 .055 .055 1.
color "tooltip background" .2 .2 .2 1.
color "player info hardpoint gun" .5 .375 0. 1.
color "player info hardpoint gun hover" .8 .6 0. 1.
color "player info hardpoint turret" 0. .375 .5 1.
color "player info hardpoint turret hover" 0. .6 .8 1.
color "logbook sidebar" .09 .09 .09 1.
color "logbook background" .125 .125 .125 1.
color "logbook line" .2 .2 .2 1.
color "message log background" .125 .125 .125 1.
color "item selected" 0. 0. 0. .3
color "outfitter difference highlight" 1. .5 0. 1.
color "volume bar background" .0937 .0937 .0937 1.

# Colors used to draw certain HUD elements in-flight.
color "shields" .43 .55 .85 .8
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

# Colors for the escort HUD status bars.
color "escort shields" .43 .55 .70 0.
color "escort hull" .70 .62 .43 0.
color "escort heat" .70 .43 .43 0.
color "escort energy" .6 .6 .6 0.
color "escort fuel" .630 .62 .43 0.
# These values are half the desired "full color" values.
color "escort split shields" .215 .275 .35 0.
color "escort split hull" .35 .31 .215 0.
color "escort split heat" .35 .215 .215 0.
color "escort split energy" .3 .3 .3 0.
color "escort split fuel" .35 .31 .215 0.

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

color "cloak highlight" .45 0. 0. .65

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
color "mission route" .2 .1 0. 0.

# Colors for the Escort HUD that is displayed in-flight.
color "escort disabled" .4 .4 .4 0.
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 flagship shields" 0. .5 0. .25
color "overlay flagship hull" .45 .5 0. .25
color "overlay flagship disabled" .5 0. 0. .25
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 neutral shields" .43 .55 .70 .75
color "overlay neutral hull" .45 .5 0. .25
color "overlay neutral disabled" .5 0. 0. .25
color "overlay outfit scan" .5 .5 .5 .25
color "overlay outfit scan out of range" .25 .25 .25 .25
color "overlay cargo scan" .7 .7 .7 .25
color "overlay cargo scan out of range" .35 .35 .35 .25

# Colors used when "missile overlays" are enabled
color "missile enemy" 1. 1. .25 .7
color "missile locked" 1. .9 0. .9
color "missile dangerous" 1. .1 .1 1.

# Colors of overlays for flagship turrets with blindspots.
color "overlay turret" 0. 1. 0. .1
color "overlay turret blindspot" 1. 0. 0. .5

# 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 .3 0.
color "radar hostile" .85 .3 .2 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.
color "radar star" .6 .6 .6 0.

# Colors used for the outline of the targeted ship.
color "ship target outline player" .2 1. 0. 0.
color "ship target outline friendly" .4 .6 1. 0.
color "ship target outline unfriendly" .8 .8 .3 0.
color "ship target outline hostile" .85 .3 .2 0.
color "ship target outline inactive" .4 .4 .4 0.
color "ship target outline special" 1. 1. 1. 0.
color "ship target outline blink" 1. 1. 1. 0.

# Colors used for ship target pointers.
color "ship target pointer player" .2 1. 0. 0.
color "ship target pointer friendly" .4 .6 1. 0.
color "ship target pointer unfriendly" .8 .8 .3 0.
color "ship target pointer hostile" .85 .3 .2 0.
color "ship target pointer inactive" .4 .4 .4 0.
color "ship target pointer special" 1. 1. 1. 0.
color "ship target pointer blink" 1. 1. 1. 0.

# Colors used for minable target pointers.
color "minable target pointer selected" 1. 1. 1. 0.
color "minable target pointer unselected" .4 .4 .4 0.

# Colors used for planet target pointers.
color "planet target pointer friendly" .4 .6 1. 0.
color "planet target pointer restricted" .8 .8 .3 0.
color "planet target pointer hostile" .85 .3 .2 0.
color "planet target pointer dominated" 1. 1. 1. 0.

# Colors used for warnings and errors.
color "error back" .25 .1 .1 1.
color "warning back" .21 .18 .08 1.
color "warning conflict" .315 .27 .12 1.
color "warning no command" 0.16 0.16 0.13 1.

# Colors used for messages
color "message category high" 1. .5 0. 1.
color "message category normal" 1. 1. 1. 1.
color "message category info" 0. 1. .5 1.
color "message category daily" 1. 1. 1. 1.
color "message category low" 1. 1. 1. 1.

color "message log category high" 1. .5 0. 1.
color "message log category normal" .75 .75 .75 1.
color "message log category info" 0. 1. .5 1.
color "message log category daily" 0. .5 1. 1.
color "message log category low" .75 .75 .75 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 wormhole" .5 .2 .9 1.
color "map orbits fleet destination" 1. 1. 1. 1.
color "map danger none" .1 .6 0. .4
color "map system ring" .4 .4 .4 .6
color "map system ring unexplored" .1 .1 .1 0.
color "map: sale marker: no shop" 0. .12 .6 .4
color "map: sale marker: has shop" .12 .48 .48 .4
color "map: sale marker: item sold" .6 .48 0. .4
color "map: sale marker: item stored" .36 .48 .24 .4

# Colors used for the routing issue text in the map panel when
# a route to the selected system cannot be determined.
color "map route error text" 1. 0. 0. 1.
color "map route error shadow" 0. 0. 0. 1.

# Miscellaneous colors
color "wormholes: Ember Waste" .7 .1 .3
color "wormholes: beyond Patir" .19 .27 .69

# Color of warning message when users enable or disable plugins via in-game UI.
color "plugin reload required" .75 .1 .1 0.



interface "performance info"
	anchor top left
	fill
		from 560 5 to 720 55
		color "performance info background"
	visible if "ready"
	string "cpu"
		from 570 16
		color "medium"
		align left
	string "gpu"
		from 570 30
		color "medium"
		align left
	string "mem"
		from 570 44
		color "medium"
		align left
	visible if "!ready"
	label "CPU: calculating..."
		from 570 16
		color "medium"
		align left
	label "GPU: calculating..."
		from 570 30
		color "medium"
		align left
	label "MEM: calculating..."
		from 570 44
		color "medium"
		align left



interface "map detail panel"
	anchor top right
	value "min planet panel height" 195
	value "max planet panel height" 2022
	value "starting X" 100
	value "starting Y" 45
	value "government Y" 280
	value "text margin" 15
	value "trade height" 120
	value "arrow x offset" 3
	value "arrow y offset" 10
	value "description x offset" 240
	value "description width" 500
	value "description height" 240
	visible if "has escort destination"
	sprite "ui/wide button"
		center -256 56
	button c "Cancel order"
		center -256 56
		dimensions 90 30



interface "map planet card"
	value "text start" 13
	value "category size" 20
	value "categories" 5
	value "height padding" 30
	value "width" 235
	value "planet icon max size" 100



interface "menu background"
	sprite "_menu/g5"
		center 0 -280
	sprite "_menu/forest2"
		center 0 280
	sprite "_menu/oberon"
		center 140 180
	sprite "_menu/compass"
		center 0 0
	sprite "_menu/title"
		center 0 -200



interface "main menu"
	# Background animation:
	value "x speed" -.4
	value "y speed" .02
	value "y amplitude" .6

	# Credits:
	sprite "_menu/side panel"
		center -360 0
	box "credits"
		from -470 -165
		to -250 115

	sprite "_menu/side panel"
		center 360 0
	
	visible if "pilot loaded"
	button e "_Enter Ship"
		center 435 155
		dimensions 90 30
	visible if "gamerules unlocked"
	sprite "ui/wide button"
		center 435 195
	button g "_Gamerules"
		center 435 195
		dimensions 90 30
	visible if "no pilot loaded"
	button n "_New Pilot"
		center 435 155
		dimensions 90 30
	visible if "pilot dead"
	button r "_Reload Pilot"
		center 435 155
		dimensions 90 30
	
	visible
	button m "_Manage Pilots..."
		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 -105
		dimensions 100 100
	label "pilot:"
		from 250 -35
		align left
	string "pilot"
		from 315 -35
		align left
		width 165
		truncate middle
	label "ship:"
		from 250 -15
		align left
	string "ship"
		from 315 -15
		align left
		width 165
		truncate back
	label "planet:"
		from 250 15
		align left
	string "planet"
		from 315 15
		align left
		width 165
		truncate back
	label "system:"
		from 250 35
		align left
	string "system"
		from 315 35
		align left
		width 165
		truncate back
	label "credits:"
		from 250 65
		align left
	string "credits"
		from 315 65
		align left
	label "date:"
		from 250 85
		align left
	string "date"
		from 315 85
		align left
	label "playtime:"
		from 250 105
		align left
	string "playtime"
		from 315 105
		align left



interface "menu start info"
	visible if "chosen start"
	image "thumbnail"
		center 360 -105
		dimensions 220 240
	label "name:"
		from 250 -35
		align left
	string "name"
		from 310 -35
		align left
	label "date:"
		from 250 -15
		align left
	string "date"
		from 310 -15
		align left
	label "planet:"
		from 250 15
		align left
	string "planet"
		from 310 15
		align left
	label "system:"
		from 250 35
		align left
	string "system"
		from 310 35
		align left
	label "credits:"
		from 250 65
		align left
	string "credits"
		from 310 65
		align left
	label "debt:"
		from 250 85
		align left
	string "debt"
		from 310 85
		align left



interface "start conditions menu"
	sprite "_menu/side panel"
		center -360 0
	sprite "_menu/buttonless side panel"
		center 0 0
	sprite "_menu/buttonless side panel"
		center 360 0
	
	button b "_Back to Menu"
		center -420 155
		dimensions 120 30
	active if "unlocked start"
	button s "_Start Game"
		center -285 155
		dimensions 90 30
	sprite "ui/wide button"
		center -435 195
	active
	button g "_Gamerules"
		center -435 195
		dimensions 90 30
	
	# The box that will contain the description text
	box "start description"
		from -105 -160
		to 105 160
	# Bounding box for the list of start conditions.
	box "start entry list"
		from -475 -160
		to -245 120
	# Size of the highlighted box for the selected start
	box "start entry item bounds"
		dimensions 230 20
	# Visual padding applied to each scenario item
	box "start entry text padding"
		dimensions 5 2



interface "load menu"
	sprite "_menu/side panel"
		center -360 0
	box "pilots"
		center -360 -19
		dimensions 230 280
	
	sprite "_menu/side panel"
		center 0 0
	box "snapshots"
		center 0 -19
		dimensions 230 280
	
	value "pilot horizontal text pad" 5
	value "pilot fade out" 10
	value "snapshot horizontal text pad" 5
	value "snapshot fade out" 10
	
	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

	sprite "ui/wide button"
		center -435 195
	active
	button o "_Open Saves"
		center -435 195
		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
	active
	visible if "gamerules unlocked"
	sprite "ui/wide button"
		center 435 195
	button g "_Gamerules"
		center 435 195
		dimensions 90 30



interface "controls"
	sprite "ui/settings four buttons"
		center -337 -180
	sprite "ui/settings audio bar"
		center 285 -82
	sprite "ui/settings keys box"
		center -350 102
	sprite "ui/settings base panel"
		center -1 -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
	button a "_Audio"
		center -300 -110
		dimensions 90 30
		color medium
		hover bright
	
	label "Additional info"
		from -275 34
		align top right
		color bright
	fill
		from -400 48 to -270 49
		color medium
	"wrapped label" "Press '_x' over controls to unbind them. Controls can share the same keybind."
		from -420 70 to -270 130
		alignment right
		color medium
	
	visible if "multiple controls pages"
	sprite "ui/dialog cancel"
		center -115 210
	active if "show next controls"
	button n "_Next"
		center -115 210
		dimensions 70 30
	sprite "ui/wide button"
		center -210 210
	active if "show previous controls"
	button r "P_revious"
		center -210 210
		dimensions 90 30



interface "settings"
	sprite "ui/settings four buttons"
		center -337 -180
	sprite "ui/settings audio bar"
		center 285 -82
	sprite "ui/settings base panel"
		center -1 -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
	button a "_Audio"
		center -300 -110
		dimensions 90 30
		color medium
		hover bright
	visible if "multiple settings pages"
	sprite "ui/dialog cancel"
		center -115 210
	active if "show next settings"
	button n "_Next"
		center -115 210
		dimensions 70 30
	sprite "ui/wide button"
		center -210 210
	active if "show previous settings"
	button r "P_revious"
		center -210 210
		dimensions 90 30



interface "plugins"
	sprite "ui/settings four buttons"
		center -337 -180
	sprite "ui/settings audio bar"
		center 285 -82
	sprite "ui/settings base panel"
		center -1 -20
	sprite "ui/very wide button"
		center -194 210
	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
	button a "_Audio"
		center -300 -110
		dimensions 90 30
		color medium
		hover bright
	button o "_Open Plugins"
		center -195 210
		dimensions 120 30
	visible if "show plugins changed"
	label "Restart to apply changes"
		from -225 -236
		align top left
		color "plugin reload required"
	visible if "!show plugins changed"
	label "Installed Plugins:"
		from -225 -236
		align top left
		color bright
	visible
	fill
		from -230 -222 to -10 -221
	box "plugin list"
		from -250 -216 to -10 184
	box "plugin description"
		from 250 -244 to 10 184



interface "audio"
	sprite "ui/settings four buttons"
		center -337 -180
	sprite "ui/settings audio bar"
		center 285 -82
	sprite "ui/settings base panel"
		center -1 -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 medium
		hover bright
	button a "_Audio"
		center -300 -110
		dimensions 90 30
		color bright
	value "volume bar size" 195

	label "Music"
		center -129.5 -228
		color bright
	fill
		center -117.5 -208.5
		dimensions 210 10.5
		color "volume bar background"
	bar "music volume"
		center -117.5 -208.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "music volume box"
		center -117.5 -208.5
		dimensions 215 25
	visible if "music volume none"
	sprite "ui/audio none"
		center -238 -208
	visible if "music volume low"
	sprite "ui/audio low"
		center -238 -208
	visible if "music volume medium"
	sprite "ui/audio medium"
		center -238 -208
	visible if "music volume max"
	sprite "ui/audio max"
		center -238 -208

	visible
	label "UI"
		center -129.5 -168
		color bright
	fill
		center -117.5 -148.5
		dimensions 210 10.5
		color "volume bar background"
	bar "ui volume"
		center -117.5 -148.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "ui volume box"
		center -117.5 -148.5
		dimensions 215 25
	visible if "ui volume none"
	sprite "ui/audio none"
		center -238 -148
	visible if "ui volume low"
	sprite "ui/audio low"
		center -238 -148
	visible if "ui volume medium"
	sprite "ui/audio medium"
		center -238 -148
	visible if "ui volume max"
	sprite "ui/audio max"
		center -238 -148

	visible
	label "Anti-Missiles"
		center -129.5 -108
		color bright
	fill
		center -117.5 -88.5
		dimensions 210 10.5
		color "volume bar background"
	bar "anti-missile volume"
		center -117.5 -88.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "anti-missile volume box"
		center -117.5 -88.5
		dimensions 215 25
	visible if "anti-missile volume none"
	sprite "ui/audio none"
		center -238 -88
	visible if "anti-missile volume low"
	sprite "ui/audio low"
		center -238 -88
	visible if "anti-missile volume medium"
	sprite "ui/audio medium"
		center -238 -88
	visible if "anti-missile volume max"
	sprite "ui/audio max"
		center -238 -88

	visible
	label "Weapons"
		center -129.5 -48
		color bright
	fill
		center -117.5 -28.5
		dimensions 210 10.5
		color "volume bar background"
	bar "weapon volume"
		center -117.5 -28.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "weapon volume box"
		center -117.5 -28.5
		dimensions 215 25
	visible if "weapon volume none"
	sprite "ui/audio none"
		center -238 -28
	visible if "weapon volume low"
	sprite "ui/audio low"
		center -238 -28
	visible if "weapon volume medium"
	sprite "ui/audio medium"
		center -238 -28
	visible if "weapon volume max"
	sprite "ui/audio max"
		center -238 -28

	visible
	label "Engines"
		center -129.5 12
		color bright
	fill
		center -117.5 32.5
		dimensions 210 10.5
		color "volume bar background"
	bar "engine volume"
		center -117.5 32.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "engine volume box"
		center -117.5 32.5
		dimensions 215 25
	visible if "engine volume none"
	sprite "ui/audio none"
		center -238 32
	visible if "engine volume low"
	sprite "ui/audio low"
		center -238 32
	visible if "engine volume medium"
	sprite "ui/audio medium"
		center -238 32
	visible if "engine volume max"
	sprite "ui/audio max"
		center -238 32

	visible
	label "Afterburners"
		center -129.5 72
		color bright
	fill
		center -117.5 92.5
		dimensions 210 10.5
		color "volume bar background"
	bar "afterburner volume"
		center -117.5 92.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "afterburner volume box"
		center -117.5 92.5
		dimensions 215 25
	visible if "afterburner volume none"
	sprite "ui/audio none"
		center -238 92
	visible if "afterburner volume low"
	sprite "ui/audio low"
		center -238 92
	visible if "afterburner volume medium"
	sprite "ui/audio medium"
		center -238 92
	visible if "afterburner volume max"
	sprite "ui/audio max"
		center -238 92

	visible
	label "Hyperdrives"
		center -129.5 132
		color bright
	fill
		center -117.5 152.5
		dimensions 210 10.5
		color "volume bar background"
	bar "jump volume"
		center -117.5 152.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "jump volume box"
		center -117.5 152.5
		dimensions 215 25
	visible if "jump volume none"
	sprite "ui/audio none"
		center -238 152
	visible if "jump volume low"
	sprite "ui/audio low"
		center -238 152
	visible if "jump volume medium"
	sprite "ui/audio medium"
		center -238 152
	visible if "jump volume max"
	sprite "ui/audio max"
		center -238 152

	visible
	label "Explosions"
		center 129.5 -228
		color bright
	fill
		center 117.5 -208.5
		dimensions 210 10.5
		color "volume bar background"
	bar "explosion volume"
		center 117.5 -208.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "explosion volume box"
		center 117.5 -208.5
		dimensions 215 25
	visible if "explosion volume none"
	sprite "ui/audio none"
		center 238 -208
	visible if "explosion volume low"
	sprite "ui/audio low"
		center 238 -208
	visible if "explosion volume medium"
	sprite "ui/audio medium"
		center 238 -208
	visible if "explosion volume max"
	sprite "ui/audio max"
		center 238 -208

	visible
	label "Scans"
		center 129.5 -168
		color bright
	fill
		center 117.5 -148.5
		dimensions 210 10.5
		color "volume bar background"
	bar "scan volume"
		center 117.5 -148.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "scan volume box"
		center 117.5 -148.5
		dimensions 215 25
	visible if "scan volume none"
	sprite "ui/audio none"
		center 238 -148
	visible if "scan volume low"
	sprite "ui/audio low"
		center 238 -148
	visible if "scan volume medium"
	sprite "ui/audio medium"
		center 238 -148
	visible if "scan volume max"
	sprite "ui/audio max"
		center 238 -148

	visible
	label "Environment"
		center 129.5 -108
		color bright
	fill
		center 117.5 -88.5
		dimensions 210 10.5
		color "volume bar background"
	bar "environment volume"
		center 117.5 -88.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "environment volume box"
		center 117.5 -88.5
		dimensions 215 25
	visible if "environment volume none"
	sprite "ui/audio none"
		center 238 -88
	visible if "environment volume low"
	sprite "ui/audio low"
		center 238 -88
	visible if "environment volume medium"
	sprite "ui/audio medium"
		center 238 -88
	visible if "environment volume max"
	sprite "ui/audio max"
		center 238 -88

	visible
	label "Alerts"
		center 129.5 -48
		color bright
	fill
		center 117.5 -28.5
		dimensions 210 10.5
		color "volume bar background"
	bar "alert volume"
		center 117.5 -28.5
		dimensions 195 0
		color "energy"
		size 2
		reversed
	box "alert volume box"
		center 117.5 -28.5
		dimensions 215 25
	visible if "alert volume none"
	sprite "ui/audio none"
		center 238 -28
	visible if "alert volume low"
	sprite "ui/audio low"
		center 238 -28
	visible if "alert volume medium"
	sprite "ui/audio medium"
		center 238 -28
	visible if "alert volume max"
	sprite "ui/audio max"
		center 238 -28



interface "preferences"
	button b "_Back to Menu..."
		center 195 210
		dimensions 120 30
	value "master volume bar size" 220
	fill
		center 280.5 -97
		dimensions 10.5 235
		color "volume bar background"
	bar "volume"
		center 280.5 -97
		dimensions 0 220
		color "energy"
		size 2
	box "volume box"
		center 280.5 -97
		dimensions 20.5 265

	visible if "volume none"
	sprite "ui/audio none"
		center 281 35
	visible if "volume low"
	sprite "ui/audio low"
		center 281 35
	visible if "volume medium"
	sprite "ui/audio medium"
		center 281 35
	visible if "volume max"
	sprite "ui/audio max"
		center 281 35


interface "gamerules"
	sprite "ui/settings two buttons"
		center -337 -180
	sprite "ui/settings keys box"
		center -350 102
	sprite "ui/settings base panel"
		center -1 -20
	button b "_Back to Menu..."
		center 195 210
		dimensions 120 30
	button g "_Gamerules"
		center -304 -230
		dimensions 90 30
		color medium
		hover bright
	button p "_Presets"
		center -304 -190
		dimensions 90 30
		color medium
		hover bright
	
	label "Additional info"
		from -275 34
		align top right
		color bright
	fill
		from -400 48 to -270 49
		color medium
	"wrapped label" "Press '_x' over a rule to reset it to the value from the chosen preset."
		from -400 60 to -275 130
		alignment right
		color medium
	
	visible if "multiple settings pages"
	sprite "ui/dialog cancel"
		center -115 210
	active if "show next settings"
	button n "_Next"
		center -115 210
		dimensions 70 30
	sprite "ui/wide button"
		center -210 210
	active if "show previous settings"
	button r "P_revious"
		center -210 210
		dimensions 90 30


interface "gamerules presets"
	sprite "ui/settings two buttons"
		center -337 -180
	sprite "ui/settings keys box"
		center -350 102
	sprite "ui/settings base panel"
		center -1 -20
	button b "_Back to Menu..."
		center 195 210
		dimensions 120 30
	button g "_Gamerules"
		center -304 -230
		dimensions 90 30
		color medium
		hover bright
	button p "_Presets"
		center -304 -190
		dimensions 90 30
		color medium
		hover bright
	label "Gamerule Presets:"
		from -225 -236
		align top left
		color bright
	fill
		from -230 -222 to -10 -221
	box "preset list"
		from -250 -216 to -10 184
	box "preset description"
		from 250 -244 to 10 184
	
	label "Additional info"
		from -275 34
		align top right
		color bright
	fill
		from -400 48 to -270 49
		color medium
	"wrapped label" "Click the checkbox next to a preset to activate it."
		from -400 50 to -275 120
		alignment right
		color medium



interface "hud"
	# Player status.
	anchor top right
	
	sprite "ui/status"
		from 0 0
		align top right
	
	string "location"
		from -160 25
		color "medium"
		align right
		width 140
		truncate back
	string "date"
		from -20 45
		color "medium"
		align right
	string "credits"
		from -20 65
		color "medium"
		align right
	
	visible if "!fast hud sprites"
	outline "player sprite"
		center -75 155
		dimensions 70 70
	visible if "fast hud sprites"
	image "player sprite"
		center -75 155
		dimensions 70 70
	visible
	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
	visible if "red alert"
	sprite "ui/red alert"
		from 10 10
		align top left
	visible if "nuke alert"
	sprite "icon/nuke"
		from 24 24
	visible
	sprite "ui/radar"
		from 0 0
		align top left
	point "radar"
		center 128 128
	value "radar radius" 110
	value "radar scale" .025
	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"
		width 135
		truncate back
	
	sprite "ui/target"
		from 0 240
		align top left
	point "target"
		center 75 315
		dimensions 140 140
	value "target radius" 70
	visible if "!fast hud sprites"
	outline "target sprite"
		center 75 315
		dimensions 70 70
		colored
	visible if "fast hud sprites"
	image "target sprite"
		center 75 315
		dimensions 70 70
	visible
	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
	string "target name"
		center 75 395
		color "bright"
		width 150
		truncate middle
	string "target type"
		center 75 415
		color "medium"
		width 150
		truncate middle
	string "target government"
		center 75 435
		color "medium"
		width 150
		truncate middle
	point "faction markers"
		center 75 435
	string "mission target"
		center 75 455
		color "medium"
	
	visible if "range display"
	sprite "ui/tactical/range"
		from 130 263
		align top left
	string "target range"
		from 160 260
		align top left

	visible if "strategic range display"
	sprite "ui/tactical/range"
		from 2 255
		align top left
	string "target range"
		from 2 240
		align top left

	visible if "target crew display"
	sprite "ui/tactical/crew"
		from 148 286
		align top left
	string "target crew"
		from 162 286
		align top left
	
	visible if "mobility crew display"
	sprite "ui/tactical/crew"
		from 13 354
		align top left
	string "target crew"
		from 17 372
		align top center

	visible if "target fuel display"
	sprite "ui/tactical/fuel"
		from 146 308
		align top left
	string "target fuel"
		from 162 306
		align top left

	visible if "target energy display"
	sprite "ui/tactical/energy"
		from 144 324
		align top left
	string "target energy"
		from 157 325
		align top left

	visible if "target thermal display"
	sprite "ui/tactical/thermal"
		from 136 343
		align top left
	string "target heat"
		from 147 346
		align top left

	visible if "target weapon range display"
	sprite "ui/tactical/gun range"
		from 154 252
		align top center
	sprite "ui/tactical/turret range"
		from 190 252
		align top center
	string "target gun"
		from 152 268
		align top center
	string "target turret"
		from 190 268
		align top center

	visible if "turn while combined"
	sprite "ui/tactical/turn"
		from 118 370
		align top left
	string "target turnrate"
		from 139 370
		align top left

	visible if "turn while not combined"
	sprite "ui/tactical/turn"
		from 145 288
		align top left
	string "target turnrate"
		from 162 286
		align top left

	visible if "target velocity display"
	sprite "ui/tactical/velocity"
		from 142 288
		align top left
	string "target velocity"
		from 158 286
		align top left

	visible if "target acceleration display"
	sprite "ui/tactical/acceleration"
		from 194 286
		align top left
	string "target acceleration"
		from 208 286
		align top left
	
	
	# 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
	value "messages reversed" 0
	value "message animation duration" 30
	box "ammo"
		from -110 450 top right
		to 0 0 bottom right
	value "ammo icon height" 30
	value "ammo icon width" 80
	anchor top
	point "mini-map"
		center 0 100



interface "main view"
	list "zooms"
		.25
		.35
		.5
		.7
		1.
		1.4
		2.



interface "starfield"
	# Fixed starfield zoom preference constants:
	value "fixed zoom" .35
	value "velocity reducer" 1.4
	# Starfield zoom behavior constants:
	value "start clamping zoom" .25
	value "minimum zoom" .15



interface "escort element"
	value "width" 120
	value "basic height" 30
	value "system label height" 15

	anchor top left
	outline "icon"
		center 20 10
		dimensions 20 20
		colored
	visible if "selected"
	pointer
		center 10 10
		dimensions 10 10
		"orientation angle" 90
		color "escort selected"
	visible if "other system"
	string "system"
		from 10 28
		width 120
		size 14
		align left
		truncate back
		color "escort elsewhere"

	visible if "!multiple"
	bar "shields high"
		from 35 1.5
		dimensions 70 0
		size 1.5
		reversed
		color "escort shields"
	bar "hull high"
		from 35 5.5
		dimensions 70 0
		size 1.5
		reversed
		color "escort hull"
	bar "energy high"
		from 40 9.5
		dimensions 65 0
		size 1.5
		reversed
		color "escort energy"
	bar "heat high"
		from 40 13.5
		dimensions 65 0
		size 1.5
		reversed
		color "escort heat"
	bar "fuel high"
		from 40 17.5
		dimensions 65 0
		size 1.5
		reversed
		color "escort fuel"

	visible if "multiple"
	anchor top right
	string "count"
		from -15 3 to -55 17
		align right
		color "escort elsewhere"
	anchor top left
	bar "shields high"
		from 35 1.5
		dimensions 50 0
		size 1.5
		reversed
		color "escort split shields"
	bar "shields low"
		from 35 1.5
		dimensions 50 0
		size 1.5
		reversed
		color "escort split shields"
	bar "hull high"
		from 35 5.5
		dimensions 50 0
		size 1.5
		reversed
		color "escort split hull"
	bar "hull low"
		from 35 5.5
		dimensions 50 0
		size 1.5
		reversed
		color "escort split hull"
	bar "energy high"
		from 40 9.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split energy"
	bar "energy low"
		from 40 9.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split energy"
	bar "heat high"
		from 40 13.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split heat"
	bar "heat low"
		from 40 13.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split heat"
	bar "fuel high"
		from 40 17.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split fuel"
	bar "fuel low"
		from 40 17.5
		dimensions 45 0
		size 1.5
		reversed
		color "escort split fuel"



interface "planet"
	image "land"
		center 0 -140
	sprite "ui/planet dialog"
		center 0 0
	button l
		center 0 -140
		dimensions 720 360
	
	box "content"
		from -240 80 to 240 320
	
	visible if "has trade"
	sprite "ui/planet dialog button"
		center -340 90
	button t "_Trading"
		center -340 90
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has job board"
	sprite "ui/planet dialog button"
		center -340 145
	button j "_Job Board"
		center -340 145
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible
	sprite "ui/planet dialog button"
		center -340 200
	button i "Player _Info"
		center -340 200
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has bank"
	sprite "ui/planet dialog button"
		center -340 255
	button b "_Bank"
		center -340 255
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has port"
	sprite "ui/planet dialog button"
		center -340 310
	"dynamic button" p "port name"
		center -340 310
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has shipyard"
	sprite "ui/planet dialog button"
		center 340 90
	button s "_Shipyard"
		center 340 90
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "has outfitter"
	sprite "ui/planet dialog button"
		center 340 145
	button o "_Outfitter"
		center 340 145
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "can hire crew"
	sprite "ui/planet dialog button"
		center 340 200
	button h "_Hire Crew"
		center 340 200
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible
	active if "has ship"
	sprite "ui/planet dialog button"
		center 340 310
	button d "_Depart"
		center 340 310
		dimensions 140 40
		size 18
		align right
		pad 10 0



interface "planet (small screen)"
	image "land"
		center -60 -140
	sprite "ui/planet dialog"
		center -60 0
	button l
		center -60 -140
		dimensions 720 360
	
	box "content"
		from -300 80 to 180 320
	
	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 job board"
	sprite "ui/planet dialog button"
		center -400 145
	button j "_Job Board"
		center -400 145
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible
	sprite "ui/planet dialog button"
		center -400 200
	button i "Player _Info"
		center -400 200
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has bank"
	sprite "ui/planet dialog button"
		center -400 255
	button b "_Bank"
		center -400 255
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	visible if "has port"
	sprite "ui/planet dialog button"
		center -400 310
	"dynamic button" p "port name"
		center -400 310
		dimensions 140 40
		size 18
		align left
		pad 10 0
	
	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 145
	button o "_Outfitter"
		center 280 145
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible if "can hire crew"
	sprite "ui/planet dialog button"
		center 280 200
	button h "_Hire Crew"
		center 280 200
		dimensions 140 40
		size 18
		align right
		pad 10 0
	
	visible
	active if "has ship"
	sprite "ui/planet dialog button"
		center 280 310
	button d "_Depart"
		center 280 310
		dimensions 140 40
		size 18
		align right
		pad 10 0



interface "spaceport"
	box "content"
		from -240 80 to 240 320
	image "port"
		center 0 -140



interface "spaceport (small screen)"
	box "content"
		from -300 80 to 180 320
	image "port"
		center -60 -140



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



interface "news (small screen)"
	sprite "ui/news"
		center -160 -45
	image "portrait"
		center 20 -40
	string "name"
		from -400 -100
		align center left
		color "bright"
	box "message portrait"
		from -400 -80
		to -50 10
	box "message"
		from -400 -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 -10 85
		color "bright"
		align right
	label "entire fleet"
		center 110 85
		color "bright"
		align right
	label "salary"
		center 230 85
		color "bright"
		align right
	
	fill
		center 0 95
		dimensions 480 1
	
	label "bunks"
		center -230 110
		align left
	string "flagship bunks"
		center -10 110
		align right
	string "fleet bunks"
		center 110 110
		align right
	
	label "required crew"
		center -230 130
		align left
	string "flagship required"
		center -10 130
		align right
	string "fleet required"
		center 110 130
		align right
	string "salary required"
		center 230 130
		align right
	
	label "extra crew"
		center -230 150
		align left
	string "flagship extra"
		center -10 150
		align right
	string "salary extra"
		center 230 150
		align right
	
	active if "can hire"
	sprite "ui/dialog cancel"
		center 200 355
	button h "_Hire"
		center 200 355
		dimensions 80 40
	
	active if "can fire"
	sprite "ui/dialog cancel"
		center 120 355
	button f "_Fire"
		center 120 355
		dimensions 80 40
	
	active
	string "modifier"
		from -5 150
		color "dim"
		align left
	
	label "passenger space"
		center -230 180
		align left
	string "flagship unused"
		center -10 180
		align right
	string "fleet unused"
		center 110 180
		align right
	
	label "passengers"
		center -230 200
		align left
	string "passengers"
		center 110 200
		align right
	
	label "(Extra crew for your flagship increases your odds of capturing ships,"
		center 0 290
	label "and once you capture a ship you need crew members to serve on it.)"
		center 0 310




# The top of the text panel is the planet dialog is at +70, and it is 500 x 260.
interface "hiring (small screen)"
	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
	
	fill
		center -60 95
		dimensions 480 1
	
	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"
	box "content"
		from -250 80 to 250 355
	
	fill
		center 0 95
		dimensions 480 1

	active if "can buy"
	sprite "ui/dialog cancel"
		center 120 355
	button u "B_uy All"
		center 120 355
		dimensions 70 30

	active if "can sell"
	sprite "ui/dialog cancel"
		center 200 355
	button e "S_ell All"
		center 200 355
		dimensions 70 30

	active if "can sell minables"
	sprite "ui/wide button"
		center -90 355
	button m "Sell _Minables"
		center -90 355
		dimensions 90 30

	active if "can sell outfits"
	sprite "ui/wide button"
		center -190 355
	button f "Sell Out_fits"
		center -190 355
		dimensions 90 30



interface "trade (small screen)"
	box "content"
		from -310 80 to 190 355
	
	fill
		center -60 95
		dimensions 480 1

	active if "can buy"
	sprite "ui/dialog cancel"
		center 60 355
	button u "B_uy All"
		center 60 355
		dimensions 70 30

	active if "can sell"
	sprite "ui/dialog cancel"
		center 140 355
	button e "S_ell All"
		center 140 355
		dimensions 70 30

	active if "can sell minables"
	sprite "ui/wide button"
		center -150 355
	button m "Sell _Minables"
		center -150 355
		dimensions 90 30

	active if "can sell outfits"
	sprite "ui/wide button"
		center -250 355
	button f "Sell Out_fits"
		center -250 355
		dimensions 90 30



interface "bank"
	box "content"
		from -250 78 to 250 355
	
	fill
		center 0 95
		dimensions 480 1
	
	active if "can pay"
	sprite "ui/dialog cancel"
		center 200 355
	button a "Pay _All"
		center 200 355
		dimensions 80 40



interface "bank (small screen)"
	box "content"
		from -310 78 to 190 355
	
	fill
		center -60 95
		dimensions 480 1
	
	active if "can pay"
	sprite "ui/dialog cancel"
		center 140 355
	button a "Pay _All"
		center 140 355
		dimensions 80 40



interface "mission" bottom
	box "description"
		from -190 -214 to 190 -118
	visible if "has description"
	sprite "ui/mission"
		align bottom
	visible if "!has description"
	sprite "ui/mission empty"
		align bottom

	visible
	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 -544 -50 to -434 0
	button s "_Shipyards"
		from -534 -40 to -444 -10
	
	active if "!is outfitters"
	sprite "ui/wide button"
		from -444 -50 to -334 0
	button o "_Outfitters"
		from -434 -40 to -344 -10
	
	active if "!is missions"
	sprite "ui/dialog cancel"
		from -344 -50 to -254 0
	button i "M_issions"
		from -334 -40 to -264 -10
	
	active if "!is ports"
	sprite "ui/dialog cancel"
		from -264 -50 to -174 0
	button p "_Ports"
		from -254 -40 to -184 -10

	active if "!is stars"
	sprite "ui/dialog cancel"
		from -184 -50 to -94 0
	button t "S_tars"
		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
	
	active
	sprite "ui/dialog cancel"
		from 0 -40 to -90 -90
	button f "_Find"
		from -80 -80 to -10 -50

	sprite "ui/zoom"
		from 0 -80 to -90 -130
	active if "!max zoom"
	button + "_+"
		from -10 -90 to -40 -120
		size 18
	active if "!min zoom"
	button - "_-"
		from -50 -90 to -80 -120
		size 18


interface "map buttons (small screen)" bottom right
	active if "!is shipyards"
	sprite "ui/wide button"
		from -270 -40 to -160 -90
	button s "_Shipyards"
		from -260 -50 to -170 -80

	active if "!is outfitters"
	sprite "ui/wide button"
		from -270 -50 to -160 0
	button o "_Outfitters"
		from -260 -40 to -170 -10

	active if "!is missions"
	sprite "ui/dialog cancel"
		from -170 -30 to -80 -180
	button i "M_issions"
		from -160 -60 to -90 -150

	active if "!is ports"
	sprite "ui/dialog cancel"
		from -170 -50 to -80 0
	button p "_Ports"
		from -160 -40 to -90 -10

	active if "!is stars"
	sprite "ui/dialog cancel"
		from -170 -40 to -80 -90
	button t "S_tars"
		from -160 -80 to -90 -50

	active
	sprite "ui/dialog cancel"
		from -90 -50 to 0 0
	button d "_Done"
		from -80 -40 to -10 -10

	active
	sprite "ui/dialog cancel"
		from 0 -40 to -90 -90
	button f "_Find"
		from -80 -80 to -10 -50

	sprite "ui/zoom"
		from 0 -80 to -90 -130
	active if "!max zoom"
	button + "_+"
		from -10 -90 to -40 -120
		size 18
	active if "!min zoom"
	button - "_-"
		from -50 -90 to -80 -120
		size 18



interface "map"
	value "max zoom" 2
	value "min zoom" -2
	value "zoom animation duration" 10

	anchor top
	string "route error"
		center 1 59
		size 18
		color "map route error shadow"
	string "route error"
		center 0 58
		size 18
		color "map route error text"



interface "map: mission view: key"
	anchor bottom left
	sprite "ui/mission key"
		align bottom left
		from 0 0
	pointer
		align left
		center 15 -90
		dimensions 10 18
		"orientation angle" 135
		color "available job"
	pointer
		align left
		center 15 -70
		dimensions 10 18
		"orientation angle" 135
		color "unavailable job"
	pointer
		align left
		center 15 -50
		dimensions 10 18
		"orientation angle" 135
		color "active mission"
	pointer
		align left
		center 15 -30
		dimensions 10 18
		"orientation angle" 135
		color "blocked mission"
	pointer
		align left
		center 15 -10
		dimensions 10 18
		"orientation angle" 135
		color "waypoint"
	visible if "available"
	label "Available job; can accept"
		align bottom left
		from 18 -87
		color bright
	visible if "!available"
	label "Available job; can accept"
		align bottom left
		from 18 -87
		color dim
	visible if "unavailable"
	label "Too little space to accept"
		align bottom left
		from 18 -67
		color bright
	visible if "!unavailable"
	label "Too little space to accept"
		align bottom left
		from 18 -67
		color dim
	visible if "active"
	label "Active job; go here to complete"
		align bottom left
		from 18 -47
		color bright
	visible if "!active"
	label "Active job; go here to complete"
		align bottom left
		from 18 -47
		color dim
	visible if "blocked"
	label "Has unfinished requirements"
		align bottom left
		from 18 -27
		color bright
	visible if "!blocked"
	label "Has unfinished requirements"
		align bottom left
		from 18 -27
		color dim
	visible if "waypoint"
	label "System of importance"
		align bottom left
		from 18 -7
		color bright
	visible if "!waypoint"
	label "System of importance"
		align bottom left
		from 18 -7
		color dim



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 k "Par_k"
		center -55 305
		dimensions 70 30
	active
	
	visible if "show unpark"
	sprite "ui/dialog cancel"
		center -55 305
	button k "Unpar_k"
		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
	visible if "show park system"
	sprite "ui/wide button"
		center 40 305
	button c "Park Lo_cal"
		center 40 305
		dimensions 90 30
	visible if "show unpark system"
	sprite "ui/wide button"
		center 40 305
	button c "Unpark Lo_cal"
		center 40 305
		dimensions 90 30
	visible if "show save order"
	sprite "ui/wide button"
		center -195 305
	button v "Sa_ve Order"
		center -195 305
		dimensions 90 30



interface "message log"
	value "width" 570

	button d ""
		from 570 0 top left
		to 0 0 bottom right
	button "A" ""
		center 710 -30 bottom left
		dimensions 200 60
	sprite "ui/message log key"
		center 710 -30 bottom left
	visible if "!important messages only"
	sprite "ui/unchecked"
		center 640 -30 bottom left
	visible if "important messages only"
	sprite "ui/checked"
		center 640 -30 bottom left
	visible
	active if "important messages only"
	button i ""
		center 706 -20 bottom left
		dimensions 142 40
	"wrapped label" "Hide less _important messages"
		center 714 -16 bottom left
		width 130
		color active
		inactive medium
	sprite "ui/dialog cancel"
		center 654 -80 bottom left
	active if "!empty"
	button c "Clear"
		center 654 -80 bottom left
		dimensions 70 30

	visible if "empty"
	label "(The message log is empty.)"
		from 300 0 left
		color medium



interface "hail panel"
	sprite "ui/hail panel"
	string "header"
		from -50 -65
		align left
		width 330
		truncate back

	button d "_Done"
		center 250 115
		dimensions 80 30

	visible if "!show pay bribe"
	active if "can bribe"
	button b "Offer _Bribe"
		center 130 115
		dimensions 140 30
	visible if "show pay bribe"
	active if "can pay bribe"
	button b "Pay _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



interface "map: sales key"
	anchor bottom left
	box "content"
		align bottom left
		from 330 -80
		dimensions 140 80
	sprite "ui/sales key"
		align bottom left
		from 300 0

	ring full
		center 340 -72
		dimensions 9 9
		size 1.75
		color "map: sale marker: no shop"
	ring full
		center 340 -52
		dimensions 9 9
		size 1.75
		color "map: sale marker: has shop"
	ring full
		center 340 -32
		dimensions 9 9
		size 1.75
		color "map: sale marker: item sold"
	ring full
		center 340 -12
		dimensions 9 9
		size 1.75
		color "map: sale marker: item stored"

	visible if "is shipyards"
	label "Has no shipyard",
		from 350 -72
		align left
	label "Has shipyard",
		from 350 -52
		align left
	label "Sells this ship",
		from 350 -32
		align left
	label "Ship parked here"
		from 350 -12
		align left

	visible if "is outfitters"
	label "Has no outfitter",
		from 350 -72
		align left
	label "Has outfitter",
		from 350 -52
		align left
	label "Sells this outfit",
		from 350 -32
		align left
	label "Outfit in storage"
		from 350 -12
		align left

	visible if "is outfitters w/ minerals"
	label "Has no outfitter",
		from 350 -72
		align left
	label "Has outfitter",
		from 350 -52
		align left
	label "Mine this here",
		from 350 -32
		align left
	label "Mineral in storage"
		from 350 -12
		align left

	visible if "only sold here"
	pointer
		center 333 -32
		color bright
		dimensions 10 10
		"orientation vector" 1 0
	visible if "only stored here"
	pointer
		center 333 -12
		color bright
		dimensions 10 10
		"orientation vector" 1 0
