guiTypes = {
	containerWindowType = {
		name = "assign_trait_view"
		moveable = yes
		clipping = no

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

		containerWindowType = {  # contains "paragon_portrait_container_vertical" from paragon_ui_types.gui
			position = { x = -206 y = 0 } # portrait positioned outside of view for easy hiding
			name = "leader_portrait_container"
		}

		containerWindowType = {
			name = "trait_options_container"
			position = { x = 16 y = 8 }

			gridBoxType = {
				name = "trait_selection_gridbox"
				slotSize = { width = 100% height = 115 }
				padding = { right = 24 bottom = 65 }
				format = UPPER_LEFT
				max_slots_horizontal = 1
				resizeparent = yes
			}
		}

		containerWindowType = {
			name = "subclass_options_container"
			position = { x = 12 y = 50 }

			gridBoxType = {
				name = "subclass_selection_gridbox" # gridbox of "subclass_selection_entry"
				slotSize = { width = 158 height = 100% }
				padding = { right = 24 bottom = 110 }
				format = UPPER_LEFT
				max_slots_vertical = 1
				resizeparent = yes
			}
		}

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

		iconType = {
			name = "leaders_header_line"
			quadTextureSprite = "GFX_line_horizontal"
			position = { x = 10 y = 34 }
			alwaystransparent = yes
		}

		containerWindowType = {
			name = "header_container"
			clipping = yes
			size = { width = 200 height = 30 }
			position = { x = 24 y = 10 }

			instantTextBoxType = {
				name = "header"
				font = "malgun_goth_24"
				text = "TRAIT_SELECTION"
				maxWidth = 400
				maxHeight = 2
				fixedSize = yes
				format = left
				multiline = no
				truncate = yes
			}
		}


		containerWindowType = {
			name = "bottom_container"
			position = { x = 0 y = 0 } # portrait positioned outside of view for easy hiding

			buttonType = {
				name = "confirm_button"
				position = { x = 0 y = 11 } # x.pos set in code
				size = { x = 0 y = 0 } # Dynamically changed in code
				quadTextureSprite = "GFX_tiling_button_standard"
				font = "cg_16b"
				buttonText = "ASSIGN_TRAIT_CONFIRM" # Will change dynamically with regards to how many picks are left
				clicksound = "confirm_click"
				shortcut = "RETURN"
			}
		}

		buttonType = {
			name = "close_button"
			quadTextureSprite = "GFX_close"
			position = { x = 0 y = -2 } # Position set in code
			shortcut = "ESCAPE"
			clicksound = "back_click"
			actionShortcut = "cancel"
			pdx_tooltip = "CLOSE_TITLE"
		}
	}

	@right_icon_position_x = 290
	@right_icon_position_y = 55

	containerWindowType = { # entry of "trait_selection_gridbox"
		name = "trait_selection_entry"
		position = { x = 0 y = 45 }
		size = { width = 330 height = 115 }

		iconType = {
			name = "trait_rarity"
			spriteType = "GFX_discovery_level_icon"
			position = { x = 2 y = 2 }
			alwaystransparent = yes
		}

		buttonType = {
			name = "assign_trait_button"
			spriteType = "GFX_tiling_button_standard"
			position = { x = 0 y = 0 }
			size = { x = 322 y = 110 }
			oversound = "no_sound"
			clicksound = "select_click"
		}

		containerWindowType = {
			name = "trait_layered_icon_locator"
			position = { x = 20 y = 40 }
		}

		containerWindowType = {
			name = "new_trait_container"
			position = { x = 0 y = 0 }
			size = { width = 322 height = 111 }

			iconType = {
				name = "trait_new_icon"
				position = { x = @right_icon_position_x y = @right_icon_position_y }
				spriteType = "GFX_trait_assignment_new"
				centerPosition = yes
				alwaystransparent = yes
			}
		}

		containerWindowType = {
			name = "upgrade_trait_container"
			position = { x = 0 y = 0 }
			size = { width = 322 height = 111 }

			iconType = {
				name = "trait_upgrade_icon"
				position = { x = @right_icon_position_x y = @right_icon_position_y }
				spriteType = "GFX_trait_assignment_upgrade"
				centerPosition = yes
				alwaystransparent = yes
			}
		}

		containerWindowType = {
			name = "selected_overlay"
			position = { x = 0 y = 0 }
			size = { width = 322 height = 111 }

			background = {
				name = "selected_bg"
				spriteType = "GFX_tiling_selection"
				alwaysTransparent = yes
			}
		}

		instantTextBoxType = {
			name = "trait_name"
			font = "malgun_goth_24"
			text = "TRAIT_NAME"
			position = { x = 70 y = 25 }
			maxWidth = 200
			maxHeight = 20
			fixedSize = yes
			format = left
			text_color_code = "H"
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "trait_desc"
			font = "cg_16b"
			text = "TRAIT_DESC"
			position = { x = 70 y = 50 }
			maxWidth = 190
			maxHeight = 60
			fixedSize = yes
			format = left
			alwaysTransparent = yes
		}

	}

	### SUBCLASS ENTRY (inside subclass_selection_gridbox) ###

	containerWindowType = {
		name = "subclass_selection_entry"
		position = { x = 0 y = 0 }
		size = { width = 158 height = 256 }
		clipping = yes

		iconType = {
			name = "subclass_background"
			position = { x = 4 y = 4 }
			quadTextureSprite = "GFX_leader_bg_admiral"
			alwaystransparent = yes
		}

		containerWindowType = {
			name = "trait_layered_icon_locator"
			position = { x = 63 y = 80 }
		}

		buttonType = {
			name = "assign_trait_button"
			position = { x = 3 y = 3 }
			size = { x = 152 y = 250 }
			spriteType = "GFX_tiling_button_standard_seethrough"
			oversound = "no_sound"
			clicksound = "select_click"
		}

		containerWindowType = {
			name = "selected_overlay"
			position = { x = 3 y = 3 }
			size = { width = 152 height = 250 }

			background = {
				name = "selected_bg"
				spriteType = "GFX_tiling_selection_dimmed_down"
				alwaysTransparent = yes
			}
		}

		instantTextBoxType = {
			name = "trait_name"
			font = "malgun_goth_24"
			text = "TRAIT_NAME"
			position = { x = 11 y = 180 }
			maxWidth = 140
			maxHeight = 40
			format = center
			vertical_alignment = center
			alwaysTransparent = yes
		}
	}
}
