#textdomain wesnoth-lib
###
### Definition of the default button.
###

#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE BASE_NAME
	[resolution]

		{RESOLUTION}

		min_width = {MIN_WIDTH}
		min_height = {HEIGHT}

		default_width = {DEFAULT_WIDTH}
		default_height = {HEIGHT}

		max_width = 0
		max_height = {HEIGHT}

		text_extra_width = {EXTRA_WIDTH}
		text_extra_height = {EXTRA_HEIGHT}
		text_font_size = {FONT_SIZE}

		[state_enabled]

			[draw]

				[image]
					w = "(width)"
					h = "(height)"
					name = "buttons/{BASE_NAME}.png"
				[/image]

				{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOUR_ENABLED__TITLE})}

			[/draw]

		[/state_enabled]

		[state_disabled]

			[draw]

				[image]
					w = "(width)"
					h = "(height)"
					name = "buttons/{BASE_NAME}-disabled.png"
				[/image]

				{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOUR_DISABLED__TITLE})}

			[/draw]

		[/state_disabled]

		[state_pressed]

			[draw]

				[image]
					w = "(width)"
					h = "(height)"
					name = "buttons/{BASE_NAME}-pressed.png"
				[/image]

				{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOUR_ENABLED__TITLE})}

			[/draw]

		[/state_pressed]

		[state_focussed]

			[draw]

				[image]
					w = "(width)"
					h = "(height)"
					name = "buttons/{BASE_NAME}-active.png"
				[/image]

				{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOUR_ENABLED__TITLE})}

			[/draw]

		[/state_focussed]

	[/resolution]
#enddef

[button_definition]

	id = "default"
	description = "Default button"

	# Tiny gui sizes haven't been tested yet so might need some tuning.
	{_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20  54 11  6 2 ({GUI_TINY__FONT_SIZE__SMALL})   "button" }
	{_GUI_RESOLUTION ()                       40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button" }

[/button_definition]

[button_definition]

	id = "transparent"
	description = "Default transparent button"

	# Tiny gui sizes haven't been tested yet so might need some tuning.
	{_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20  54 11  6 2 ({GUI_TINY__FONT_SIZE__SMALL})   "button_transparent" }
	{_GUI_RESOLUTION ()                       40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button_transparent" }

[/button_definition]

#undef _GUI_RESOLUTION 
