#include "ui/menudef.h"
#include "ui/menumacros.h"

// Defines //
#define WINDOW_X		16
#define WINDOW_Y		16
#define WINDOW_WIDTH	310
#define WINDOW_HEIGHT	196
#define GROUP_NAME		"grpIngameVoteBot"

// Omni-bot Menu //
menuDef {
	name		"ingame_vote_bot"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED

	onEsc {
		close ingame_vote_bot;
		open ingame_vote
	}

// Window //
	WINDOW( "OMNI-BOT", 50)

// notes: - this menu can be done more flexible but for this we have to add some ui code/cvars
//          to run bot commands - for now it does the trick for listen server beginners to adjust
//          some basic bot options

	LABEL( 6, 32, .3*(WINDOW_WIDTH-12), 14, _("Bot count:"), .24, ITEM_ALIGN_LEFT, 0, 10 )
	BUTTON( 100, 32, .08*(WINDOW_WIDTH-12), 14, "^_8", .24, 11, exec "bot maxbots 8")
	BUTTON( 135, 32, .08*(WINDOW_WIDTH-12), 14, "1^_2", .24, 11, exec "bot maxbots 12")
	BUTTON( 170, 32, .08*(WINDOW_WIDTH-12), 14, "1^_6", .24, 11, exec "bot maxbots 16")
	BUTTON( 205, 32, .08*(WINDOW_WIDTH-12), 14, "2^_0", .24, 11, exec "bot maxbots 20")
	BUTTON( 240, 32, .08*(WINDOW_WIDTH-12), 14, "2^_4", .24, 11, exec "bot maxbots 24")
	BUTTON( 275, 32, .08*(WINDOW_WIDTH-12), 14, "^_32", .24, 11, exec "bot maxbots 32")

	LABEL( 6, 50, .3*(WINDOW_WIDTH-12), 14, _("Move skill:"), .24, ITEM_ALIGN_LEFT, 0, 10 )
	BUTTON( 100, 50, .08*(WINDOW_WIDTH-12), 14, "M1", .24, 11, exec "bot moveskill 1")
	BUTTON( 135, 50, .08*(WINDOW_WIDTH-12), 14, "M2", .24, 11, exec "bot moveskill 2")
	BUTTON( 170, 50, .08*(WINDOW_WIDTH-12), 14, "M3", .24, 11, exec "bot moveskill 3")
	BUTTON( 205, 50, .32*(WINDOW_WIDTH-12), 14, _("RANDOM"), .24, 11, exec "bot moveskill 4")

	LABEL( 6, 68, .3*(WINDOW_WIDTH-12), 14, _("Difficulty:"), .24, ITEM_ALIGN_LEFT, 0, 10 )
	BUTTON( 100, 68, .08*(WINDOW_WIDTH-12), 14, "D1", .24, 11, exec "bot difficulty 1")
	BUTTON( 135, 68, .08*(WINDOW_WIDTH-12), 14, "D2", .24, 11, exec "bot difficulty 2")
	BUTTON( 170, 68, .08*(WINDOW_WIDTH-12), 14, "D3", .24, 11, exec "bot difficulty 3")
	BUTTON( 205, 68, .08*(WINDOW_WIDTH-12), 14, "D4", .24, 11, exec "bot difficulty 4")
	BUTTON( 240, 68, .08*(WINDOW_WIDTH-12), 14, "D5", .24, 11, exec "bot difficulty 5")
	BUTTON( 275, 68, .08*(WINDOW_WIDTH-12), 14, "D6", .24, 11, exec "bot difficulty 6")

	BUTTON( 6, 88, WINDOW_WIDTH-12, 14, _("KICK ALL BOTS"), .24, 11, exec "bot minbots -1;bot maxbots -1;bot kickall" )

	BUTTON( 6, 104, .33*(WINDOW_WIDTH-24), 14, _("AXIS BOTS"), .24, 11, exec "set g_teamForceBalance 0; bot balanceteams 0; bot botteam 1; bot humanteam 2; bot kickall" )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6, 104, .34*(WINDOW_WIDTH-24), 14, _("ALLIED BOTS"), .24, 11, exec "set g_teamForceBalance 0; bot balanceteams 0; bot botteam 2; bot humanteam 1; bot kickall" )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6+.34*(WINDOW_WIDTH-24)+6, 104, .33*(WINDOW_WIDTH-24), 14, _("BALANCED"), .24, 11, exec "set g_teamForceBalance 1; bot balanceteams 1; bot botteam -1" )

	BUTTON( 6, WINDOW_HEIGHT-24, .33*(WINDOW_WIDTH-24), 18, _("MSGID_MENU_INGAME_REFEREE_BOTS_BOTS_ON"), .3, 14, exec "set omnibot_enable 1" )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6, WINDOW_HEIGHT-24, .34*(WINDOW_WIDTH-24), 18, _("MSGID_MENU_INGAME_REFEREE_BOTS_BOTS_OFF"), .3, 14, exec "bot minbots -1; bot maxbots -1;bot kickall;set omnibot_enable 0" )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6+.34*(WINDOW_WIDTH-24)+6, WINDOW_HEIGHT-24, .33*(WINDOW_WIDTH-24), 18, _("MSGID_MENU_BACK"), .3, 14, close ingame_vote_bot ; open ingame_vote )
}
