#textdomain wesnoth-lib
###
### Definition of the main screen for Wesnoth.
###

[window_definition]

	id = "title_screen"
	description = "The window definition for the title screen."

	[resolution]
		
		[background]

			[draw]
			
				[image]
					x = 0
					y = 0
					w = "(width)"
					h = "(height)"
					name = "(background_image)"
				[/image]

				[text]
					x = 0
					y = "(height - text_height)"
					w = "(text_width)"
					h = "(text_height)"
					font_size = 16
					font_colour = "255, 255, 255, 128"
					text = "(revision_number)"
				[/text]

			[/draw]

		[/background]

		[foreground]

			[draw]

			[/draw]

		[/foreground]

	[/resolution]

[/window_definition]

#define _GUI_TIP_SECTION
	[panel]
		definition = "title_screen"

		[grid]

			[row]

				[column]
					border = "all"
					border_size = 5
					horizontal_grow = "true"

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

						wrap = "true"
					[/label]

				[/column]

			[/row]

			[row]

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

					[label]
						id = "source"
						definition = "default"
					[/label]

				[/column]

			[/row]

			[row]

				[column]
					horizontal_grow = "true" 

					[grid]

						[row]

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

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

									label = _ "Help"
								[/button]

							[/column]

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

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

									label = _ "Previous"
								[/button]

							[/column]

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

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

									label = _ "Next"
								[/button]

							[/column]

						[/row]

					[/grid]

				[/column]

			[/row]

		[/grid]

	[/panel]
#enddef


#define _GUI_BUTTON ID CAPTION
	[row]

		[column]
			border = "all"
			border_size = 5
			horizontal_grow = "true"
			[button]
				id = {ID}
				definition = "default"

				label = {CAPTION}
			[/button]
			
		[/column]

	[/row]

#enddef

#define _GUI_MENU_SECTION
	[panel]
		definition = "title_screen"

		[grid]
			{_GUI_BUTTON "tutorial" _"Tutorial"}
			{_GUI_BUTTON "campaign" _"Campaign"}
			{_GUI_BUTTON "multiplayer" _"Multiplayer"}
			{_GUI_BUTTON "load" _"Load"}
			{_GUI_BUTTON "addons" _"Add-ons"}
			{_GUI_BUTTON "editor" _"Editor"}
			{_GUI_BUTTON "language" _"Language"}
			{_GUI_BUTTON "preferences" _"Preferences"}
			{_GUI_BUTTON "credits" _"Credits"}
			{_GUI_BUTTON "quit" _"Quit"}
		[/grid]

	[/panel]
#enddef

[window]
	id = "title_screen"
	description = "MP create game dialog."

	[resolution]
		definition = "title_screen"

		automatic_placement = "false"
		x = 0
		y = 0
		width = "(screen_width)"
		height = "(screen_height)"

		[grid]

			[row]

				[column]
					vertical_alignment = "bottom"
					{_GUI_TIP_SECTION}	
				[/column]

				[column]
					horizontal_alignment = "right"
					{_GUI_MENU_SECTION}
				[/column]

			[/row]

		[/grid]

	[/resolution]

[/window]

#undef _GUI_TIP_SECTION
#undef _GUI_MENU_SECTION
#undef _GUI_BUTTON
