guiTypes = {
	@doctrine_track_width = 424 # Includes margin of 30 px to each side, so actual content is 360px
	@doctrine_track_height = 764

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

		containerWindowType = {
			name = "doctrine_folder_view"
			size = { width = 100%% height = 100%% }
			position = { x = 0 y = 40 }
			verticalScrollbar = "right_vertical_slider"
			horizontalScrollbar = "bottom_horizontal_slider"
			margin = { top = 15 left = 15 bottom = 15 right = 15 }
			drag_scroll = { left middle }
			scroll_wheel_factor = 70
			smooth_scrolling = yes

			background = {
				name = "Background"
				quadTextureSprite ="GFX_tiled_bg"
			}

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

			background = {
				name = "Background"
				quadTextureSprite ="GFX_tiled_generic_overlay_bg1"
			}

			containerWindowType = {
				name = "no_grand_doctrine_info"
				size = { width = 100% height = 100% }

				background = {
					name = "opacity_layer"
					quadTextureSprite ="GFX_opacity_layer_dark"
					alwaystransparent = yes
				}

				instantTextBoxType = {
					name = "missing_grand_doctrine_header"
					position = { x = -200 y = 330 }
					font = "hoi_24header"
					text = NO_GRAND_DOCTRINE_ASSIGNED
					maxWidth = 400
					maxHeight = 100
					format = center
					orientation = center_up
				}

				instantTextBoxType = {
					name = "missing_grand_doctrine_text"
					position = { x = -200 y = 430 }
					font = "hoi_20bs"
					text = GRAND_DOCTRINE_BENEFIT_DESCRIPTION
					maxWidth = 400
					maxHeight = 100
					format = center
					orientation = center_up
				}
			}

			containerWindowType = {
				name = "grand_doctrine"
				size = { width = 200 height = 100 }
				position = { x=-100 y=40 }
				orientation = center_up

				containerWindowType = {
					name = "bonus_container"
					position = { x = -187 y = 42 }
					orientation = upper_right

					iconType = {
						name = "bonus_icon"
						position = { x = 0 y = 0 }
						spriteType = "GFX_tech_bonus"
						frame = 4
					}

                    instantTextBoxType = {
						name = "bonus_text"
						position = { x = -2 y = 0 }
						font = "hoi_16mbs"
						borderSize = {x = 4 y = 4}
						text = "-10%"
						maxWidth = 80
						maxHeight = 20
						format = center
					}
				}

				buttonType = {
					name = "grand_doctrine_button"
					position = { x = -220 y = -20 }
					quadTextureSprite = "GFX_grand_doctrine_frame"
					orientation = center_up
				}

				iconType = {
					name = "grand_doctrine_icon"
					position = { x = -30 y = -10 }
					quadTextureSprite = "GFX_mobile_warfare_medium"
					alwaystransparent = "yes"
					orientation = center_up
				}

				instantTextBoxType = {
					name = "grand_doctrine_name"
					orientation = center
					position = { x=-200 y= 8}
					font = "hoi_24header"
					maxWidth = 400
					maxHeight = 30
					format = center
					alwaystransparent = yes
				}
			}

			positionType = {
				name = "doctrine_list_start_offset"
				position = { x = -50 y = 0 } # When the doctrine selection list appears, it will animate in with this start offset
			}

			containerWindowType = {
				name = "tracks_container"
				position = { x = 50 y = 145 } # X-position will be set through code to center the tracks
				size = { width = 100 height = 100 } # Width and Height will be set through code to adapt to the number of tracks and spacing between tracks
				orientation = center_up

				gridBoxType = {
					name = "tracks_grid"
					slotsize = { width = @doctrine_track_width height = @doctrine_track_height }
					size = { width = 100%% height = 100%% }
					max_slots_vertical = 1
					format = "UPPER_LEFT"
				}
			}

			positionType = {
				name = "grand_doctrine_selection_list_pos"
				position = { x = -170 y = 240 }
			}

			positionType = {
				name = "low_resolution_doctrine_list_pos"
				position = { x = -170 y = 80 }
			}
		}

		buttonType = {
			name = "close_button"
			position = { x = -44 y = 50 }
			quadTextureSprite ="GFX_closebutton"
			shortcut = "ESCAPE"
			Orientation = UPPER_RIGHT
			clicksound = click_close
			pdx_tooltip = "CLOSE"
		}

		gridBoxType = {
			# Will be filled with *doctrine_folder_tab*
			name = "folders_grid"
			position = { x = 128 y = 0 }
			slotsize = { width = 256 height = 50 }
			max_slots_vertical = 1
			max_slots_horizontal = 5
		}
	}

	containerWindowType = {
		name = "doctrine_folder_tab"

		buttonType = {
			name = "folder_button"
			position = { x = 16 y = 0 }
			quadTextureSprite = "GFX_specialforcesdoctrine_tab_large"
			frame = 2
			no_clicksound = yes # Sound is played through code, scripted through the doctrine folder scripts
		}

		instantTextBoxType = {
			name = "folder_name"
			position = { x=60 y=18}
			font = "hoi_20bs"
			maxWidth = 160
			maxHeight = 20
			format = center
			alwaystransparent = "yes"
		}
	}

	containerWindowType = {
		name = "doctrine_list_item"
		size = { width=250 height=75 }
		margin = { top = 5 bottom = 5 left = 5 right = 5 }

		buttonType = {
			name = "select_button"
			spriteType = "GFX_tiled_decisions_bg_small"
			position = { x = 0 y = 0 }
			orientation = upper_left
			size = { x = 246 y = 71 }
		}

		buttonType = {
			name = "selected_frame"
			size = { x = 255 y = 80 }
			position = { x = -4 y = -5 }
			spriteType = "GFX_tiled_research_bg"
			orientation = upper_left
			alwaystransparent = yes
		}

		iconType = {
			name = "doctrine_icon"
			position = { x = 14 y = 4 }
			quadTextureSprite = "GFX_mobile_warfare_medium"
			alwaystransparent = "yes"
		}

		instantTextboxType = {
			name = "doctrine_name"
			position = { x = 90 y = 18 }
			font = "hoi_20bs"
			maxWidth = 140
			maxHeight = 50
			Orientation = "UPPER_LEFT"
			format = left
			alwaystransparent = "yes"
		}

		instantTextboxType = {
			name = "xp_cost_text"
			position = { x = -75 y = -24 }
			font = "hoi_16mbs"
			fixedsize = yes
			maxWidth = 60
			maxHeight = 18
			Orientation = "LOWER_RIGHT"
			format = right
		}

		containerWindowType = {
			name = "extra_advisor_window"
			position = { x = -38 y = 8 }
			orientation = upper_right

			iconType = {
				name = "extra_advisor_icon"
				spriteType = "GFX_idea_GER_erich_von_manstein"
				position = { x = 2 y = 2 }
				alwaystransparent = yes
				scale = 0.6
			}
		}

		containerWindowType = {
			name = "main_advisor_window"
			position = { x = -44 y = 5 }
			orientation = upper_right

			iconType = {
				name = "advisor_active_highlight"
				position = { x = -12 y = -4 }
				spriteType = "GFX_ongoing_generic_glow_yellow"
				scale = 0.45
				alwaystransparent = yes
			}

			iconType = {
				name = "main_advisor_icon"
				spriteType = "GFX_idea_GER_erich_von_manstein"
				position = { x = 2 y = 2 }
				scale = 0.6
			}
		}
	}

	containerWindowType = {
		name = "reward_item"
		size = { width = 72 height = 100 }
		position = { x=0 y=0}

		iconType = {
			name = "progress_line"
			spriteType = "GFX_techtree_line_down_currently_researching"
			orientation = center_up
			position = {x=-17 y=0}
		}

		iconType = {
			name = "progress_fill"
			spriteType = "GFX_mastery_progress_fill"
			orientation = center_up
			position = {x=-17 y=0}
			frame = 0
		}

		positionType = {
			name = mastery_text_right
			position = { x = 14 y = 68 }
		}

		positionType = {
			name = mastery_text_left
			position = { x = 14 y = 68 }
		}

		positionType = {
			name = reward_container_right
			position = { x = 65 y = 28 }
		}

		positionType = {
			name = reward_container_left
			position = { x = -95 y = 28 }
		}

		positionType = {
			name = reward_level_right
			position = { x = 125 y = 64 }
		}

		positionType = {
			name = reward_level_left
			position = { x = -98 y = 64 }
		}

		iconType = {
			name = "mastery_text_bg"
			position = { x = 7 y = 65 }
			quadTextureSprite = "GFX_mastery_amount_frame"
			frame = 1
		}

		containerWindowType = {
			name = reward_container
			position = { x = 56 y = 44 } # Dynamic - based on reward_container_left/right

			containerWindowType = {
				name = highlight_container
				fade_time = 3000
				fade_delay = 150 # Dynamic - this amount of delay is added between each subsequent reward
				fade_type = linear
				iconType = {
					name = "preview_highlight_icon"
					position = { x = -20 y = -15 }
					quadTextureSprite = "GFX_ongoing_generic_glow_yellow"
				}
			}

			iconType = {
				name = "reward_frame"
				position = { x = 0 y = 0 }
				quadTextureSprite = "GFX_mastery_reward_frame"
				frame = 1
			}

			iconType = {
				name = "reward_level_icon"
				position = { x = 0 y = -12 }
				quadTextureSprite = "GFX_mastery_reward_icons"
				frame = 1
				alwaystransparent = yes
			}
		}

		iconType = {
			name = "level"
			spriteType = "GFX_mastery_reward_level"
			frame = 1
			position = { x = 36 y = 71 } # Dynamic - based on reward_level_left/right
			alwaystransparent = yes
		}

		instantTextboxType = {
			name = "mastery_text" # Dynamic - based on mastery_text_left/right
			position = { x = -40 y = 48 }
			maxWidth = 40
			maxHeight = 50
			font = "hoi_16mbs"
			fixedsize = yes
			format = center
		}
	}

	containerWindowType = {
		name = "doctrine_track_item"
		size = { width=@doctrine_track_width height=@doctrine_track_height }

		containerWindowType = {
			name = "content"
			position = { x = 30 y = 80 }
			size = { width=-10 height=100%% }


			background = { # TEMP frame - not needed anymore after the tracks have actual frames
				spriteType = "GFX_tiled_decisions_bg_small"
				alwaystransparent = yes
			}

			containerWindowType = {
				name = "track_bg_container"
				size = { width = 100% height = 100% }
				margin = { top = 5 bottom = 5 left = 5 right = 5 }
				clipping = yes

				iconType = {
					position = { x = -15 y = 0 }
					name = "track_bg_image"
					spriteType = "GFX_grand_battleplan_bg" # This sprite can be scripted per track
					alwaystransparent = yes
				}
			}

			iconType = {
				name = "track_frame"
				quadTextureSprite ="GFX_track_frame"
				position = { x=-8 y=-8}
			}

			instantTextboxType = {
				name = "track_name"
				position = { x = -130 y = 24 }
				maxWidth = 260
				maxHeight = 60
				orientation = center_up
				font = "hoi_24header"
				fixedsize = yes
				format = center
			}


			containerWindowType = {
				name = "rewards_container"
				size = { width = -15 height = -12 }
				position = { x = 18 y = 180 }
				verticalScrollbar = "right_vertical_slider"
				scroll_wheel_factor = 70
				smooth_scrolling = yes
				drag_scroll = { left }

				background = {
					name = "scroll_dummy_background" # Without this, scrollbar won't appear
					spriteType ="GFX_tiled_window_transparent"
				}

				gridBoxType = {
					name = "rewards_grid"
					size = { width = 100%% height = 100%% }
					position = { x = -36 y = 0 }
					orientation = center_up
					slotsize = { width = 72 height = 88 }
					max_slots_horizontal = 1
					format = "UPPER_LEFT"
				}
			}


			containerWindowType = {
				name = "sub_doctrine"
				size = { width = 200 height = 100 }
				position = { x=-100 y=115 }
				orientation = center_up

				containerWindowType = {
					name = "bonus_container"
					position = { x = -195 y = -2 }
					orientation = upper_right

					iconType = {
						name = "bonus_icon"
						orientation = upper_right
						spriteType = "GFX_tech_bonus"
						frame = 4
					}
				}

				buttonType = {
					name = "sub_doctrine_button"
					position = { x = -118 y = -36 }
					quadTextureSprite = "GFX_subdoctrine_button_and_text_frame"
					orientation = center_up
				}

				iconType = {
					name = "sub_doctrine_icon"
					position = { x = -31 y = -33 }
					quadTextureSprite = "GFX_mobile_warfare_medium"
					alwaystransparent = "yes"
					orientation = center_up
				}

				instantTextBoxType = {
					name = "sub_doctrine_name"
					text = "Sub Doctrine"
					orientation = center
					position = { x=-80 y=-14}
					font = "hoi_16mbs"
					maxWidth = 160
					maxHeight = 30
					format = center
					alwaystransparent = "yes"
				}

				positionType = {
					name = "sub_doctrine_selection_list_right_anchor"
					position = { x = 375 y = 210 }
				}

				positionType = {
					name = "sub_doctrine_selection_list_left_anchor"
					position = { x = -500 y = 210 }
				}

				instantTextBoxType = {
					name = "bonus_text"
					position = { x = -196 y = -2 }
					orientation = upper_right

					font = "hoi_16mbs"
					borderSize = {x = 4 y = 4}
					text = "-10%"
					maxWidth = 80
					maxHeight = 20
					format = center
				}
			}

			iconType = {
				name = "lock_icon"
				spriteType = "GFX_locked"
				position = { x = -84 y = 97 }
				orientation = upper_right
			}

			containerWindowType = {
				name = "mastery_text_container"
				position = { x = 232 y = 96 }

				iconType = {
					name = "mastery_text_bg"
					position = { x = 0 y = 0 }
					spriteType = "GFX_mastery_amount_frame_big"
					frame = 0
				}


				instantTextboxType = {
					name = "mastery_text"
					position = { x = -5 y = 7 }
					maxWidth = 80
					maxHeight = 50
					font = "hoi_16mbs"
					fixedsize = yes
					format = center
					orientation = center_up
				}
			}
		}

		containerWindowType = {
			name = "milestone"
			position = { x = -32 y = 0 }
			orientation = center_up

			iconType = {
				name = "milestone_bg_icon"
				position = { x = -150 y = -1 }
				quadTextureSprite = "GFX_doctrine_decor_land" # This sprite can be scripted per track
			}

			containerWindowType = {
				name = "preview_container"
				fade_time = 400
				fade_type = linear

				iconType = {
					name = "milestone_preview_highlight"
					position = { x = -64 y = -38 }
					quadTextureSprite = "GFX_ongoing_generic_glow_yellow"
					alwaystransparent = yes
					scale = 1.5
				}
			}

			iconType = {
				name = "milestone_icon"
				position = { x = -15 y = 6 }
				quadTextureSprite = "GFX_doctrine_milestone_operations_land" # This sprite can be scripted per track
				frame = 2
			}
		}
	}
	containerWindowType = {
		name = "doctrine_selection_list"
		animation_time = 300
		animation_type = decelerated
		size = { width=560 height=576 }
		position = { x = -300 y = 100 }
		hide_position = { x = 80 y = 500 }
		orientation = center_up
		show_sound = open_sub_window
		click_to_front = yes
		moveable = yes

		background = {
			name = "background"
			spriteType = "GFX_tiled_window_w_close"
		}

		containerWindowType = {
			name = "description_view"
			position = { x = 30 y = 65 }
			size = { width=-30 height=98 }
			background = {
				name = "background"
				spriteType = "GFX_tiled_paper_bg"
				frame = 1
				alwaystransparent = yes
			}

			instantTextboxType = {
				name = "description_text"
				position = { x = 20 y = 18 }
				font = "hoi_18mbs"
				maxWidth = 460
				maxHeight = 80
				format = center
				alwaystransparent = yes
			}
		}

		instantTextboxType = {
			name = "title_text"
			position = { x = -250 y = 28 }
			font = "hoi_30header"
			maxWidth = 500
			maxHeight = 40
			format = center
			orientation = center_up
			alwaystransparent = yes
		}

		containerWindowType = {
			name = "list"
			position = { x = 15 y = 170 }
			size = { width=-15 height=-60 }

			containerWindowType = {
				name = "list_container"
				verticalScrollbar = "right_vertical_slider"
				scroll_wheel_factor = 70
				size = { width=-5 height=100%% }
				position = { x = 5 y = 0 }
				smooth_scrolling = yes
				margin = { top = 10 bottom = 10 left = 10 right = 10 }

				# Without this background, scrolling doesn't work properly..
				background = {
					name = "background"
					spriteType = "GFX_tiled_paper_small_bg"
				}

				gridBoxType = {
					# contains doctrine_list_item
					name = "doctrines_grid"
					position = { x = -128 y = 0 }
					size = { width = 500 height = 100%% }
					max_slots_horizontal = 2
					add_horizontal = yes
					slotsize = { width = 250 height = 75 }
				}
			}
		}

		buttonType = {
			name = "close_button"
			position = { x = -45 y = 13 }
			quadTextureSprite = "GFX_closebutton"
			buttonFont = "Main_14_black"
			shortcut = "ESCAPE"
			Orientation = "UPPER_RIGHT"
			clicksound = click_close
			pdx_tooltip = "CLOSE"
		}

		buttonType = {
			name = "unlock_button"
			position = { x=-61 y=-55 }
			quadTextureSprite ="GFX_button_123x34"
			buttonText = "EQUIPMENT_DESIGNER_SAVE"
			buttonFont = "hoi_18mbs"
			clicksound = "ui_tank_designer_save"
			orientation = center_down
		}

		buttonType = {
			name = "details_button"
			orientation = "lower_right"
			position = { x=-60 y=-57 }
			quadTextureSprite = "GFX_FOCUS_FILTER_ICON_BG"
		}

		iconType = {
			name = "details_enabled_icon"
			orientation = "lower_right"
			position = { x=-53 y=-49 }
			quadTextureSprite = "GFX_FOCUS_FILTER_HISTORICAL"
			alwaystransparent = yes
		}
	}
}
