#textdomain wesnoth-lib
###
### Definition of the control panel window.
###

#define _GUI_SIDES_LISTBOX
[listbox]
    id = "sides_list"
    definition = "default"
    [header]
        [row]
            [column]
                grow_factor = 1
                horizontal_grow = "true"
                border = "all"
                border_size = 5

                [label]
                    id = "side_title"
                    definition = "default"
                    label = _ "Side"
                [/label]
            [/column]
        [/row]
    [/header]

    [list_definition]
        [row]
            [column]
                vertical_grow = "true"
                horizontal_grow = "true"

                [toggle_panel]
                    definition = "default"
                    [grid]
                        [row]
                            [column]
                                grow_factor = 1
                                horizontal_grow = "true"

                                border = "all"
                                border_size = 5

                                [label]
                                    id = "side"
                                    definition = "default"
                                [/label]
                            [/column]
                        [/row]
                    [/grid]
                [/toggle_panel]
            [/column]
        [/row]
    [/list_definition]
[/listbox]
#enddef

#define _GUI_NICKS_LISTBOX
[listbox]
    id = "nicks_list"
    definition = "default"
    [header]
        [row]
            [column]
                grow_factor = 1
                horizontal_grow = "true"
                border = "all"
                border_size = 5

                [label]
                    id = "nick_title"
                    definition = "default"
                    label = _ "Nickname"
                [/label]
            [/column]
        [/row]
    [/header]

    [list_definition]
        [row]
            [column]
                vertical_grow = "true"
                horizontal_grow = "true"

                [toggle_panel]
                    definition = "default"
                    [grid]
                        [row]
                            [column]
                                grow_factor = 1
                                horizontal_grow = "true"

                                border = "all"
                                border_size = 5

                                [label]
                                    id = "nick"
                                    definition = "default"
                                [/label]
                            [/column]
                        [/row]
                    [/grid]
                [/toggle_panel]
            [/column]
        [/row]
    [/list_definition]
[/listbox]
#enddef

#define _GUI_LISTBOXES_GRID
[grid]
    [row]
        [column]
            vertical_alignment=top
            grow_factor= 0
            border = "all"
            border_size = 5
            {_GUI_SIDES_LISTBOX}
        [/column]
        [column]
            vertical_alignment=top
            grow_factor = 1
            border = "all"
            border_size = 5
            {_GUI_NICKS_LISTBOX}
        [/column]
    [/row]
[/grid]
#enddef

#define _GUI_BUTTONS_GRID
[grid]
    [row]
        [column]
            grow_factor = 7
            border = "all"
            border_size = 5
            horizontal_alignment = "left"
            [spacer]
                definition = "default"
            [/spacer]
        [/column]
        [column]
            grow_factor = 0
            border = "all"
            border_size = 5
            [button]
                id = "ok"
                definition = "default"
                label = _ "OK"
            [/button]
        [/column]
        [column]
            grow_factor = 0
            border = "all"
            border_size = 5
            [button]
                id = "cancel"
                definition = "default"
                label = _ "Cancel"
            [/button]
        [/column]
    [/row]
[/grid]
#enddef

[window]
    id = "mp_change_control"
    description = "Dialog used to change side's controller during MP."

    [resolution]
        definition = "default"
        automatic_placement = "true"
        vertical_placement = "center"
        horizontal_placement = "center"

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

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

        [grid]
            [row] #header
                grow_factor = 0

                [column]
                    grow_factor = 7
                    horizontal_alignment = "left"
                    [label]
                        definition = "title"
                        label = _ "Change Control"
                    [/label]
                [/column]
            [/row]
            [row]
                [column]
                    {_GUI_LISTBOXES_GRID}
                [/column]
            [/row]
            [row] #status
                grow_factor = 0
                [column]
                    {_GUI_BUTTONS_GRID}
                [/column]
            [/row]
        [/grid]
    [/resolution]
[/window]

#undef _GUI_BUTTONS_GRID
#undef _GUI_LISTBOXES_GRID
#undef _GUI_NICKS_LISTBOX
#undef _GUI_SIDES_LISTBOX
