guiTypes = {
	@main_menu_margin = 50

	positionType = {
		name = "frontend_buttons_no_acb_offset"
		position = { x = 0 y = -50 }
		if_scaled_resolution = {
			min_height = 900
			position = { x = 0 y = -75 }
		}
	}

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

		buttonType = {
			name = "animated_background"	#optional, you can comment this out and use a normal background if you want to
			quadTextureSprite = "GFX_frontend_animated_bg"
			position = { x = 0 y = 0 }
			size = { x = 1280 y = 720 }
		}
	}
	containerWindowType = {
		name = "frontend_background_view"
		position = { x = 0 y = 0 }
		size = { width = 100% height = 100%}
		margin = {
			top = @main_menu_margin
			right = @main_menu_margin
			bottom = @main_menu_margin
			left = @main_menu_margin
		}

		containerWindowType = {
			name = "buttons"
			position = { x = 0 y = 0 }
			orientation = lower_left
			origo = lower_left

			@links_y = -40


			buttonType = {
				name = "privacy"
				quadTextureSprite = "GFX_front_menu_privacy"
				position = { x = 350 y = @links_y }
				pdx_tooltip = "PRIVACY_POLICY"
			}

			buttonType = {
				name = "pi_achievements"
				quadTextureSprite = "GFX_front_menu_achievements"
				position = { x = 430 y = @links_y }
				pdx_tooltip = "ACHIEVEMENTS"
			}

			buttonType = {
				name = "homepage"
				quadTextureSprite = "GFX_front_menu_homepage"
				position = { x = 310 y = @links_y }
				pdx_tooltip = "HOMEPAGE"
				web_link="https://www.paradoxinteractive.com/games/stellaris"
			}

			buttonType = {
				name = "forum"
				quadTextureSprite = "GFX_front_menu_forum"
				position = { x = 390 y = @links_y }
				pdx_tooltip = "FORUM"
				web_link="https://forum.paradoxplaza.com/forum/index.php?forums/stellaris.900/"
			}

			buttonType = {
				name = "facebook"
				quadTextureSprite = "GFX_front_menu_facebook"
				position = { x = 470 y = @links_y }
				pdx_tooltip = "FACEBOOK"
				web_link="https://www.facebook.com/StellarisGame"
			}

			buttonType = {
				name = "twitter"
				quadTextureSprite = "GFX_front_menu_twitter"
				position = { x = 510 y = @links_y }
				pdx_tooltip = "TWITTER"
				web_link="http://twitter.com/StellarisGame"
			}

			buttonType = {
				name = "you_tube"
				quadTextureSprite = "GFX_main_menu_youtube"
				position = { x = 550 y = @links_y }
				pdx_tooltip = "YOUTUBE"
				web_link="https://www.youtube.com/stellarisofficial"
			}

			buttonType = {
				name = "discord"
				quadTextureSprite = "GFX_main_menu_discord"
				position = { x = 590 y = @links_y }
				pdx_tooltip = "DISCORD"
				web_link="https://discord.gg/stellarisofficial"
			}
		}
	}

	containerWindowType = {
		name = "frontendgui"
		position = { x = 0 y = 0 }
		size = { width = 100% height = 100%}
		margin = {
			top = @main_menu_margin
			right = @main_menu_margin
			bottom = @main_menu_margin
			left = @main_menu_margin
		}

		containerWindowType = {
			name = "main_menu_gradient"
			position = { x = -50 y = -200 }
			size = { width = 600 height = 4000 }

			background = {
				name = "main_menu_gradient_bg"
				quadTextureSprite = "GFX_faded_gradient_tile"
				alwaysTransparent = yes
			}
		}

		iconType = {
			name = "game_logo"
			position = { x = -53 y = -33 } # Makes the logo appear to have the same top and left margin as other elements
			quadTextureSprite = "gfx_game_logo"
			Orientation = "UPPER_LEFT"
		}

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

			instantTextBoxType = {
				name = "version"
				font = "cg_16b"
				text = "1337"
				position = { x = 310 y = 0 }
				maxWidth = 400
				maxHeight = 20
				fixedSize = yes
				format = left
				orientation = lower_left
			}

			buttonType = {
				name = "version_button"
				spriteType = "GFX_invisible"
				size = { x = 450 y = 20 }
				position = { x = 310 y = 0 }
				orientation = lower_left
				no_clicksound = yes
			}

			containerWindowType = {
				name = "buttons"
				position = { x = 0 y = 0 }
				# The height here is the Y position of the last button on small resolutions + the height of the last button.
				size = { width = @button_large_width height = 400 }
				origo = CENTER_LEFT
				orientation = CENTER_LEFT

				if_scaled_resolution = {
					min_height = 900

					# The height here is the Y position of the last button on large resolutions + the height of the last button.
					size = { width = @button_large_width height = 575 }
				}

				@button_large_width = 340
				@button_large_height = 49 # Reduced by 1 pixel to avoid overlap

				containerWindowType = {
					name = "start_game_container"
					position = { x = 0 y = 0 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 0 }
					}

					buttonType = {
						id = "start"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						defaultSelection = yes
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_START"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "load_game_container"
					position = { x = 0 y = 50 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 75 }
					}

					buttonType = {
						id = "load"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_LOAD"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "multiplayer_container"
					position = { x = 0 y = 100 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 150 }
					}

					buttonType = {
						id = "multiplayer"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_MULTIPLAYER"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "coop_container"
					position = { x = 0 y = 150 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 225 }
					}

					buttonType = {
						id = "coop"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
						pdx_tooltip = NAME_Beta
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_COOP"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "additional_content_container"
					position = { x = 0 y = 200 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 300 }
					}

					buttonType = {
						id = "additional_content"
						name = "button"
						quadTextureSprite = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_ADDITIONAL_CONTENT"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "settings_container"
					position = { x = 0 y = 250 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 375 }
					}

					buttonType = {
						id = "settings"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_SETTINGS"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "credits_container"
					position = { x = 0 y = 300 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 450 }
					}

					buttonType = {
						id = "credits"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_CREDITS"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}

				containerWindowType = {
					name = "quit_container"
					position = { x = 0 y = 350 }
					size = { width = @button_large_width height = @button_large_height }

					if_scaled_resolution = {
						min_height = 900

						position = { x = 0 y = 525 }
					}

					buttonType = {
						id = "quit"
						name = "button"
						spriteType = "GFX_main_menu_button"
						position = { x = 0 y = 0 }
						size = { x = @button_large_width y = @button_large_height }
						oversound = mouse_over
						clicksound = confirm_click
					}

					instantTextBoxType = {
						name = "text"
						font = "jura"
						text = "FRONT_QUIT"
						position = { x = 0 y = -5 }
						maxWidth = @button_large_width
						maxHeight = @button_large_height
						fixedSize = yes
						format = left
						vertical_alignment = center
						alwaysTransparent = yes
					}
				}
			}

			iconType = {
				name = "engine_logo"
				position = { x = 0 y = -85 }
				quadTextureSprite = "GFX_clausewitz_flat_logo"
				orientation = lower_left
			}

			iconType = {
				name = "pi_logo"
				position = { x = 190 y = -85 }
				quadTextureSprite = "GFX_pi_logo"
				orientation = lower_left
			}

			iconType = {
				name = "pds_logo"
				position = { x = 95  y = -85 }
				quadTextureSprite = "GFX_pds_logo"
				orientation = lower_left
			}
		}

		### Additional content browser "What's new"
		containerWindowType = {
			name = "additional_content_whats_new"
			position = { x = 0 y = 0 }
			size = { width = 250 height = 340 }
			orientation = lower_right
			origo = lower_right

			instantTextBoxType = {
				name = "title"
				maxWidth = 250
				format = right
				font = "large_title_font"
				text = "ADDITIONAL_CONTENT_WHATS_NEW_TITLE"
			}

			gridBoxType = {
				name = "items"
				position = { x = 0 y = 45 }
				size = { width = 100% }
				slotSize = { width = 250 height = 155 }
				max_slots_horizontal = 1
				format = "UPPER_LEFT"
			}
		}

		### DEBUG
		buttonType = {
			name = "portrait_room"
			spriteType = "GFX_portrait_room"
			Orientation = "CENTER"
			position = { x = -476 y = -10 }
		}

		buttonType = {
			name = "portrait_empty_room"
			spriteType = "GFX_portrait_gamesetup_mask_empty_room"
			Orientation = "CENTER"
			position = { x = -950 y = -700 }
		}

		buttonType = {
			name = "character_without_room"
			spriteType = "GFX_portrait_gamesetup_mask_character_without_room"
			Orientation = "CENTER"
			position = { x = 50 y = -700 }
		}

		buttonType = {
			name = "portrait_planet"
			spriteType = "GFX_portrait_planet_character"
			Orientation = "CENTER"
			position = { x = -100 y = -320 }
		}

		buttonType = {
			name = "portrait_character"
			spriteType = "GFX_portrait_character"
			Orientation = "CENTER"
			position = { x = -500 y = -350 }
		}

		buttonType = {
			name = "portrait_character_large"
			spriteType = "GFX_portrait_character_large"
			Orientation = "CENTER"
			position = { x = -500 y = -350 }
		}

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

			background = {
				name = "hitbox"
				spriteType = "GFX_ship_designer_blocker"
			}
		}
	}

	containerWindowType = {
		name = "save_item"
		size = { width = 64 height = 48 }

		buttonType = {
			name = "button"
			quadTextureSprite = "GFX_button"
			Orientation = "UPPER_LEFT"
			buttonFont = "cg_16b"
		}
	}
}
