guiTypes = {
	@spinnerOverlayPosX = -2
	@spinnerOverlayPosY = -4
	@spinnerOverlaySizeX = 311
	@spinnerOverlaySizeY = 34

	positionType = {
		name = "gamesetup_spinner_with_bar_text_pos"
		position = { x = 43 y = 0 }
	}

	containerWindowType = {
		name = "gamesetup_setupview"
		position = { x = -635 y = -355 }
		size = { width = 1270 height = 710 }
		orientation = center
		clipping = yes

		containerWindowType = {
			name = "leader_frame_box"
			size = { width = 100% height = 100%	}
			position = { x = 0 y = 0 }

			background = {
				name = "leader_frame"
				spriteType = "GFX_tile_large_bg_plain"
			}
		}

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

		iconType = {
			name = "empire_header_line"
			quadTextureSprite = "GFX_line_long"
			position = { x = 10 y = 40 }
		}

		instantTextBoxType = {
			name = "load_label"
			font = "large_title_font"
			position = { x = 26 y = 8 }
			maxWidth = 400
			maxHeight = 59
			text =	 "GAMESETUP_TAB_DETAILS"
			orientation = "UPPER_LEFT"
			format = left
			alwaysTransparent = yes
		}

		containerWindowType = {
			name = "galaxy_preview"
			position = { x = 20 y = 60 }
			size = { width = 590 height = 570 }

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

			instantTextBoxType = {
				name = "galaxy_preview_label"
				position = { x = 10 y = 4 }
				font = "malgun_goth_24"
				text = "ALL_GALAXY"
			}

			containerWindowType = {
				name = "galaxy_shape_image"
				position = { x = 11 y = 33 }
				size = { width = 566 height = 240 }

				background = {
					name = "galaxy_shape_image_bg"
					spriteType = "GFX_plain_green_frame_tile"
				}

				iconType = {
					name = "galaxy_shape_preview"
					spriteType = "GFX_galaxy_preview_elliptical"
					position = { x = 2  y =2 }
				}

				iconType = {
					name = "stripes"
					spriteType = "GFX_galaxy_preview_stripes"
					orientation = upper_left
					alwaysTransparent = yes
					position = { x = 2 y = 2 }
				}
			}

			containerWindowType = {
				name = "player_container"
				size = { width = 233 height = 90 }
				position = { x = 50 y = 297 }
				clipping = no

				background = {
					name = "background"
					spriteType = "GFX_tiles_dark_area_square_cut"
				}

				iconType = {
					name = "empire_flag"
					spriteType = "GFX_empire_flag_128"
					position = { x = -45 y = -15 }
					scale = 0.92
				}

				iconType = {
					name = "random_empire_flag"
					spriteType = "GFX_random_player_preview"
					position = { x = -43 y = -13 }
					scale = 0.55
				}

				instantTextBoxType = {
					name = "empire_name"
					position = { x = 70 y = 10 }
					font = "malgun_goth_24"
					fixedSize = yes
					maxWidth = 158
					maxHeight = 50
					vertical_alignment = center
				}

				instantTextBoxType = {
					name = "player_name"
					position = { x = 70 y = 62 }
					font = "cg_16b"
					fixedSize = yes
					maxWidth = 158
					maxHeight = 20
					text_color_code = "M"
				}
			}

			containerWindowType = {
				name = "species_container"
				size = { width = 292 height = 122 }
				position = { x = 283 y = 282 }

				background = {
					name = "background"
					spriteType = "GFX_tiles_dark_area_square_cut"
				}

				iconType = {
					name = "government_authority_border"
					quadTextureSprite = "GFX_authority_border_accent"
					alwaysTransparent = yes
				}

				containerWindowType = {
					name = "portrait_window"
					size = { width = 90 height = 106 }
					position = { x = 10 y = 8 }
					clipping = yes

					iconType = {
						name = "portrait_bg"
						quadTextureSprite = "GFX_leader_bg_ruler"
						position = { x = 0 y = 1 }
						scale = 0.28
						alwaysTransparent = yes
					}

					iconType = {
						name = "portrait"
						spriteType = "GFX_portrait_character"
						position = { x = -48 y = -11 }
						scale = 0.33
						alwaysTransparent = yes
					}

					iconType = {
						name = "random_portrait"
						quadTextureSprite = "GFX_unknown_species_portrait_0"
						position = { x = -3 y = 10 }
						scale = 0.5
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "portrait_frame_box"
					size = { width = 99 height = 114 }
					position = { x = 5 y = 4 }

					background = {
						name = "portrait_frame"
						spriteType = "GFX_clean_frame_area"
						alwaysTransparent = yes
					}
				}

				instantTextBoxType = {
					name = "species_name"
					position = { x = 107 y = 3 }
					font = "malgun_goth_24"
					fixedSize = yes
					maxWidth = 180
					maxHeight = 25
				}

				instantTextBoxType = {
					name = "species_class"
					position = { x = 107 y = 25 }
					font = "cg_16b"
					fixedSize = yes
					maxWidth = 180
					maxHeight = 20
					text_color_code = "E"
				}

				iconType = {
					name = "government_authority_icon"
					spriteType = "GFX_government_authority"
					position = { x = 108 y = 50 }
					scale = 0.7
				}

				instantTextBoxType = {
					name = "government_authority_name"
					position = { x = 143 y = 44 }
					font = "cg_16b"
					maxWidth = 144
					maxHeight = 40
					fixedSize = yes
					vertical_alignment = center
				}

				iconType = {
					name = "origin_icon"
					spriteType = "GFX_government_civic"
					position = { x = 109 y = 85 }
				}

				instantTextBoxType = {
					name = "origin_name"
					position = { x = 143 y = 79 }
					font = "cg_16b"
					maxWidth = 144
					maxHeight = 40
					fixedSize = yes
					vertical_alignment = center
				}
			}

			containerWindowType = {
				name = "ai_empires_container"
				size = { width = 581 height = 153 }
				position = { x = 5 y = 410 }

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

				gridBoxType = {
					name = "ai_empires"
					position = { x = 0 y = 0 }
					format = "UPPER_LEFT"
					slotsize = { width = 38 height = 49 }
					add_horizontal = yes
					max_slots_horizontal = 15
					max_slots_vertical = 3
				}
			}
		}

		buttonType = {
			name = "general_settings_tab"
			quadTextureSprite = "GFX_tab_gamesetup"
			position = { x = 620 y = 60 }
			scale = 0.75
			frame = 2
			font = "malgun_goth_24"
			buttontext = "GALAXY_SETTINGS_GENERAL"
			text_offset = { x = -30 y = -12 }
		}

		buttonType = {
			name = "advanced_settings_tab"
			quadTextureSprite = "GFX_tab_gamesetup"
			position = { x = 810 y = 60 }
			scale = 0.75
			frame = 1
			font = "malgun_goth_24"
			buttontext = "GALAXY_SETTINGS_ADVANCED"
			text_offset = { x = -30 y = -12 }
		}

		containerWindowType = {
			name = "settings_container"
			position = { x = 620 y = 97 }
			size = { width = 640 height = 533 }

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

			smoothListboxType = {
				name = "gamesetup_settings_categories_list"
				size = { x = 640 y = 533 }
				borderSize = { x = 10 y = 15 }
				offset = { x = -15 y = 0 }
				scrollbartype = "standardlistbox_slider"
				spacing = 10
			}
		}

		buttonType = {
			name = "back_button"
			quadTextureSprite = "GFX_select_button"
			position = { x = -1 y = -65	}
			shortcut = "ESCAPE"
			orientation = "LOWER_LEFT"
			clicksound = back_click
			oversound = mouse_over
			actionShortCut = "cancel"
			buttonFont = "malgun_goth_24"
			buttonText = "FRONT_BACK"
		}

		buttonType = {
			id = "next_button"
			name = "next_button"
			quadTextureSprite = "GFX_select_button"
			position = { x = -314 y = -65 }
			orientation = LOWER_RIGHT
			buttonFont = "malgun_goth_24"
			buttonText = "PLAY"
			shortcut = "RETURN"
			oversound = mouse_over
			actionShortcut = "start"
			clicksound = "confirm_click"
		}

		buttonType = {
			name = "reset_button"
			quadTextureSprite = "GFX_standard_button_200_34_button"
			position = { x = -100 y = 300 }
			buttonFont = "malgun_goth_24"
			buttonText = "RESET_DEFAULT"
			orientation = "CENTER"
			pdx_tooltip = "RESET_DEFAULT_TOOLTIP"
			clicksound = back_click
			oversound = mouse_over
		}
	}

	containerWindowType = {
		name = "gamesetup_spinner_entry"
		size = { width = 590 height = 40 }

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 2 }
			font = "cg_16b"
			maxWidth = 205
			maxHeight = 30
			orientation = "UPPER_LEFT"
			tooltip_mode_enabled = yes
			vertical_alignment = center
		}

		containerWindowType = {
			name = "spinner_container"
			size = { width = 307 height = 35 }
			position = { x = 293 y = 0 }

			background = {
				name = "background"
				spriteType = "GFX_tiles_light_area_cut_8"
			}

			instantTextBoxType = {
				name = "pick_text"
				position = { x = 43 y = 4 }
				font = "malgun_goth_24"
				text = "SIZE_NORMAL"
				maxWidth = 220
				maxHeight = 35
				fixedSize = yes
				format = center
				orientation = "UPPER_LEFT"
			}

			spinnerType = {
				name = "spinner"
				leftbutton = "spinner_upButton"
				rightbutton = "spinner_downButton"
				size = { x = 307 y = 30 }
				position = { x = 0 y = 4 }
				priority = 100
				borderSize = { x = 16 y = 16 }
				horizontal = 1
				maxValue = 100
				startValue = 0
				defaultSelection = yes

				guiButtonType = {
					name = "spinner_upButton"
					quadTextureSprite = "scrollbar_leftbutton"
				}
				guiButtonType = {
					name = "spinner_downButton"
					quadTextureSprite = "scrollbar_rightbutton"
				}

				overlay = {
					name = "selected_overlay"
					spriteType = "GFX_glow_tile_orange_no_padding"
					overSprite = "GFX_glow_tile_line"
					position = { x = @spinnerOverlayPosX y = @spinnerOverlayPosY }
					size = { x = @spinnerOverlaySizeX y = @spinnerOverlaySizeY }
				}
			}

			iconType = {
				name = "bar"
				spriteType = "GFX_difficulty_bar_1"
				position = { x = 152 y = 30 }
				centerPosition = yes
				alwaysTransparent = yes
			}
		}
	}

	containerWindowType = {
		name = "gamesetup_scrollbar_entry"
		size = { width = 590 height = 40 }

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 2 }
			font = "cg_16b"
			maxWidth = 205
			maxHeight = 30
			tooltip_mode_enabled = yes
			vertical_alignment = center
		}

		checkboxType = {
			name = "randomize_checkbox"
			spriteType = "GFX_checkbox_20_20_01"
			position = { x = 205 y = 3 }
		}

		instantTextBoxType = {
			name = "pick_text"
			position = { x = 236 y = 4 }
			font = "malgun_goth_24"
			maxWidth = 50
			maxHeight = 28
			format = right
			orientation = "UPPER_LEFT"
		}

		containerWindowType = {
			name = "scrollbar_container"
			size = { width = 307 height = 35 }
			position = { x = 293 y = 0 }

			background = {
				name = "background"
				spriteType = "GFX_tiles_light_area_cut_8"
			}

			scrollbarType = {
				name = "scrollbar"
				slider = "scrollbar_SliderButton"
				track = "scrollbar_TrackButton"
				leftbutton = "scrollbar_upButton"
				rightbutton = "scrollbar_downButton"
				size = { x = 307 y = 30 }
				position = { x = 0 y = 4 }
				priority = 100
				borderSize = { x = 16 y = 16 }
				maxValue = 100
				minValue = 0
				stepSize = 1
				startValue = 20
				horizontal = 1

				guiButtonType = {
					name = "scrollbar_SliderButton"
					quadTextureSprite = "GFX_settings_scroll_drager"
					position = { x = 30 y = 0 }
				}
				guiButtonType = {
					name = "scrollbar_TrackButton"
					quadTextureSprite = "scrollbar_background"
					position = { x = 30 y = 20 }
				}
				guiButtonType = {
					name = "scrollbar_upButton"
					quadTextureSprite = "scrollbar_leftbutton"
					position = { x = 30 y = 0 }
				}
				guiButtonType = {
					name = "scrollbar_downButton"
					quadTextureSprite = "scrollbar_rightbutton"
					position = { x = 30 y = 0 }
				}
				overlay = {
					name = "selected_overlay"
					spriteType = "GFX_glow_tile_orange_no_padding"
					overSprite = "GFX_glow_tile_line"
					position = { x = @spinnerOverlayPosX y = @spinnerOverlayPosY }
					size = { x = @spinnerOverlaySizeX y = @spinnerOverlaySizeY }
				}
			}
		}
	}

	containerWindowType = {
		name = "gamesetup_checkbox_entry"
		size = { width = 590 height = 40 }

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 2 }
			font = "cg_16b"
			maxWidth = 205
			maxHeight = 30
			orientation = "UPPER_LEFT"
			tooltip_mode_enabled = yes
			vertical_alignment = center
		}

		containerWindowType = {
			name = "checkbox_container"
			size = { width = 307 height = 35 }
			position = { x = 293 y = 0 }

			background = {
				name = "background"
				spriteType = "GFX_tiles_light_area_cut_8"
			}

			checkboxType = {
				name = "checkbox"
				spriteType = "GFX_checkbox_20_20_01"
				position = { x = 3 y = 3 }
			}

			instantTextBoxType = {
				name = "pick_text"
				position = { x = 43 y = 4 }
				font = "malgun_goth_24"
				text = "SIZE_NORMAL"
				maxWidth = 220
				maxHeight = 35
				fixedSize = yes
				format = center
				orientation = "UPPER_LEFT"
			}
		}
	}

	containerWindowType = {
		name = "gamesetup_icon_picker_option_entry"
		size = { width = 120 height = 100 }

		containerWindowType = {
			name = "button_container"
			size = { width = 120 height = 65 }

			buttonType = {
				name = "button"
				quadTextureSprite = "GFX_galaxy_button_elliptical"
				orientation = "CENTER"
				centerPosition = yes
			}
		}

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 65 }
			font = "cg_16b"
			fixedSize = yes
			maxWidth = 120
			maxHeight = 20
			format = center
		}
	}

	containerWindowType = {
		name = "gamesetup_icon_picker_entry"
		size = { width = 590 height = 0 }

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 2 }
			font = "cg_16b"
			maxWidth = 205
			maxHeight = 30
			orientation = "UPPER_LEFT"
			tooltip_mode_enabled = yes
			vertical_alignment = center
		}

		gridBoxType = {
			name = "options"
			position = { x = 0 y = 30 }
			format = "UPPER_LEFT"
			slotsize = { width = 120 height = 90 }
			add_horizontal = yes
			max_slots_horizontal = 5
		}
	}

	containerWindowType = {
		name = "gamesetup_precursor_entry"
		size = { width = 590 height = 0 }

		gridBoxType = {
			name = "options"
			position = { x = -3 y = 0 }
			format = "UPPER_LEFT"
			slotsize = { width = 150 height = 80 }
			add_horizontal = yes
			max_slots_horizontal = 4
		}
	}

	containerWindowType = {
		name = "gamesetup_precursor_option_entry"
		size = { width = 154 height = 100 }

		containerWindowType = {
			name = "button_container"
			size = { } # size set by code
			
			buttonType = {
				name = "button"
				quadTextureSprite = "GFX_precursor_button"
				orientation = "CENTER"
				centerPosition = yes
			}

			background = {
				name = "background"
				spriteType = "GFX_precursor_vultaum"
				position = { x = 5 y = 15 }
			}
		}

		instantTextBoxType = {
			name = "label"
			position = { x = 0 y = 65 }
			font = "cg_16b"
			fixedSize = yes
			maxWidth = 154
			maxHeight = 20
			format = center
		}
	}

	containerWindowType = {
		name = "gamesetup_category_entry"
		size = { width = 615 height = 100 }

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

		containerWindowType = {
			name = "header_container"
			size = { width = 100% height = 34 }

			background = {
				name = "background"
				spriteType = "GFX_tile_dark_cut"
			}

			instantTextBoxType = {
				name = "header"
				position = { x = 15 y = 4 }
				font = "malgun_goth_24"
				maxWidth = 400
				maxHeight = 28
			}

			instantTextBoxType = {
				name = "randomize_text"
				position = { x = 155 y = 8 }
				font = "cg_16b"
				maxWidth = 150
				maxHeight = 28
				format = center
				text = "FE_RANDOMIZE"
			}

			instantTextBoxType = {
				name = "additional_text"
				position = { x = 300 y = 8 }
				font = "cg_16b"
				maxWidth = 300
				maxHeight = 28
				format = right
				text = "PRECURSOR_SELECTION_MINIMUM"
			}
		}

		smoothListboxType = {
			name = "settings_list"
			position = { x = 10 y = 38 }
			size = { x = 615 y = 0 }
		}
	}

	containerWindowType = {
		name = "ai_empire_preview_entry"
		size = { width = 38 height = 49 }

		iconType = {
			name = "ai_random_empire_flag"
			spriteType = "GFX_random_ai_preview"
		}

		iconType = {
			name = "ai_empire_flag"
			spriteType = "GFX_empire_flag_64"
			position = { x = 3 y = 6 }
			scale = 0.66
		}

		iconType = {
			name = "ai_empire_minor_alert"
			spriteType = "GFX_leader_status_icon_no_assignment"
			position = { x = -9 y = 6 }
			orientation = "UPPER_RIGHT"
			alwaysTransparent = yes
		}

		iconType = {
			name = "ai_empire_major_alert"
			spriteType = "GFX_tile_production_error"
			position = { x = -14 y = 1 }
			orientation = "UPPER_RIGHT"
			scale = 0.6
			alwaysTransparent = yes
		}
	}
}
