#textdomain wesnoth-lib
###
### Definition of the window select the campaign to play
###

[window]
	id = "campaign_selection"
	description = "Campaign selection dialog."

	[resolution]
		definition = "default"

		automatic_placement = "true"
		vertical_placement = "center"
		horizontal_placement = "center"
		maximum_width = 800
		maximum_height = 600

		[linked_group]
			id = "icon_area"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "name"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "tree_name"
			fixed_width = "true"
		[/linked_group]

		[tooltip]
			id = "tooltip_large"
		[/tooltip]

		[helptip]
			id = "tooltip_large"
		[/helptip]

		[grid]

			[row]
				grow_factor = 0

				[column]
					grow_factor = 1

					border = "all"
					border_size = 5
					horizontal_alignment = "left"
					[label]
						definition = "title"

						label = _ "Play a campaign"
					[/label]

				[/column]

			[/row]

			[row]
				grow_factor = 1

				[column]
					grow_factor = 1

					horizontal_grow = "true"

					[grid]

						[row]
							grow_factor = 1

							[column]
								grow_factor = 0
								horizontal_grow = "true"

								border = "all"
								border_size = 5

								[listbox]
									id = "campaign_list"
									definition = "default"

									horizontal_scrollbar_mode = "never"
									[list_definition]

										[row]

											 [column]
												grow_factor = 1
												horizontal_grow = "true"

												[toggle_panel]
													id = "_toggle"
													definition = "default"

													return_value_id = "ok"
													[grid]

														[row]

															[column]
																grow_factor = 1
																horizontal_grow = "true"

																border = "all"
																border_size = 5
																vertical_alignment = "top"
																[stacked_widget]
																	id = ""
																	definition = "default"
																	linked_group = "icon_area"

																	[stack]

																		[layer]

																			[row]

																				[column]
																					grow_factor = 1
																					horizontal_grow = "true"

																					border = "left"
																					border_size = 3

																					[image]
																						id = "victory"
																						definition = "default"

																						label = "misc/laurel.png"
																					[/image]

																				[/column]

																			[/row]

																		[/layer]

																		[layer]

																			[row]

																				[column]
																					grow_factor = 1
																					horizontal_grow = "true"

																					border = "left"
																					border_size = 3

																					[image]
																						id = "icon"
																						definition = "default"

																						label = "misc/laurel.png"
																					[/image]

																				[/column]

																			[/row]

																		[/layer]

																	[/stack]

																[/stacked_widget]

															[/column]

															[column]
																grow_factor = 1
																horizontal_grow = "true"

																border = "right"
																border_size = 8

																[label]
																	id = "name"
																	definition = "default"
																	linked_group = "name"
																[/label]

															[/column]

														[/row]

													[/grid]

												[/toggle_panel]

											[/column]

										[/row]

									[/list_definition]

								[/listbox]

							[/column]

							[column]
								grow_factor = 0

								border = "all"
								border_size = 5
								horizontal_alignment = "left"

								[tree_view]
									id = "campaign_tree"
									definition = "default"

									horizontal_scrollbar_mode = "never"
									vertical_scrollbar_mode = "always"

									indention_step_size = "40"

									[node]
										id = "campaign_group"
										[node_definition]

											[row]

												[column]

													[toggle_button]
														id = "tree_view_node_icon"
														definition = "tree_view_node"
													[/toggle_button]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													[label]
														id = "tree_view_node_label"
														label = "group"
													[/label]

												[/column]

											[/row]

										[/node_definition]

									[/node]

									[node]
										id = "campaign"

										[node_definition]

											[row]

												[column]
													horizontal_grow = "true"

													[toggle_panel]
														id = "tree_view_node_label"
														definition = "default"

#														horizontal_grow = "true"
														return_value_id = "ok"
														[grid]

															[row]

																[column]
																	border = "all"
																	border_size = 5
																	vertical_alignment = "top"

																	[image]
																		id = "icon"
																		definition = "default"
																	[/image]

																[/column]

																[column]
																	grow_factor = 1
																	horizontal_grow = "true"

																	border = "right"
																	border_size = 8

																	[label]
																		id = "name"
																		definition = "default"
																		linked_group = "tree_name"
																	[/label]

																[/column]

															[/row]

														[/grid]

													[/toggle_panel]

												[/column]

											[/row]

										[/node_definition]

									[/node]

								[/tree_view]

							[/column]

							[column]
								grow_factor = 1
								horizontal_grow = "true"

								border = "all"
								border_size = 5
								vertical_alignment = "top"

								[multi_page]
									id = "campaign_details"
									definition = "default"

									horizontal_scrollbar_mode = "never"

									[page_definition]

										[row]

											[column]
													horizontal_alignment = "center"
													vertical_alignment = "top"

												[scrollbar_panel]

													[definition]

														[row]
															grow_factor = 0

															[column]
																border = "all"
																border_size = 5
																horizontal_alignment = "center"
																vertical_alignment = "top"

																[label]
																	id = "description"
																	definition = "default"

																	wrap = "true"
																[/label]

															[/column]

														[/row]

														[row]
															grow_factor = 1

															[column]
																border = "all"
																border_size = 5
																horizontal_alignment = "center"
																vertical_alignment = "top"

																[image]
																	id = "image"
																	definition = "default"
																[/image]

															[/column]

														[/row]

													[/definition]

												[/scrollbar_panel]

											[/column]

										[/row]

									[/page_definition]

								[/multi_page]

							[/column]

						[/row]

					[/grid]

				[/column]

			[/row]

			[row]
				grow_factor = 0

				[column]
					grow_factor = 1
					horizontal_grow = "true"

					[grid]

						[row]
							grow_factor = 0

							[column]
								border = "all"
								border_size = 5

								grow_factor = 1
								horizontal_alignment = "right"

								[button]
									id = "ok"
									definition = "default"

									label = _ "OK"
								[/button]

							[/column]

							[column]
								border = "all"
								border_size = 5
								horizontal_alignment = "right"

								[button]
									id = "cancel"
									definition = "default"

									label = _ "Cancel"
								[/button]

							[/column]

						[/row]

					[/grid]

				[/column]

			[/row]

		[/grid]

	[/resolution]

[/window]
