guiTypes = {

	# MARKET
	containerWindowType = {
		name = "market_view"
		size = { width = 900 height = 685 }
		moveable = no
		orientation = upper_left

		position = { x = 35 y = 40 }
		show_position = { x = 35 y = 40 }
        hide_position = { x = -808 y = 40 }
        animation_time = 200
        animation_type = decelerated

		containerWindowType = {
			name = "galaxy_view_background_box"
			size = { width = 900 height = 600 }
			position = { x = 0 y = 0 }

			background = {
				name = "galaxy_view_background"
				spriteType = "GFX_tile_large_bg"
			}
		}

		iconType = {
			name = "hex_bg"
			spriteType = "GFX_hex_bg"
			position = { x = 5 y = -12 }
			alwaysTransparent = yes
		}

		iconType = {
			name = "empire_header_line"
			quadTextureSprite = "GFX_line_long"
			position = { x = 6 y = 21 }
		}

		instantTextBoxType={
			name = "windows_title"
			font = "malgun_goth_24"
			position = { x = 35 y = 5 }
			maxWidth = 800
			maxHeight = 40
			fixedSize = yes
			format = left
		}

		buttonType = {
			name = "close"
			quadTextureSprite = "GFX_close"
			position = { x = -45 y = 16 }
			orientation = upper_right
			shortcut = "ESCAPE"
			clicksound = "back_click"
			actionshortcut = "cancel"
		}

		@tabheight = -87
		buttonType = {
			name = "tab_market"
			quadTextureSprite = "GFX_tab_1_active"
			position = { x= -20 y = @tabheight }
			font = "cg_16b"
			buttonText = "MARKET_VIEW"
			buttonFont = "cg_16b"
			shortcut = "z"
			clicksound = "tab_click"
			Orientation = "LOWER_LEFT"
			oversound = no_sound
		}
		buttonType = {
			name = "tab_market_active"
			quadTextureSprite = "GFX_tab_1_active"
			position = { x= -20 y = @tabheight }
			font = "cg_16b"
			buttonText = "MARKET_VIEW"
			buttonFont = "cg_16b"
			clicksound = "tab_click"
			shortcut = "z"
			Orientation = "LOWER_LEFT"
			oversound = no_sound
		}

		buttonType = {
			name = "tab_slave_market"
			quadTextureSprite = "GFX_tab_2_inactive"
			position = { x= 109 y = @tabheight }
			font = "cg_16b"
			buttonText = "SLAVE_MARKET"
			buttonFont = "cg_16b"
			shortcut = "x"
			clicksound = "tab_click"
			Orientation = "LOWER_LEFT"
			oversound = no_sound
		}

		buttonType = {
			name = "tab_slave_market_active"
			quadTextureSprite = "GFX_tab_2_active"
			position = { x= 109 y = @tabheight }
			font = "cg_16b"
			buttonText = "SLAVE_MARKET"
			buttonFont = "cg_16b"
			shortcut = "x"
			clicksound = "tab_click"
			Orientation = "LOWER_LEFT"
			oversound = no_sound
		}

		containerWindowType = {
			name = "market"
			size = { width = 900 height = 685 }
			moveable = no
			orientation = upper_left
			position = { x = 0 y = 0 }

			containerWindowType = {
				name = "resources_box"
				size = { width = 542 height = 245 }
				position = { x = 8 y = 40 }

				instantTextBoxType = {
						name = "select_resource_text"
						font = "malgun_goth_24"
						position = { x = 0 y = 7 }
						text = "SELECT_RESOURCE"
						maxWidth = 512
						maxHeight = 200
						fixedSize = yes
						format = center
				}

				gridBoxType = {
					name = "resources_grid"
					position = { x = 140 y = 85 }
					size = { width = 90 height = 160 }
					slotsize = {
						width = 81
						height = 35
					}
					max_slots_horizontal = 3
				}
			}

			containerWindowType = {
				name = "buy_box"
				size = { width = 240 height = 320 }
				position = { x = 28 y = 280 }
				clipping = yes

				containerWindowType = {
					name = "empire_list"
					position = { x=0 y= 50 }
					size = { width= 300 height= 225 }

					background = {
						name = "area51"
						spriteType = "GFX_tiles_dark_area_cut_8"
					}
				}

				instantTextBoxType = {
						name = "buy_header_text"
						font = "malgun_goth_24"
						position = { x = 20 y = 10 }
						text = "MARKET_BUY"
						maxWidth = 200
						maxHeight = 200
						fixedSize = yes
						format = left
				}

				iconType = {
					name = "header_line"
					quadTextureSprite = "GFX_line"
					position = { x = -60 y = 27 }
				}

				instantTextBoxType = {
						name = "unit_price_buy"
						font = "cg_16b"
						position = { x = 130 y = 10 }
						maxWidth = 130
						maxHeight = 200
						fixedSize = yes
				}

				instantTextBoxType = {
						name = "buy_info_text"
						font = "cg_16b"
						position = { x = 10 y = 55 }
						text = "MARKET_BUY_INFO"
						maxWidth = 220
						maxHeight = 20
						fixedSize = yes
						format = center
				}

				gridBoxType = {
					name = "buy_resources_grid"
					position = { x = -7 y = 80 }
					size = { width = 110 height = 200 }
					slotsize = {
						width = 75
						height = 88
					}
					max_slots_horizontal = 3
				}
			}

			containerWindowType = {
				name = "sell_box"
				size = { width = 240 height = 320 }
				position = { x = 295 y = 280 }
				clipping = yes

				containerWindowType = {
					name = "empire_list"
					position = { x=0 y= 50 }
					size = { width= 300 height= 225 }

					background = {
						name = "area51"
						spriteType = "GFX_tiles_dark_area_cut_8"
					}
				}

				instantTextBoxType = {
						name = "sell_header_text"
						font = "malgun_goth_24"
						position = { x = 20 y = 10 }
						text = "MARKET_SELL"
						maxWidth = 200
						maxHeight = 200
						fixedSize = yes
						format = left
				}

				iconType = {
					name = "header_line"
					quadTextureSprite = "GFX_line"
					position = { x = -60 y = 27 }
				}

				instantTextBoxType = {
						name = "unit_price_sell"
						font = "cg_16b"
						position = { x = 130 y = 10 }
						maxWidth = 130
						maxHeight = 200
						fixedSize = yes
				}

				instantTextBoxType = {
						name = "sell_info_text"
						font = "cg_16b"
						position = { x = 10 y = 55 }
						text = "MARKET_SELL_INFO"
						maxWidth = 220
						maxHeight = 20
						fixedSize = yes
						format = center
				}

				gridBoxType = {
					name = "sell_resources_grid"
					position = { x = -7 y = 80 }
					size = { width = 110 height = 200 }
					slotsize = {
						width = 75
						height = 88
					}
					max_slots_horizontal = 3
				}
			}

			instantTextBoxType = {
				name = "total_bought_text"
				font = "cg_16b"
				position = { x = 25 y = 555 }
				maxWidth = 250
				maxHeight = 50
				fixedSize = yes
				format = center
				alwaysTransparent = no
			}

			instantTextBoxType = {
				name = "total_sold_text"
				font = "cg_16b"
				position = { x = 285 y = 555 }
				maxWidth = 250
				maxHeight = 50
				fixedSize = yes
				format = center
				alwaysTransparent = no
			}

			containerWindowType = {
				name = "trade_fee_box"
				size = { width = 400 height = 30 }
				position = { x = 60 y = 78 }

					background = {
						name = "background"
						spriteType = "GFX_tiles_dark_area_cut_8"
						alwaysTransparent = yes
					}

				iconType = {
					name = "market_trade_icon"
					quadTextureSprite = "GFX_topbar_market_button"
					position = { x = 10 y = 3 }
					alwaysTransparent = yes
					scale = 0.85
				}

				instantTextBoxType = {
					name = "trade_fee"
					font = "cg_16b"
					position = { x = 55 y = 7 }
					text = "MARKET_TRADE_FEE_HEADER"
					maxWidth = 90
					maxHeight = 20
					fixedSize = yes
					alwaysTransparent = no
				}

				instantTextBoxType = {
					name = "trade_fee_value"
					font = "cg_16b"
					position = { x = 150 y = 7 }
					maxWidth = 50
					maxHeight = 50
					fixedSize = yes
					alwaysTransparent = no
				}
			}

			containerWindowType = {
				name = "trade_stockpile_box"
				size = { width = 200 height = 30 }
				position = { x = 260 y = 78 }

				instantTextBoxType = {
					name = "trade_stockpile_header"
					font = "cg_16b"
					position = { x = 10 y = 7 }
					text = "MARKET_TRADE_STOCKPILE_HEADER"
					maxWidth = 120
					maxHeight = 20
					fixedSize = yes
					alwaysTransparent = no
				}

				instantTextBoxType = {
					name = "trade_stockpile_value"
					font = "cg_16b"
					position = { x = 130 y = 7 }
					maxWidth = 100
					maxHeight = 50
					fixedSize = yes
					alwaysTransparent = no
				}
			}

			instantTextBoxType = {
				name = "market_state"
				font = "cg_16b"
				position = { x = 560 y = 74 }
				format = center
				text = "GALACTIC_MARKET"
				maxWidth = 308
				maxHeight = 50
				fixedSize = yes
				text_color_code = "H"
			}

			containerWindowType = {
				name = "market_info_window"
				size = { width = 308 height = 120 }
				position = { x = 560 y = 80 }

				background = {
					name = "bg"
					quadTextureSprite = "GFX_market_info_box"
				}

				instantTextBoxType = {
					name = "market_info"
					font = "cg_16b"
					position = { x = 40 y = 30 }
					format = center
					maxWidth = 228
					maxHeight = 80
					fixedSize = yes
				}

				containerWindowType = {
					name = "market_leader"
					size = { width = 288 height = 70 }
					position = { x = 10 y = 30 }

					instantTextBoxType = {
						name = "market_leader_desc"
						font = "cg_16b"
						position = { x = 50 y = 0 }
						format = center
						text = "MARKET_LEADER_DESC"
						maxWidth = 208
						maxHeight = 50
						fixedSize = yes
					}

					buttonType = {
						name = "flag"
						quadTextureSprite = "GFX_empire_flag_32"
						position = { x = 50 y = 25  }
					}

					instantTextBoxType = {
						name = "name"
						font = "cg_16b"
						position = { x = 95 y = 32 }
						maxWidth = 180
						maxHeight = 50
						text_color_code = "H"
						fixedSize = yes
					}
				}
			}

			containerWindowType = {
				name = "automatic_trades_box"
				size = { width = 308 height = 370 }
				position = { x = 555 y = 200 }

				instantTextBoxType = {
					name = "automatic_trades_header"
					font = "malgun_goth_24"
					position = { x = 17 y = 15 }
					format = center
					text = "AUTOMATIC_TRADES"
					maxWidth = 280
					maxHeight = 50
					fixedSize = yes
					alwaysTransparent = no
				}

				containerWindowType = {
					name = "trades"
					size = { width = 300 height = 310 }
					position = { x = 10 y = 45 }

					background = {
						name = "background"
						spriteType = "GFX_tiles_dark_area_cut_8"
					}

					buttonType = {
						name = "new_trade_button"
						position = { x = 3 y = 5 }
						spriteType = "GFX_galactic_object_button"
					}

					instantTextBoxType = {
						name = "new_trade_button_title"
						font = "cg_16b"
						position = { x = 18 y = 12 }
						format = center
						text = "ADD_NEW_TRADE"
						maxWidth = 262
						maxHeight = 20
						fixedSize = yes
						format = center
						alwaysTransparent = yes
					}

					iconType = {
						name = "divider"
						quadTextureSprite = "GFX_line_horizontal"
						position = { x = 26 y = 35 }
						alwaysTransparent = yes
					}

					containerWindowType = {
						name = "trade_grid_box"
						position = { x = 10 y = 53 }
						size = { width = 290 height = 250 }
						verticalScrollbar = "right_vertical_slider_s"

						background = {
							name = "bg"
							quadTextureSprite = "GFX_tiled_window_transparent"
						}

						gridBoxType = {
							name = "monthly_trades_grid"
							position = { x = -8 y = 0 }
							size = { width = 290 height = 245 }
							slotsize = {
								width = 288
								height = 30
							}
							max_slots_horizontal = 1
						}
					}
				}
			}
		}

		# SLAVE MARKET
		containerWindowType = {
			name = "slave_market"
			size = { width = 900 height = 685 }
			moveable = no
			orientation = upper_left
			position = { x = 0 y = 0 }

			containerWindowType = {
				name = "left_box"
				size = { width = 500 height = 520 }
				position = { x = 15 y = 60 }

				@sortButtonY = -10
				buttonType = {
					name = "sort_name"
					position = { x = 0 y = @sortButtonY }
					spriteType = "GFX_button_150_24"
					buttonFont = "cg_16b"
					text = "NAME"
					font = "cg_16b"
					pdx_tooltip = "SORT_BY_NAME"
					orientation = UPPER_LEFT
				}

				buttonType={
					name = "sort_habitability"
					position = { x = 152 y = @sortButtonY }
					font = "cg_16b"
					spriteType = "GFX_button_35_24"
					orientation = UPPER_LEFT
					pdx_tooltip = "EXPANSION_PLANNER_SORT_HABITABILITY"
					oversound = mouse_over
				}

				iconType = {
					name = "habitability_icon"
					spriteType = "GFX_mod_habitability"
					position = { x = 169 y = 4 }
					scale = 0.85
					alwaystransparent = yes
				}

				buttonType = {
					name = "sort_traits"
					position = { x = 189 y = -3 }
					font = "cg_16b"
					spriteType = "GFX_standard_button_200_24"
					text = "TRAITS"
					pdx_tooltip = "SPECIES_VIEW_SORT_TRAITS"
					oversound = mouse_over
				}

				buttonType = {
					name = "sort_cost"
					position = { x = 391 y = @sortButtonY }
					spriteType = "GFX_button_75_24"
					buttonFont = "cg_16b"
					text = "COST"
					orientation = UPPER_LEFT
					pdx_tooltip = "SORT_BY_COST"
					oversound = mouse_over
				}

				buttonType = {
					name = "sell_slaves"
					font = "cg_16b"
					spriteType = "GFX_standard_button_142_34_button"
					buttonText = "SELL_SLAVES"
					pdx_tooltip = "CLICK_TO_SELL_SLAVES"
					position = { x = 170 y = 470 }
				}

				containerWindowType = {
					name = "slaves_for_sale"
					position = { x = 10 y = 25 }
					size = { width = 485 height = 450 }
					margin = {
						top = 10
						bottom = 10
					}

					verticalScrollbar = "right_vertical_slider"

					background = {
						name = "bg"
						quadTextureSprite = "GFX_tiled_window_transparent"
					}

					instantTextBoxType = {
						name = "no_slaves_for_sale"
						font = "cg_16b"
						position = { x = 4 y = 25 }
						format = center
						text = "NO_SLAVES_FOR_SALE"
						maxWidth = 465
						maxHeight = 50
						fixedSize = yes
						alwaysTransparent = no
					}

					gridBoxType = {
						name = "slave_list"
						position = { x = 0 y = 0 }
						size = { width = 381 height = 370 }
						slotsize = {
							 width = 380
							 height = 70
							}
						max_slots_horizontal = 1
					}
				}
			}

			containerWindowType = {
				name = "right_box"
				size = { width = 361 height = 520 }
				position = { x = 520 y = 60 }

				iconType = {
					name = "title_hex"
					quadTextureSprite = "GFX_hex_bg"
					position = { x = -5 y = -28 }
				}

				iconType = {
					name = "header_line"
					spriteType = "GFX_line"
					position = { x = 6 y = 10 }
					alwaystransparent = yes
				}

				instantTextBoxType={
					name = "header"
					font = "malgun_goth_24"
					text = "DESTINATION"
					position = { x = 20 y = -10 }
					maxWidth = 300
					maxHeight = 20
					fixedSize = yes
					format = left
				}

				containerWindowType = {
					name = "selectable_planets"
					position = { x = 10 y = 26 }
					size = { width = 345 height = 450 }
					margin = {
						top = 10
						bottom = 10
					}

					verticalScrollbar = "right_vertical_slider"

					background = {
						name = "bg"
						quadTextureSprite = "GFX_tiled_window_transparent"
					}

					gridBoxType = {
						name = "planet_list"
						position = { x = 0 y = 0 }
						size = { width = 241 height = 370 }
						slotsize = {
							 width = 240
							 height = 108
							}
						max_slots_horizontal = 1
					}
				}
			}
		}
	}

	# GRID ENTRIES
	containerWindowType = {
		name = "market_resource_grid_entry"
		size = {
			width = 74
			height = 30
		}

		background = {
			name = "bg"
			quadTextureSprite = "GFX_interface_list_light"
			clicksound = "outliner_click_tab"
		}

		background = {
			name = "selected_overlay"
			spriteType = "GFX_glow_tile_orange_no_padding"
		}

		iconType = {
			name = "disabled_bg"
			spriteType = "GFX_striped"
			position = { x = 0 y = 10 }
			alwaysTransparent = no
			orientation = center_up
			centerPosition = yes
		}

		instantTextBoxType = {
			name = "resource_amount"
			font = "cg_16b"
			position = { x = -5 y = 6 }
			maxWidth = 70
			maxHeight = 20
			fixedSize = yes
			format = center
			alwaysTransparent = yes
		}
	}

	containerWindowType = {
		name = "market_trade_resource_grid_entry"
		size = {
			width = 70
			height = 85
		}

		background = {
			name = "bg"
			quadTextureSprite = "GFX_market_trade_resource_box"
			clicksound = "confirm_click"
		}

		iconType = {
			name = "large_resource_icon"
			spriteType = "gfx_transparency"
			position = { x = 18 y = 8 }
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "resource_amount"
			font = "cg_16b"
			position = { x = 10 y = 47 }
			maxWidth = 50
			maxHeight = 30
			fixedSize = yes
			format = center
			text_color_code = "E"
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "price"
			font = "cg_16b"
			position = { x = -2 y = 65 }
			maxWidth = 70
			maxHeight = 30
			fixedSize = yes
			format = center
			alwaysTransparent = yes
		}
	}

	containerWindowType = {
		name = "market_monthly_trade_grid_entry"
		size = { width = 280 height = 92 }

		buttonType = {
			name = "trade_entry"
			font = "cg_16b"
			spriteType = "GFX_galactic_object_button"
			orientation = UPPER_LEFT
		}
		instantTextBoxType = {
			name = "trade_type"
			font = "cg_16b"
			position = { x = 20 y = 9 }
			maxWidth = 50
			maxHeight = 30
			text = "SELL"
			fixedSize = yes
			alwaysTransparent = yes
		}

		iconType = {
			name = "resource_icon"
			spriteType = "GFX_resource_minerals"
			position = { x = 70 y = 8 }
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "amount"
			font = "cg_16b"
			position = { x = 90 y = 9 }
			maxWidth = 70
			maxHeight = 30
			fixedSize = yes
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "price_text"
			font = "cg_16b"
			position = { x = 180 y = 9 }
			maxWidth = 70
			maxHeight = 30
			fixedSize = yes
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "price_value"
			font = "cg_16b"
			position = { x = 220 y = 9 }
			maxWidth = 70
			maxHeight = 30
			fixedSize = yes
			alwaysTransparent = yes
		}
	}

	containerWindowType = {
		name = "slave_market_pop_entry"
		size = { width = 475 height = 65 }
		position = { x = 0 y = 0 }

		background = {
			name = "slave_market_pop_entry_bg"
			spriteType = "GFX_tiles_dark_area_cut_8"
		}

		containerWindowType = {
			name = "portrait"
			position = { x = 5 y = 6 }
			size = { width = 50 height = 55 }
			clipping = yes

			iconType = {
				name = "species_portrait"
				quadTextureSprite = "GFX_portrait_character"
				position = { x = -32 y = -15 }
				scale = 0.19
			}

			iconType = {
				name = "pop_status"
				spriteType = "GFX_pop_status"
				position = { x = 0 y = 30 }
				scale = 0.8
			}

			instantTextBoxType= {
				name = "amount"
				font = "cg_16b"
				text = "5"
				position = { x = 8 y = 34 }
				maxWidth = 40
				maxHeight = 20
				fixedSize = yes
				format = right
				text = "100"
				alwaysTransparent = yes
			}
		}

		instantTextBoxType = {
			name = "species"
			position = { x = 60 y = 15 }
			alwaystransparent = no
			font = "cg_16b"
			maxWidth = 100
			maxHeight = 20
			fixedSize = yes
			text_color_code = "H"
		}

		instantTextBoxType={
			name = "type"
			position = { x = 60 y = 32 }
			font = "cg_16b"
			maxWidth = 100
			maxHeight = 20
			fixedSize = yes
		}

		instantTextBoxType={
			name = "habitability"
			position = { x = 160 y = 25 }
			font = "cg_16b"
			maxWidth = 50
			text = "TEST"
		}

		OverlappingElementsBoxType = {
			name = "traits_icons"
			position = { x = 220 y = 20 }
			size = { x = 150 y = 40 }
			format = left
		}

		buttonType = {
			name = "buy_cancel"
			position = { x = 380 y = 8 }
			font = "cg_16b"
			spriteType = "GFX_button_75_24"
		}
	}

	containerWindowType = {
		name = "slave_market_planet_entry"
		size = { width = 336 height = 103 }
		position = { x = 0 y = 0 }

		background = {
			name = "slave_market_planet_entry_bg"
			spriteType = "GFX_tiles_dark_area_cut_8"
		}

		background = {
			name = "selected_overlay"
			spriteType = "GFX_glow_tile_orange_no_padding"
		}

		containerWindowType = {
			name = "planet_info"
			size = { width = 270 height = 60 }
			position = { x = 42 y = 0 }

			iconType = {
				name = "planet_class_icon"
				position = { x = 0 y = 8 }
				spriteType = "GFX_planet_type"
			}

			instantTextBoxType = {
				name = "name"
				position = { x = 50 y = 12 }
				alwaystransparent = no
				font = "cg_16b"
				maxWidth = 190
				maxHeight = 40
				text_color_code = "H"
			}

			instantTextBoxType={
				name = "type"
				position = { x = 50 y = 29 }
				font = "cg_16b"
				maxWidth = 190
				text_color_code = "E"
			}

			instantTextBoxType = {
				name = "habitability"
				position = { x = 210 y = 12 }
				alwaystransparent = no
				font = "cg_16b"
				maxWidth = 190
				maxHeight = 40
			}
		}

		containerWindowType = {
			name = "planet_housing"
			size = { width = 76 height = 34 }
			position = { x = 42 y = 56 }

			background = {
				name = "background"
				spriteType = "GFX_dark_area_cut"
			}

			iconType = {
				name = "planet_housing_icon"
				spriteType = "GFX_planet_view_planet_housing"
				position = { x = 7 y = 5 }
				tooltip_mode_enabled = yes
			}

			instantTextBoxType={
				name = "planet_housing_amount"
				font = "cg_16b"
				position = { x = 30 y = 8 }
				text = "10"
				maxWidth = 40
				maxHeight = 20
				fixedSize = yes
				format = center
			}
		}

		containerWindowType = {
			name = "planet_jobs"
			size = { width = 86 height = 34 }
			position = { x = 124 y = 56 }

			background = {
				name = "background"
				spriteType = "GFX_dark_area_cut"
			}

			iconType = {
				name = "planet_jobs_icon"
				spriteType = "GFX_pop_job"
				position = { x = 5 y = 2 }
				scale = 0.97
				tooltip_mode_enabled = yes
			}

			instantTextBoxType={
				name = "planet_jobs_amount"
				font = "cg_16b"
				position = { x = 23 y = 8 }
				text = "2"
				maxWidth = 60
				maxHeight = 20
				fixedSize = yes
				format = center
			}
		}

		containerWindowType = {
			name = "planet_unemployed"
			size = { width = 76 height = 34 }
			position = { x = 216 y = 56 }

			background = {
				name = "background"
				spriteType = "GFX_dark_area_cut"
			}

			iconType = {
				name = "planet_unemployed_icon"
				spriteType = "GFX_unemployed"
				position = { x = 5 y = 4 }
				tooltip_mode_enabled = yes
				scale = 0.92
			}

			instantTextBoxType={
				name = "planet_unemployed_amount"
				font = "cg_16b"
				position = { x = 30 y = 8 }
				text = "2"
				maxWidth = 40
				maxHeight = 20
				fixedSize = yes
				format = center
			}
		}
	}
}
