# COPY-PASTED FOR NOW
@panel_width_minus_10 = 530			# used to be 450
@panel_width = 540  				# used to be 460
@panel_width_half = 270				# used to be 230
@panel_width_plus_10 = 550  		# used to be 470
@panel_width_plus_14 = 554			# used to be 474
@panel_width_plus_14_half = 277		# used to be 237
@panel_width_plus_20 = 560			# used to be 480
@panel_width_plus_30 = 570			# used to be 490
@panel_width_plus_70 = 610			# used to be 530

types map_list_panel_types {
	type map_list_panel_item = button {
		using = clean_button
		size = { @panel_width 40 }
		tooltip = "[MapListOption.GetTooltip]"
		using = tooltip_es
		block "interaction" {
			enabled = "[MapListOption.CanClick]"
			onclick = "[MapListOption.OnClick]"
			onrightclick = "[MapListOption.OnRightClick]"
			onmousehierarchyenter = "[MapListOption.OnMouseEnter]"
			onmousehierarchyleave = "[MapListOption.OnMouseLeave]"
		}

		icon = {
			using = highlighted_square_selection
			visible = "[MapListOption.IsMapTargetHighlighted]"
		}

		block "button_color" {

		}

		block "itemvisibility" {

		}

		state = {
			name = _mouse_enter
			on_start = "[PdxGuiWidget.FindChild('map_list_status').TriggerAnimation('map_list_status_mouse_enter')]"
			on_start = "[PdxGuiWidget.FindChild('map_list_status_bg').TriggerAnimation('map_list_status_mouse_enter')]"
		}
		state = {
			name = _mouse_leave
			on_start = "[PdxGuiWidget.FindChild('map_list_status').TriggerAnimation('map_list_status_mouse_leave')]"
			on_start = "[PdxGuiWidget.FindChild('map_list_status_bg').TriggerAnimation('map_list_status_mouse_leave')]"
		}
		state = {
			name = _mouse_press
			on_start = "[PdxGuiWidget.FindChild('map_list_status').TriggerAnimation('map_list_status_mouse_press')]"
			on_start = "[PdxGuiWidget.FindChild('map_list_status_bg').TriggerAnimation('map_list_status_mouse_press')]"
		}
		state = {
			name = _mouse_release
			on_start = "[PdxGuiWidget.FindChild('map_list_status').TriggerAnimation('map_list_status_mouse_release')]"
			on_start = "[PdxGuiWidget.FindChild('map_list_status_bg').TriggerAnimation('map_list_status_mouse_release')]"
		}

		icon = {
			name = "map_list_status_bg"
			texture = "gfx/interface/map_list/map_list_status_bg.dds"
			framesize = { 600 80 }
			size = { 300 40 }
			position = { -5 0 }
			alpha = 0.4
			frame = "[MapListOption.GetBackgroundStatusFrame]"

			alwaystransparent = yes

			state = {
				name = map_list_status_mouse_enter
				alpha = 0.8
				duration = 0.08
			}
			state = {
				name = map_list_status_mouse_press
				alpha = 0.8
				duration = 0.08
			}
			state = {
				name = map_list_status_mouse_release
				alpha = 0.8
				duration = 0.08
			}
			state = {
				name = map_list_status_mouse_leave
				alpha = 0.4
				duration = 0.12
			}
		}

		flowcontainer = {
			parentanchor = vcenter

			widget = {
				size = { 55 40 }
				visible = "[MapListOption.ShouldShowStatusIcon]"
				icon = {
					name = "map_list_status"
					texture = "gfx/interface/map_list/map_list_status_icons.dds"
					framesize = { 130 72 }
					size = { 65 36 }
					scale = 0.8
					alpha = 0.5
					parentanchor = center
					frame = "[MapListOption.GetIconStatusFrame]"

					alwaystransparent = yes

					state = {
						name = map_list_status_mouse_enter
						scale = 1
						alpha = 1
						duration = 0.08
					}
					state = {
						name = map_list_status_mouse_press
						scale = 1
						alpha = 1
						duration = 0.08
					}
					state = {
						name = map_list_status_mouse_release
						scale = 1
						alpha = 1
						duration = 0.08
					}
					state = {
						name = map_list_status_mouse_leave
						scale = 0.8
						alpha = 0.8
						duration = 0.12
					}
				}
			}

			block "values" {
				textbox = {
					margin = { 5 0 }
					size = { 475 25 }
					align = left|nobaseline
					text = "[MapListOption.GetTitle]"
					parentanchor = vcenter
					elide = right
				}
			}
		}
	}

	### MAP LIST WINDOW
	type map_list_panel = widget {
		using = sidepanel_plus_sidebar_size
		layoutpolicy_vertical = expanding
		alwaystransparent = no
		using = clickthrough_blocker

		state = {
			name = _show
			start_sound = {
				soundeffect = "event:/SFX/UI/SideBar/country"
			}
		}
		state = {
			name = _hide

		}

		using = sidepanel_filler_bg

		vbox = {
			using = sidebar_margin
			layoutpolicy_vertical = expanding
			layoutpolicy_horizontal = expanding

			background = {
				using = default_background
				margin = { 3 0 }
				margin_top = -9
				margin_bottom = 30
				margin_left = -50
			}

			widget = { size = { 10 20 }}

			widget = {
				name = "header"
				size = { 0 50 }
				layoutpolicy_horizontal = expanding

				background = {
					using = default_header_bg
					margin = { 0 2 }
				}

				textbox = {
					size = { @panel_width 50 }
					margin = { 40 0 }
					using = header_font
					using = fontsize_xl
					fontsize_min = 17
					elide = right
					text = "MAP_LIST_PANEL_TITLE"
					parentanchor = center
					align = center|nobaseline
					default_format = "#header"
				}

				back_button_large = {
					position = { 2 0 }
					parentanchor = left|vcenter
					block "header_back_button" {
						onclick = "[MapListPanelManager.CloseCurrentPanel]"
						onclick = "[MapListPanelManager.ResetActiveMapInteraction]"
						shortcut = "back"
					}
				}

				close_button_large = {
					position = { -2 0 }
					parentanchor = right|vcenter
					block "header_close_button" {
						onclick = "[MapListPanelManager.CloseCurrentPanel]"
						onclick = "[MapListPanelManager.ResetActiveMapInteraction]"
					}
					shortcut = "close_window"
				}
			}

			flowcontainer = {
				margin = { 30 12 }
				visible = "[Not(StringIsEmpty(MapListPanel.GetTitle))]"

				flowcontainer = {
					direction = vertical

					textbox = {
						text = "[MapListPanel.GetTitle]"
						parentanchor = hcenter
						maximumsize = { 490 -1 }
						align = center|nobaseline
						using = fontsize_xxl
						multiline = yes
						autoresize = yes
					}

					textbox = {
						parentanchor = hcenter
						maximumsize = { 490 -1 }

						text = "MAP_INTERACTION_ESC_TO_CANCEL"
						align = hcenter|nobaseline
						using = fontsize_medium
						multiline = yes
						autoresize = yes
					}
				}
			}

			### sort buttons
			flowcontainer = {
				direction = horizontal
				margin = { 0 5 }

				block "headers" {
					sort_button = {
						align = center|nobaseline
						tooltip = "DEFAULT_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
						size = { 45 20 }
						onclick = "[MapListPanel.Sort('status')]"
						button = {
							texture = "gfx/interface/buttons/sort_button_icons/sort_icon_status.dds"
							size = { 25 25 }
							parentanchor = center
							alwaystransparent = yes
						}
					}

					sort_button = {
						align = center|nobaseline
						text = "DEFAULT_MAP_LIST_PANEL_TITLE_HEADER"
						tooltip = "DEFAULT_MAP_LIST_PANEL_TITLE_HEADER_TOOLTIP"
						size = { 495 20 }
						onclick = "[MapListPanel.Sort('title')]"
					}
				}
			}

			### list with content
			scrollarea = {
				layoutpolicy_vertical = expanding
				layoutpolicy_horizontal = expanding
				scrollbarpolicy_horizontal = always_off

				scrollbar_vertical = {
					using = vertical_scrollbar
				}

				scrollwidget = {
					flowcontainer = {
						using = default_list_position
						direction = vertical

						block "scrollarea_content" {
							flowcontainer = {
								onmousehierarchyenter = "[SetCanOpenRightClickContextMenu( Not(MapListPanelManager.HasCurrentInteraction) )]"
								onmousehierarchyleave = "[SetCanOpenRightClickContextMenu( '(bool)yes' )]"
								parentanchor = hcenter
								direction = vertical
								datamodel = "[MapListPanel.AccessValidOptions]"
								item = {
									map_list_panel_item = {}
								}

								block "empty_state" {
									empty_state = {
										blockoverride "visible" {
											visible = "[IsDataModelEmpty(MapListPanel.AccessValidOptions)]"
										}
										blockoverride "text" {
											text = "MAP_LIST_NO_AVAILABLE_OPTIONS"
										}
									}
								}
							}

							section_header_button = {
								visible = "[GreaterThan_int32(GetDataModelSize(MapListPanel.AccessFailedOptions), '(int32)0')]"
								blockoverride "left_text" {
									text = "FAILED_OPTIONS"
								}

								blockoverride "onclick" {
									onclick = "[MapListPanelManager.ToggleFailedOptions]"
								}

								blockoverride "onclick_showmore" {
									visible = "[Not(MapListPanelManager.IsShowingFailedOptions)]"
								}

								blockoverride "onclick_showless" {
									visible = "[MapListPanelManager.IsShowingFailedOptions]"
								}
							}

							flowcontainer = {
								direction = vertical
								parentanchor = hcenter
								visible = "[Not(IsDataModelEmpty(MapListPanel.AccessFailedOptions))]"

								fixedgridbox = {
									visible = "[MapListPanelManager.IsShowingFailedOptions]"
									datamodel = "[MapListPanel.AccessFailedOptions]"
									addcolumn = 540
									addrow = 40
									item = {
										map_list_panel_item = {}
									}
								}
							}

							section_header_button = {
								visible = "[GreaterThan_int32(GetDataModelSize(MapListPanel.AccessInvalidOptions), '(int32)0')]"
								blockoverride "left_text" {
									text = "INVALID_OPTIONS"
								}

								blockoverride "onclick" {
									onclick = "[MapListPanelManager.ToggleInvalidOptions]"
								}

								blockoverride "onclick_showmore" {
									visible = "[Not(MapListPanelManager.IsShowingInvalidOptions)]"
								}

								blockoverride "onclick_showless" {
									visible = "[MapListPanelManager.IsShowingInvalidOptions]"
								}
							}

							flowcontainer = {
								direction = vertical
								parentanchor = hcenter
								visible = "[Not(IsDataModelEmpty(MapListPanel.AccessInvalidOptions))]"

								fixedgridbox = {
									visible = "[MapListPanelManager.IsShowingInvalidOptions]"
									datamodel = "[MapListPanel.AccessInvalidOptions]"
									addcolumn = 540
									addrow = 40
									item = {
										map_list_panel_item = {}
									}
								}
							}
						}
					}
				}
			}
		}
	}

	type country_map_list_one_value = map_list_panel {
		# name = "countries_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				size = { 40 30 }
				onclick = "[MapListPanel.Sort('rank')]"

				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_rank.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}

				tooltip = "SORT_BY_RANK"
			}
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 310 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 190 20 }
				block "shown_on_map_header" {
					text = "[concept_prestige]"
					tooltip = "PRESTIGE"
					onclick = "[MapListPanel.Sort('prestige')]"
				}
			}
		}

		blockoverride "values" {
			textbox = {
				text = "##[Country.GetCountryScorePosition]"
				size = { 40 23 }
				margin_right = 8
				align = right|nobaseline
				parentanchor = left|vcenter
				alwaystransparent = no
				tooltip = "[Country.GetRankTooltip]"
			}
			textbox = {
				margin = { 5 0 }
				size = { 310 25 }
				align = left|nobaseline
				text = "[MapListOption.GetCountryData.GetCountry.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetCountryData.GetCountry]"
				margin = { 5 0 }
				size = { 180 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				block "shown_on_map_value" {
					text = "[Country.GetPrestige|1v]"
					tooltip = "[Country.GetRankTooltip]"
				}
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.GetCountryData.GetCountry]"
			onclick = "[InformationPanelBar.OpenCountryPanel(Country.Self)]"
			onrightclick = "[RightClickMenuManager.ShowForCountry(Country.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightCountry(Country.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	### COUNTRIES
	type countries_map_list_panel_full = map_list_panel {

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "button_color" {
			color = "[Country.GetDiplomaticStatusColor( GetPlayer.Self )]"
		}

		blockoverride "headers" {
			sort_button = {
				size = { 50 40 }
				onclick = "[MapListPanel.Sort('rank')]"

				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_rank.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}

				tooltip = "SORT_BY_RANK"
			}
			sort_button = {
				align = left|nobaseline
				text = "[concept_country]"
				size = { 140 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 80 20 }
				text = "[concept_prestige]"
				onclick = "[MapListPanel.Sort('prestige')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 100 20 }
				text = "GDP_SHORT"
				onclick = "[MapListPanel.Sort('gdp')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 70 20 }
				text = "SOL_SHORT"
				onclick = "[MapListPanel.Sort('sol')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 100 20 }
				text = "POPULATION_TOOLTIP"
				onclick = "[MapListPanel.Sort('population')]"
			}
		}

		blockoverride "values" {
			datacontext = "[MapListOption.GetCountryData.GetCountry]"
			widget = {
				size = { 50 40 }
				parentanchor = left|vcenter
				alwaystransparent = no
				tooltip = "[Country.GetRankTooltip]"

				rank_badge = {
					size = { 50 50 }
					parentanchor = right|vcenter
					position = { -2 0 }
					
					blockoverride "datacontext " {
						datacontext = "[MapListOption.GetCountryData.GetCountry]" 
					}

					blockoverride "rank_text" {
						text = "#BOLD [Country.GetCountryScorePositionDesc]"
					}
					blockoverride "rank_text_2" {
						text = "#BOLD [Country.GetCountryScorePositionDesc]"
						visible = no
					}
				}
			}
			textbox = {
				margin = { 5 0 }
				size = { 140 25 }
				align = left|nobaseline
				text = "[Country.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				margin = { 5 0 }
				size = { 80 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "[Country.GetPrestige|1v]"
				tooltip = "[Country.GetRankTooltip]"
				alpha = "[TransparentIfZero_int32(Country.GetPrestige)]"
			}
			textbox = {
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				using = GDP_tooltip_with_graph
				text = "#variable [Country.GetGDP|1*]#!"
			}
			textbox = {
				margin = { 5 0 }
				size = { 70 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				using = average_standard_of_living_tooltip_with_graph
				text = "[Country.GetAverageSoLByPopulation|v1]"
			}
			textbox = {
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				using = population_tooltip_with_graph
				text = "#variable [Country.GetTotalPopulation|D]#!"
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.GetCountryData.GetCountry]"
			onclick = "[InformationPanelBar.OpenCountryPanel(Country.Self)]"
			onrightclick = "[RightClickMenuManager.ShowForCountry(Country.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightCountry(Country.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	type state_map_list_one_value = map_list_panel {
		# name = "states_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 360 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 190 20 }
				block "shown_on_map_header" {
					text = "A Value type"
					tooltip = "A tooltip"
					#onclick = "[MapListPanel.Sort('something')]"
				}
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 360 25 }
				align = left|nobaseline
				text = "[MapListOption.GetStateData.GetState.GetOwner.GetFlagTextIcon]  [MapListOption.GetStateData.GetState.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 180 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				block "shown_on_map_value" {
					text = "#todo A Value#!"
					tooltip = "#todo A tooltip#!"
				}
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.AccessStateData.AccessState]"
			onclick = "[InformationPanelBar.OpenStatePanel(State.AccessSelf)]"
			onrightclick = "[RightClickMenuManager.ShowForState(State.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightState(State.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	type empty_map_list_panel = map_list_panel {
		name = "empty_map_list_panel"

		blockoverride "title" {
			text = "No active interaction."
		}

		blockoverride "headers" {
		}

		blockoverride "scrollarea_content" {
		}
	}

	type default_map_list_panel = map_list_panel {
		name = "default_map_list_panel"
	}

	### BUILD BUILDINGS
	type build_building_map_list_panel = map_list_panel {
		name = "build_building_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				tooltip = "BUILDING_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 55 20 }
				onclick = "[MapListPanel.Sort('status')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_status.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = center|nobaseline
				text = "BUILDING_MAP_LIST_PANEL_STATE_HEADER"
				tooltip = "BUILDING_MAP_LIST_PANEL_STATE_HEADER_TOOLTIP"
				size = { 130 20 }
				onclick = "[MapListPanel.Sort('state')]"
			}

			sort_button = {
				align = center|nobaseline
				tooltip = "BUILDING_LEVEL_HEADER_TOOLTIP"
				size = { 80 20 }
				onclick = "[MapListPanel.Sort('size')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_size.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = center|nobaseline
				text = "BUILDING_MAP_LIST_PANEL_PEASANTS_HEADER"
				tooltip = "BUILDING_MAP_LIST_PANEL_PEASANTS_HEADER_TOOLTIP"
				size = { 85 20 }
				onclick = "[MapListPanel.Sort('peasants')]"
			}

			sort_button = {
				align = center|nobaseline
				tooltip = "BUILDING_PROFITABILITY_HEADER_TOOLTIP"
				size = { 90 20 }
				onclick = "[MapListPanel.Sort('profitability')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_profitability.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = center|nobaseline
				text = "BUILDING_MAP_LIST_PANEL_PROFIT_IMPACT_HEADER"
				tooltip = "BUILDING_MAP_LIST_PANEL_PROFIT_IMPACT_TOOLTIP"
				size = { 100 20 }
				onclick = "[MapListPanel.Sort('profit_impact')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 130 25 }
				align = left|nobaseline
				text = "[MapListOption.GetBuildingData.GetState.GetNameNoFormatting]"
				parentanchor = vcenter
				elide = right
				fontsize_min = 12
			}

			textbox = {
				datacontext = "[MapListOption.GetBuildingData.GetBuilding]"
				margin = { 5 0 }
				size = { 80 25 }
				align = right|nobaseline
				text = "[MapListOption.GetBuildingData.GetBuilding.GetExpansionLevelDesc]"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
				alpha = "[TransparentIfFalse(GreaterThan_int32(MapListOption.GetBuildingData.GetBuilding.GetExpansionLevel, '(int32)0'))]"
			}


			textbox = {
				margin = { 5 0 }
				size = { 85 25 }
				align = right|nobaseline
				text = "[MapListOption.GetBuildingData.GetState.GetNumSubsistenceWorkingAdults|Dv]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				margin = { 5 0 }
				margin_right = 10
				size = { 90 25 }
				align = right|nobaseline
				datacontext = "[MapListOption.GetBuildingData.GetBuilding]"
				text = "#v @money![Building.GetBuildingType.GetExpansionProductivityImpact(Building.Self, Building.GetState)|+]#!"
				tooltip = "[Building.GetBuildingType.GetExpansionProductivityImpactDesc(Building.Self, Building.GetState)]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				margin = { 5 0 }
				margin_right = 10
				size = { 100 25 }
				align = right|nobaseline
				datacontext = "[MapListOption.GetBuildingData.GetBuilding]"
				text = "#v [Building.GetBuildingType.GetExpansionRevenueImpact(Building.Self, Building.GetState)|K+=]#!"
				tooltip = "[Building.GetBuildingType.GetExpansionRevenueImpactDesc(Building.Self, Building.GetState)]"
				parentanchor = vcenter
				elide = right
			}

		}
	}

	### COLONIES
	type colony_map_list_panel = map_list_panel {
		name = "colony_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				text = "COLONY_MAP_LIST_PANEL_STATUS_HEADER"
				tooltip = "COLONY_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 65 20 }
				onclick = "[MapListPanel.Sort('status')]"
			}

			sort_button = {
				align = left|nobaseline
				margin = { 20 0 }
				text = "COLONY_MAP_LIST_PANEL_REGION_HEADER"
				tooltip = "COLONY_MAP_LIST_PANEL_REGION_HEADER_TOOLTIP"
				size = { 240 20 }
				onclick = "[MapListPanel.Sort('region')]"
			}

			sort_button = {
				align = left|nobaseline
				margin = { 20 0 }
				text = "COLONY_MAP_LIST_PANEL_STATE_HEADER"
				tooltip = "COLONY_MAP_LIST_PANEL_STATE_HEADER_TOOLTIP"
				size = { 240 20 }
				onclick = "[MapListPanel.Sort('state')]"
			}
		}

		blockoverride "values" {

			textbox = {
				margin = { 30 0 }
				size = { 240 25 }
				align = left|nobaseline
				text = "[MapListOption.GetColonyData.GetRegion]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				margin = { 30 0 }
				size = { 240 25 }
				align = left|nobaseline
				text = "[MapListOption.GetColonyData.GetState]"
				parentanchor = vcenter
				elide = right
			}
		}
	}

	### DIPLO ACTIONS
	type diplo_action_map_list_panel = map_list_panel {
		name = "diplo_action_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				text = "DEFAULT_MAP_LIST_PANEL_STATUS_HEADER"
				tooltip = "DIPLO_ACTION_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 65 20 }
				onclick = "[MapListPanel.Sort('status')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "DIPLO_ACTION_LIST_PANEL_STATUS_HEADER"
				tooltip = "DIPLO_ACTION_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 475 20 }
				onclick = "[MapListPanel.Sort('country')]"
			}
		}
	}

	### MARKETS
	type markets_map_list_panel = map_list_panel {
		name = "markets_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 430 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				text = "GDP_SHORT"
				tooltip = "GDP"
				size = { 110 20 }
				onclick = "[MapListPanel.Sort('gdp')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 430 25 }
				align = left|nobaseline
				text = "[MapListOption.GetMarketData.GetMarket.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetMarketData.GetMarket]"
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				text = "@money![Market.GetMarketGDPValue|Dv]"
				parentanchor = vcenter
				elide = right
			}
		}

		blockoverride "interaction" {
			onclick = "[InformationPanelBar.OpenMarketPanel(MapListOption.AccessMarketData.AccessMarket)]"
			onrightclick = "[RightClickMenuManager.ShowForMarket(MapListOption.AccessMarketData.AccessMarket)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightMarket(MapListOption.GetMarketData.GetMarket)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	### STRATEGIC REGIONS
	type strategic_regions_map_list_panel = map_list_panel {
		name = "strategic_regions_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "itemvisibility" {
			visible = "[MapListOption.GetStrategicRegionData.GetStrategicRegion.IsLand]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 140 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}

			sort_button = {
				align = left|nobaseline
				size = { 300 20 }
			}
			sort_button = {
				align = hcenter|nobaseline
				text = "GDP_SHORT"
				size = { 110 20 }
				onclick = "[MapListPanel.Sort('gdp')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 135 25 }
				align = left|nobaseline
				text = "[MapListOption.GetStrategicRegionData.GetStrategicRegion.GetName]"
				parentanchor = vcenter
				elide = right
			}
			widget = {
				size = { 300 25 }
				parentanchor = vcenter

				overlappingitembox = {
					size = { 280 25 }
					datacontext = "[MapListOption.GetStrategicRegionData.GetStrategicRegion]"
					datamodel = "[StrategicRegion.GetInterests]"

					item = {
						container = {
							tooltip = "INTEREST_MARKER_TOOLTIP"
							using = tooltip_above

							widget = {
								size = { 35 33 }

								tiny_flag = {
									position = { 0 -2 }
									visible = "[Not(Interest.IsActive)]"
									datacontext = "[Interest.GetOwner]"
									blockoverride "tooltip" {}
									parentanchor = center
									alpha = 0.3
								}
								tiny_flag = {
									position = { 0 -2 }
									visible = "[Interest.IsActive]"
									datacontext = "[Interest.GetOwner]"
									blockoverride "tooltip" {}
									parentanchor = center
								}

								widget = {
									size = { 25 4 }
									position = { 0 12 }
									visible = "[Interest.ShouldShowProgressBar]"
									parentanchor = center

									bad_progressbar_horizontal = {
										visible = "[Interest.IsActive]"
										size = { 100% 100% }
										blockoverride "values" {
											min = 0
											max = 1
											value = "[Interest.GetProgress]"
										}
									}

									default_progressbar_horizontal = {
										visible = "[Not(Interest.IsActive)]"
										size = { 100% 100% }
										blockoverride "values" {
											min = 0
											max = 1
											value = "[Interest.GetProgress]"
										}
									}
								}
							}
						}
					}
				}
			}
			textbox = {
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				text = "@money![MapListOption.GetStrategicRegionData.GetStrategicRegion.GetTotalGDP|Dv]"
				parentanchor = vcenter
				elide = right
			}
		}

		blockoverride "interaction" {
			onmousehierarchyenter = "[AccessHighlightManager.HighlightStrategicRegion(MapListOption.GetStrategicRegionData.GetStrategicRegion)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	### INTEREST GROUPS
	type interest_groups_map_list_panel = map_list_panel {
		name = "interest_groups_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 420 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				text = "[concept_clout]"
				size = { 130 20 }
				onclick = "[MapListPanel.Sort('clout')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 420 25 }
				align = left|nobaseline
				text = "[MapListOption.GetInterestGroupData.GetInterestGroup.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetInterestGroupData.GetInterestGroup]"
				margin = { 5 0 }
				size = { 120 25 }
				align = right|nobaseline
				text = "[InterestGroup.GetClout|1%v]"
				parentanchor = vcenter
				elide = right
				using = clout_tooltip_with_graph
			}
		}

		blockoverride "interaction" {
			onclick = "[InformationPanelBar.OpenInterestGroupPanel(MapListOption.AccessInterestGroupData.AccessInterestGroup)]"
			onrightclick = "[RightClickMenuManager.ShowForIG(MapListOption.AccessInterestGroupData.AccessInterestGroup)]"
		}
	}

	type countries_map_list_panel = countries_map_list_panel_full {
		name = "countries_map_list_panel"
	}

	type countries_ongoing_diplomatic_play_map_list_panel = countries_map_list_panel_full {
		name = "countries_ongoing_diplomatic_play_map_list_panel"
	}

	### COUNTRY ATTITUDE
	type country_attitude_map_list_panel = country_map_list_one_value {
		name = "country_attitude_map_list_panel"

		blockoverride "shown_on_map_header" {
			text = "[concept_attitude]"
			onclick = "[MapListPanel.Sort('attitude')]"
		}
		blockoverride "shown_on_map_value" {
			text = "[Country.GetAttitudeTowards(GetPlayer).GetName]"
			tooltip = "[Country.GetAttitudeTowards(GetPlayer).GetTooltip]"
		}

		blockoverride "button_color" {
			color = "[Country.GetAttitudeTowards( GetPlayer.Self ).GetColor]"
		}
	}

	### COUNTRY RELATIONS
	type country_relations_map_list_panel = country_map_list_one_value {
		name = "country_relations_map_list_panel"

		blockoverride "shown_on_map_header" {
			text = "RELATIONS"
			onclick = "[MapListPanel.Sort('relations')]"
		}
		blockoverride "shown_on_map_value" {
			tooltip = "[GetPlayer.GetRelationsTooltip( Country.Self )]"
			text = "[Country.GetRelationsWithDesc( GetPlayer )] ([Country.GetRelationsWith(GetPlayer)|+=])"
		}

		blockoverride "button_color" {
			color = "[Country.GetRelationsColor( GetPlayer.Self )]"
		}
	}

	type countries_military_map_list_panel = map_list_panel {
		name = "countries_military_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "button_color" {
			color = "[Country.GetDiplomaticStatusColor( GetPlayer.Self )]"
		}

		blockoverride "headers" {
			sort_button = {
				size = { 40 30 }
				onclick = "[MapListPanel.Sort('rank')]"

				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_rank.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}

				tooltip = "SORT_BY_RANK"
			}
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 250 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 130 20 }
				text = "BATTALIONS"
				onclick = "[MapListPanel.Sort('army')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 130 20 }
				text = "WARSHIPS"
				onclick = "[MapListPanel.Sort('navy')]"
			}
		}

		blockoverride "values" {
			datacontext = "[MapListOption.GetCountryData.GetCountry]"
			textbox = {
				text = "##[Country.GetCountryScorePosition]"
				size = { 40 23 }
				margin_right = 8
				align = right|nobaseline
				parentanchor = left|vcenter
				alwaystransparent = no
				tooltip = "[Country.GetRankTooltip]"
			}
			textbox = {
				margin = { 5 0 }
				size = { 240 25 }
				align = left|nobaseline
				text = "[Country.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				margin = { 5 0 }
				size = { 130 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "#variable @battalions! [Country.GetBattalions|0]#! "
				tooltip = PANEL_MILITARY_ARMY_CURRENT_BATTALIONS_TOOLTIP
			}
			textbox = {
				margin = { 5 0 }
				size = { 130 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "#variable @flotillas! [Country.GetWarships|0]#!"
				tooltip = PANEL_MILITARY_NAVY_CURRENT_WARSHIPS_TOOLTIP
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.GetCountryData.GetCountry]"
			onclick = "[InformationPanelBar.OpenCountryPanel(Country.Self)]"
			onrightclick = "[RightClickMenuManager.ShowForCountry(Country.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightCountry(Country.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	### TRADE ROUTES
	type trade_route_map_list_panel = map_list_panel {
		name = "trade_route_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				text = "DEFAULT_MAP_LIST_PANEL_STATUS_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 65 20 }
				onclick = "[MapListPanel.Sort('status')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "TRADE_ROUTE_LIST_PANEL_MARKET_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_MARKET_HEADER_TOOLTIP"
				size = { 160 20 }
				onclick = "[MapListPanel.Sort('market')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "TRADE_ROUTE_LIST_PANEL_LEVEL_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_LEVEL_HEADER_TOOLTIP"
				size = { 60 20 }
				onclick = "[MapListPanel.Sort('level')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "TRADE_ROUTE_LIST_PANEL_QUANTITY_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_QUANTITY_HEADER_TOOLTIP"
				size = { 85 20 }
				onclick = "[MapListPanel.Sort('quantity')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "TRADE_ROUTE_LIST_PANEL_CONVOYS_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_CONVOYS_HEADER_TOOLTIP"
				size = { 50 20 }
				onclick = "[MapListPanel.Sort('convoys')]"
			}			
			sort_button = {
				align = center|nobaseline
				text = "TRADE_ROUTE_LIST_PANEL_VALUE_HEADER"
				tooltip = "TRADE_ROUTE_LIST_PANEL_VALUE_HEADER_TOOLTIP"
				size = { 110 20 }
				onclick = "[MapListPanel.Sort('value')]"
			}					
		}

		blockoverride "values" {

			textbox = {
				margin = { 5 0 }
				size = { 160 25 }
				align = left|nobaseline
				text = "[MapListOption.GetTradeRouteData.GetMarket.GetNameNoFormatting]"
				parentanchor = vcenter
				elide = right
			}
			textbox = {
				margin = { 5 0 }
				size = { 60 25 }
				align = center|nobaseline
				text = "[MapListOption.GetTradeRouteData.GetLevel|v]"
				parentanchor = vcenter
				elide = right
			}
			textbox = {
				margin = { 5 0 }
				size = { 85 25 }
				align = center|nobaseline
				text = "[MapListOption.GetTradeRouteData.GetTradedQuantity|0v]"
				parentanchor = vcenter
				elide = right
			}	
			textbox = {
				margin = { 5 0 }
				size = { 50 25 }
				align = center|nobaseline
				text = "[MapListOption.GetTradeRouteData.GetConvoyCost|v]"
				parentanchor = vcenter
				elide = right
			}				
			textbox = {
				margin = { 10 0 }
				size = { 110 25 }
				align = center|nobaseline
				text = "@money![MapListOption.GetTradeRouteData.GetProductivity|D+]"
				parentanchor = vcenter
				elide = right
			}		
		}
	}

	### STATE
	type state_map_list_panel = map_list_panel {
		name = "state_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 240 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 100 20 }
				text = "POPULATION"
				onclick = "[MapListPanel.Sort('population')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 100 20 }
				text = "SOL_SHORT"
				onclick = "[MapListPanel.Sort('standard_of_living')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 100 20 }
				text = "GDP_SHORT"
				onclick = "[MapListPanel.Sort('gdp_contribution')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 240 25 }
				align = left|nobaseline
				text = "[MapListOption.GetStateData.GetState.GetOwner.GetFlagTextIcon]  [MapListOption.GetStateData.GetState.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "[State.GetPopulationSize|Kv]"
				tooltip = "TOOLTIP_STATE_POPULATION"
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				tooltip = "NUM_SOL"
				text = "[State.GetAverageStandardOfLivingAll|v1]"
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "@money![State.GetGDPContribution|Dv]"
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.AccessStateData.AccessState]"
			onclick = "[InformationPanelBar.OpenStatePanel(State.AccessSelf)]"
			onrightclick = "[RightClickMenuManager.ShowForState(State.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightState(State.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	# STATE PRODUCTION
	type state_production_map_list_panel = state_map_list_one_value {
		name = "state_production_map_list_panel"

		blockoverride "shown_on_map_header" {
			text = "GDP_CONTRIBUTION"
			onclick = "[MapListPanel.Sort('gdp_contribution')]"
		}
		blockoverride "shown_on_map_value" {
			text = "@money![State.GetGDPContribution|Dv]"
			tooltip = "CURRENT_GDP_STATE"
		}
	}

	# STATE GDP
	type state_gdp_map_list_panel = state_map_list_one_value {
		name = "state_gdp_map_list_panel"

		blockoverride "shown_on_map_header" {
			text = "GDP_CONTRIBUTION"
			onclick = "[MapListPanel.Sort('gdp_contribution')]"
		}
		blockoverride "shown_on_map_value" {
			text = "@money![State.GetGDPContribution|Dv]"
			tooltip = "CURRENT_GDP_STATE"
		}
	}

	# STATE GDP (NATIONALLY)
	type state_gdp_nationally_map_list_panel = state_map_list_one_value {
		name = "state_gdp_nationally_map_list_panel"

		blockoverride "itemvisibility" {
			visible = "[ObjectsEqual(MapListOption.GetStateData.GetState.GetOwner, GetPlayer.Self)]"
		}

		blockoverride "shown_on_map_header" {
			text = "GDP_CONTRIBUTION"
			onclick = "[MapListPanel.Sort('gdp_contribution')]"
		}
		blockoverride "shown_on_map_value" {
			text = "@money![State.GetGDPContribution|Dv]"
			tooltip = "CURRENT_GDP_STATE"
		}
	}

	# STATE STANDARD OF LIVING
	type state_standard_of_living_map_list_panel = state_map_list_one_value {
		name = "state_standard_of_living_map_list_panel"

		blockoverride "shown_on_map_header" {
			text = "[concept_sol]"
			onclick = "[MapListPanel.Sort('standard_of_living')]"
		}
		blockoverride "shown_on_map_value" {
			text = "[LabelingHelper.GetLabelForStandardOfLivingCFixedPoint(State.GetAverageStandardOfLivingAll)|v] ([State.GetAverageStandardOfLivingAll|v1])"
			tooltip = "NUM_SOL"
		}
	}
	
	# STATE RADICALS
	type state_radicals_map_list_panel = state_map_list_one_value {
		name = "state_radicals_map_list_panel"

		blockoverride "itemvisibility" {
			visible = "[ObjectsEqual(MapListOption.GetStateData.GetState.GetOwner, GetPlayer.Self)]"
		}
		
		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}
		
		blockoverride "shown_on_map_header" {
			text = "[concept_radical]"
			onclick = "[MapListPanel.Sort('radicals')]"
		}
		
		blockoverride "shown_on_map_value" {
			text = "[State.GetNumRadicals|d]"
		}
	}

	# STATE LOYALISTS
	type state_loyalists_map_list_panel = state_map_list_one_value {
		name = "state_loyalists_map_list_panel"

		blockoverride "itemvisibility" {
			visible = "[ObjectsEqual(MapListOption.GetStateData.GetState.GetOwner, GetPlayer.Self)]"
		}
		
		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}
		
		blockoverride "shown_on_map_header" {
			text = "[concept_loyalist]"
			onclick = "[MapListPanel.Sort('loyalists')]"
		}
		
		blockoverride "shown_on_map_value" {
			text = "[State.GetNumLoyalists|d]"
		}
	}

	# STATE MIGRATION PULL
	type state_migration_pull_list_panel = state_map_list_one_value {
		name = "state_migration_pull_list_panel"

		blockoverride "shown_on_map_header" {
			text = "[concept_migration_pull]"
			onclick = "[MapListPanel.Sort('migration_pull')]"
		}
		blockoverride "shown_on_map_value" {
			text = "#v [State.GetMigrationPull|1]#!"
			tooltip = "MIGRATION_PULL_DESC"
		}
	}

	type state_culture_map_list_panel = map_list_panel {
		name = "state_culture_map_list_panel"

		blockoverride "header_close_button" {
			onclick = "[MapListPanelManager.CloseCurrentPanel]"
		}

		blockoverride "headers" {
			sort_button = {
				align = left|nobaseline
				text = "NAME"
				size = { 240 20 }
				onclick = "[MapListPanel.Sort('name')]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 150 20 }
				text = "##1 [concept_culture]"
			}
			sort_button = {
				align = hcenter|nobaseline
				size = { 150 20 }
				text = "##2 [concept_culture]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 240 25 }
				align = left|nobaseline
				text = "[MapListOption.GetStateData.GetState.GetOwner.GetFlagTextIcon]  [MapListOption.GetStateData.GetState.GetName]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 150 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "[State.GetPopCultureDescByIndex('(int32)0')]"
				tooltip = "[State.GetPopCultureDesc]"
			}

			textbox = {
				datacontext = "[MapListOption.GetStateData.GetState]"
				margin = { 5 0 }
				size = { 150 25 }
				align = right|nobaseline
				parentanchor = vcenter
				elide = right
				text = "[State.GetPopCultureDescByIndex('(int32)1')]"
				tooltip = "[State.GetPopCultureDesc]"
			}
		}

		blockoverride "interaction" {
			datacontext = "[MapListOption.AccessStateData.AccessState]"
			onclick = "[InformationPanelBar.OpenStatePanel(State.AccessSelf)]"
			onrightclick = "[RightClickMenuManager.ShowForState(State.AccessSelf)]"
			onmousehierarchyenter = "[AccessHighlightManager.HighlightState(State.Self)]"
			onmousehierarchyleave = "[AccessHighlightManager.RemoveHighlight]"
		}
	}

	type activate_conscription_center_map_list_panel = map_list_panel {
		name = "activate_conscription_center_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				tooltip = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 45 20 }
				onclick = "[MapListPanel.Sort('status')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_status.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = left|nobaseline
				margin = { 20 0 }
				text = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_STATE_HEADER"
				tooltip = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_STATE_HEADER_TOOLTIP"
				size = { 340 20 }
				onclick = "[MapListPanel.Sort('state')]"
			}


			sort_button = {
				align = center|nobaseline
				text = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_UNITS"
				tooltip = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_UNITS_TOOLTIP"
				size = { 150 20 }
				onclick = "[MapListPanel.Sort('units')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 20 0 }
				size = { 340 25 }
				align = left|nobaseline
				text = "[MapListOption.GetActivateConscriptionCenterData.GetState.GetNameNoFormatting]"
				parentanchor = vcenter
				elide = right
			}

			textbox = {
				size = { 115 25 }
				align = hcenter|vcenter
				text = "ACTIVATE_CONSCRIPTION_CENTER_MAP_LIST_PANEL_UNITS_TEXT"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}
		}
	}

	type front_map_list_panel = map_list_panel {
		name = "front_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				tooltip = "DEFAULT_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 45 20 }
				onclick = "[MapListPanel.Sort('status')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_status.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = center|nobaseline
				text = "[concept_front]"
				size = { 380 20 }
				onclick = "[MapListPanel.Sort('front')]"
			}

			sort_button = {
				align = center|nobaseline
				text = "FRONT_MAP_LIST_PANEL_UNITS"
				tooltip = "FRONT_MAP_LIST_PANEL_UNITS_TOOLTIP"
				size = { 115 20 }
				onclick = "[MapListPanel.Sort('units')]"
			}
		}

		blockoverride "values" {
			textbox = {
				margin = { 5 0 }
				size = { 380 25 }
				align = left|nobaseline
				text = "[MapListOption.GetAdvanceFrontData.GetFront.GetName]"
				parentanchor = left|vcenter
				elide = right
			}

			textbox = {
				margin = { 5 0 }
				size = { 100 25 }
				align = right|nobaseline
				text = "@battalions! [MapListOption.GetAdvanceFrontData.GetFront.GetNumUnits( GetPlayer.Self )|v]"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}
		}
	}

	type recruit_commanders_map_list_panel = map_list_panel {
		name = "recruit_commanders_map_list_panel"

		blockoverride "headers" {
			sort_button = {
				align = center|nobaseline
				tooltip = "RECRUIT_COMMANDERS_MAP_LIST_PANEL_STATUS_HEADER_TOOLTIP"
				size = { 45 20 }
				onclick = "[MapListPanel.Sort('status')]"
				button = {
					texture = "gfx/interface/buttons/sort_button_icons/sort_icon_status.dds"
					size = { 25 25 }
					parentanchor = center
					alwaystransparent = yes
				}
			}

			sort_button = {
				align = left|nobaseline
				margin = { 20 0 }
				text = "[concept_hq]"
				size = { 260 20 }
				onclick = "[MapListPanel.Sort('hq')]"
			}

			sort_button = {
				align = center|nobaseline
				text = "RECRUIT_COMMANDERS_MAP_LIST_PANEL_CURRENT_NUM"
				tooltip = "[MapListHQPanel.GetCurrentNumberTooltip]"
				size = { 115 20 }
				onclick = "[MapListPanel.Sort('num_commanders')]"
			}
			sort_button = {
				align = center|nobaseline
				text = "FRONT_MAP_LIST_PANEL_UNITS"
				tooltip = "[MapListHQPanel.GetCurrentNumberOfUnitsTooltip]"
				size = { 115 20 }
				onclick = "[MapListPanel.Sort('num_units')]"
			}

		}

		blockoverride "values" {
			textbox = {
				margin = { 10 0 }
				size = { 260 25 }
				align = left|nobaseline
				text = "[MapListOption.GetRecruitmentData.GetHQ.GetName]"
				parentanchor = left|vcenter
				elide = right
			}

			textbox = {
				visible = "[Not(And(GreaterThan_int32(MapListOption.GetRecruitmentData.GetHQ.GetReserveUnitsRaw,'(int32)0'), EqualTo_int32(MapListOption.GetRecruitmentData.GetCurrentCount, '(int32)0')))]"
				margin = { 5 0 }
				size = { 95 25 }
				align = center|nobaseline
				text = "[MapListOption.GetRecruitmentData.GetCurrentCount]"
				default_format = "bold;shadow"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}

			textbox = {
				visible = "[And(GreaterThan_int32(MapListOption.GetRecruitmentData.GetHQ.GetReserveUnitsRaw,'(int32)0'), EqualTo_int32(MapListOption.GetRecruitmentData.GetCurrentCount, '(int32)0'))]"
				margin = { 5 0 }
				size = { 95 25 }
				align = center|nobaseline
				text = "[MapListOption.GetRecruitmentData.GetCurrentCount]"
				default_format = "#red;bold;shadow"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}
			textbox = {
				visible = "[MapListOption.GetRecruitmentData.GetHQ.IsLandHQ]"
				margin = { 5 0 }
				size = { 95 25 }
				align = center|nobaseline
				text = "@battalions! [MapListOption.GetRecruitmentData.GetHQ.GetReserveUnitsRaw]"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}
			textbox = {
				visible = "[MapListOption.GetRecruitmentData.GetHQ.IsNavalHQ]"
				margin = { 5 0 }
				size = { 95 25 }
				align = center|nobaseline
				text = "@flotillas! [MapListOption.GetRecruitmentData.GetHQ.GetReserveUnitsRaw]"
				parentanchor = vcenter
				elide = right
				using = tooltip_above
			}
		}
	}
}
