#textdomain wesnoth-sota

# Since this file is loaded standalone, we need to manually include these
{gui/macros}

#define UNIT_ROW
    [row]
        [column]
            grow_factor=0
            border="right"
            border_size=5
            horizontal_alignment = "left"
            [image]
                id = "unit_sprite"
            [/image]
        [/column]
        [column]
            grow_factor=0
            border="right"
            border_size=10
            [grid]
                [row]
                    [column]
                        [grid]
                            [row]
                                [column]
                                    [label]
                                        definition = "default"
                                        use_markup = "true"
                                        id = "unit_type"
                                    [/label]
                                [/column]
                            [/row]
                        [/grid]
                    [/column]
                [/row]
                [row]
                    [column]
                        border="top"
                        border_size=7
                        horizontal_alignment = "left"
                        [grid]
                            [row]
                                [column]
                                    border="right"
                                    border_size=6
                                    [image]
                                        label = "themes/gold.png"
                                    [/image]
                                [/column]
                                [column]
                                    [label]
                                        definition = "default"
                                        use_markup = "true"
                                        id = "unit_cost"
                                    [/label]
                                [/column]
                            [/row]
                        [/grid]
                    [/column]
                [/row]
            [/grid]
        [/column]
        [column]
            grow_factor=1
            [spacer]
            [/spacer]
        [/column]
    [/row]
#enddef

# There is a panel definition that does this, but it's more complicated than
# this grid; several of these fields can have constant values.
#define INFO_GRID
    [grid]
        [row]
            [column]
                border = "top,bottom"
                border_size = 10
                horizontal_alignment="left"
                [image]
                    id = "large_unit_sprite"
                [/image]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 5
                horizontal_alignment="left"
                [label]
                    use_markup = "true"
                    id = "large_unit_type"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                [grid]
                    [row]
                        [column]
                            border = "right"
                            border_size = 10
                            [label]
                                definition = "default_bold"
                                label= _ "Lvl 0"
                            [/label]
                        [/column]
                        [column]
                            border = "right"
                            border_size = 5
                            [image]
                                label = "../../images/icons/alignments/alignment_chaotic_30.png"
                            [/image]
                        [/column]
                        [column]
                            border = "right"
                            border_size = 5
                            [image]
                                label = "../../images/icons/unit-groups/race_undead_30.png"
                            [/image]
                        [/column]
                        [column]
                            border = "right"
                            border_size = 35
                            [label]
                                definition="default_small"
                                label= _ "Undead"
                            [/label]
                        [/column]
                        [column]
                            border = "right"
                            border_size = 17
                            [button]
                                definition="action_about"
                                id="unit_help_button"
                            [/button]
                        [/column]
                    [/row]
                [/grid]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 6
                [spacer]
                [/spacer]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 12
                horizontal_alignment = "left"
                [label]
                    definition = "default_tiny"
                    use_markup = "true"
                    id="unit_points"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 2
                horizontal_alignment = "left"
                [label]
                    definition ="default_small"
                    use_markup = "true"
                    label = "<b>" + _ "Traits" + "</b>"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 2
                horizontal_alignment = "left"
                [label]
                    definition = "default_small"
                    #textdomain wesnoth-help
                    label = "   " + _ "undead"
                    #textdomain wesnoth-sota
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 12
                horizontal_alignment = "left"
                [label]
                    definition = "default_small"
                    #textdomain wesnoth-help
                    label = "   " + _ "fearless"
                    #textdomain wesnoth-sota
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 2
                horizontal_alignment = "left"
                [label]
                    definition = "default_small"
                    use_markup = "true"
                    label = "<b>" + _ "Attacks" + "</b>"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 2
                horizontal_alignment = "left"
                [label]
                    definition = "default_small"
                    use_markup = "true"
                    id = "unit_attack"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 2
                horizontal_alignment = "left"
                [label]
                    definition = "default_small"
                    use_markup = "true"
                    id = "damage_type"
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                horizontal_alignment = "left"
                [label]
                    definition="default_small"
                    use_markup = "true"
                    #textdomain wesnoth-help
                    label = "<span color='#a69275'>     " + _ "plague" + "</span>"
                    #textdomain wesnoth-sota
                [/label]
            [/column]
        [/row]
        [row]
            [column]
                border = "bottom"
                border_size = 100
                [spacer]
                [/spacer]
            [/column]
        [/row]
    [/grid]
#enddef

[resolution]
    maximum_height=676
    # Not supported, left here in case that changes in the future.
    #minimum_height=608
    [tooltip]
        id = "tooltip_large"
    [/tooltip]
    [helptip]
        id = "tooltip_large"
    [/helptip]
    [grid]
        [row]
            [column]
                border = "left,top"
                border_size = 5
                horizontal_alignment = "left"
                [label]
                    definition = "title"
                    label = _ "Choose a Corpse"
                [/label]
            [/column]
            [column]
                [spacer]
                [/spacer]
            [/column]
        [/row]
        [row]
            [column]
                border = "left"
                border_size = 5
                vertical_alignment="top"
                {INFO_GRID}
            [/column]
            [column]
                border = "right,top"
                border_size = 5
                vertical_alignment = "top"
                [grid]
                    [row]
                        [column]
                            horizontal_grow = true
                            [listbox]
                                vertical_scrollbar_mode="initial_auto"
                                id = "unit_list"
                                [list_definition]
                                    [row]
                                        [column]
                                            horizontal_grow=true
                                            [toggle_panel]
                                                return_value = -1
                                                [grid]
                                                    {UNIT_ROW}
                                                [/grid]
                                            [/toggle_panel]
                                        [/column]
                                    [/row]
                                [/list_definition]
                            [/listbox]
                        [/column]
                    [/row]
                [/grid]
            [/column]
        [/row]
        [row]
            [column]
                border = "left, top, bottom"
                border_size = 7
                horizontal_alignment="left"
                [button]
                    id="help_button"
                    definition="help"
                [/button]
            [/column]
            [column]
                border = "left, top, bottom"
                border_size = 7
                [grid]
                    [row]
                        [column]
                            border_size=10
                            border="right"
                            [button]
                                return_value = 1
                                label = _"Recruit"
                            [/button]
                        [/column]
                        [column]
                            [button]
                                id = "cancel"
                                label = _"Cancel"
                            [/button]
                        [/column]
                    [/row]
                [/grid]
            [/column]
        [/row]
    [/grid]
[/resolution]
