#textdomain wesnoth-lib
###
### Definition of an progress bar, used to fade in the logo in the title screen.
###

[progress_bar_definition]
	id = "title_screen"
	description = "A progress bar used in the title screen to fade in the logo."

	[resolution]

		# This maximum is also documented in the wiki
		# http://wiki.wesnoth.org/ImageLocalization#BfW_Logo
		min_width = 550
		min_height = 250

		default_width = 550
		default_height = 250

		max_width = 550
		max_height = 250

		[state_enabled]

			[draw]

				[image]
					# w = 0 means fit
					# using percentage = 0 seems to fail for some reason...
					x = "((width - image_original_width) / 2)"
					w = "(if(percentage <= 0, 1, (image_original_width * percentage) / 100))"
					h = "(image_height)"
					name = "misc/logo.png"
					resize_mode = "tile"
				[/image]

			[/draw]

		[/state_enabled]

	[/resolution]

[/progress_bar_definition]

