#include "ui/menudef.h"

{

    menuDef {
	name "ingame_leave"
	visible 0
	fullscreen 0
	//outOfBoundsClick			// this closes the window if it gets a click out of the rectangle
	onOOBClick { close _self ; open _prev }
	rect 496 64 128 112
	disableColor  .5 .5 .5 1
	focusColor 1 .75 0 1			// Menu focus color for text and items
	style 1
	shadowStyle 1
	onOpen { play "sound/misc/menu1.wav" ; show grpMenu ; hide grpConfirm }

//Window

    itemdef {
	rect 0 0 128 112
	style WINDOW_STYLE_FILLED
	backcolor Ig_Window_Color
	visible 1
	border 1
	bordersize 1
	bordercolor Ig_Window_BorderColor
	decoration
    }

    itemdef {
	rect 9 1 120 24
	style WINDOW_STYLE_SHADER
	background "ui/assets/rq3-ingame-title"
	visible 1
	decoration
    }

    itemdef {
	rect 9 1 120 24
	style WINDOW_STYLE_EMPTY
	forecolor Ig_Window_TitleColor
	textstyle ITEM_TEXTSTYLE_NORMAL
	textscale .225
	textalign ITEM_ALIGN_LEFT
	textalignx 24
	textaligny 16
	text "Exit Reaction"
	visible 1
	decoration
    }


//Options

    itemdef {
	name leave
	text "^_M^_ain Menu"
	shortcutKey "M"
	group grpMenu
	style WINDOW_STYLE_EMPTY
	rect 0 34 128 20
	type ITEM_TYPE_BUTTON
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	forecolor 1 1 1 1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpMenu ; show leaveConfirm }
    }

    itemdef {
	name leave
	group grpMenu
	text "^_R^_estart"
	shortcutKey "R"
	style WINDOW_STYLE_EMPTY
	type ITEM_TYPE_BUTTON
	rect 0 54 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	forecolor  1 1 1 1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpMenu ; show restartConfirm }
    }

    itemdef {
	name leave
	group grpMenu
	type ITEM_TYPE_BUTTON
	text "^_Q^_uit"
	shortcutKey "Q"
	style WINDOW_STYLE_EMPTY
	rect 0 74 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	forecolor  1 1 1 1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpMenu ; show quitConfirm }
    }

    // CONFIRMS	//

    itemdef {
	name leaveConfirm
	text "Exit to"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 33 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	decoration
	forecolor 1 1 1 1
	visible 1
    }

    itemdef {
	name leaveConfirm
	text "Main Menu?"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 50 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	decoration
	forecolor 1 1 1 1
	visible 1
    }

    itemdef {
	name leaveConfirm
	text "^_Y^_es"
	shortcutKey "Y"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 18 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { uiScript leave }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

    itemdef {
	name leaveConfirm
	text "^_N^_o"
	shortcutKey "N"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 70 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpConfirm ; show grpMenu }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

    itemdef {
	name restartConfirm
	text "Want to"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 33 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	decoration
	forecolor 1 1 1 1
	visible 1
    }

    itemdef {
	name restartConfirm
	text "Restart Map?"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 50 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	decoration
	forecolor 1 1 1 1
	visible 1
    }

    itemdef {
	name restartConfirm
	text "^_Y^_es"
	shortcutKey "Y"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 18 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { play "sound/misc/menu1.wav" ; exec "map_restart" ; close ingame_leave ; close ingame }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

    itemdef {
	name restartConfirm
	text "^_N^_o"
	shortcutKey "N"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 70 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpConfirm ; show grpMenu }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

    itemdef {
	name quitConfirm
	text "Want to"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 33 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	forecolor 1 1 1 1
	decoration
	visible 1
    }

    itemdef {
	name quitConfirm
	text "Quit Game?"
	group grpConfirm
	style WINDOW_STYLE_EMPTY
	rect 0 50 128 20
	textalign 1
	textalignx 64
	textaligny 18
	textscale .225
	forecolor 1 1 1 1
	decoration
	visible 1
    }

    itemdef {
	name quitConfirm
	text "^_Y^_es"
	shortcutKey "Y"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 18 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { uiScript quit }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

    itemdef {
	name quitConfirm
	text "^_N^_o"
	shortcutKey "N"
	group grpConfirm
	type ITEM_TYPE_BUTTON
	textscale .225
	style WINDOW_STYLE_FILLED
	rect 70 80 40 16
	textalign 1
	textalignx 20
	textaligny 12
	forecolor 1 1 1 1
	border 1
	bordersize 1
	backcolor Ig_Sub_Color1
	forecolor Ig_Sub_TextColor
	bordercolor Ig_Sub_BorderColor1
	visible 1
	action { play "sound/misc/menu1.wav" ; hide grpConfirm ; show grpMenu }
	onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 }
	leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 }
    }

}
}
