/* =============================================================================================
 *
 * This file is included into The Dark Mod's Main Menu GUI.
 *
 * Mission Authors: You CAN safely edit and include in your PK4. 
 *
 * When this file is included in your PK4 as "guis/mainmenu_background_custom.gui", it will
 * override the standard TDM file with the same name and the definitions within.
 *
 * stgatilov: You can add mission-specific background layers here.
 * See mainmenu_background.gui for examples of background layers used in core game.
 * Make sure to use macro BACKGROUND_DEFAULT_BEHAVIOR or maintain the same naming convention and behavior.
 * Note that relative order of layers cannot be changed.
 *
 * ============================================================================================= */
windowDef customBackground1
{
    rect 0, 0, 640, 480
    visible 1
		
    BACKGROUND_DEFAULT_BEHAVIOR(customBackground1)

   renderDef MainMenuBackgroundObjectCottage
    {
        rect 		0,0,400,480
        matcolor	1, 1, 1, 1
        visible		1
        model 		"models/darkmod/map_specific/blackheart_manor/menu_cottage.lwo"
        needsRender 	1
        modelRotate 	10, time * 0.003, 0, 0
        modelOrigin 	5, 17, 0, 0
        viewOffset 		0, 0, 0, 0
        lightOrigin 	0, 0, 0, 0
        lightColor 		0.1, 0.12, 0.15, 1
        notime		1
    }
	
	renderDef MainMenuBackgroundObjectTree
    {
        rect 		0,0,400,480
        matcolor	1, 1, 1, 1
        visible		1
        model 		"models/darkmod/map_specific/blackheart_manor/menu_tree.lwo"
        needsRender 	1
        modelRotate 	10, time * 0.003, 0, 0
        modelOrigin 	5, 17, 0, 0
        viewOffset 		0, 0, 0, 0
        lightOrigin 	0, 0, 0, 0
        lightColor 		0.1, 0.12, 0.15, 1
        notime		1
    }
    
    renderDef MainMenuBackgroundObjectAmulet
    {
        rect 		0,0,300,480
        matcolor	1, 1, 1, 1
        visible		1
        model 		"models/darkmod/map_specific/blackheart_manor/menu_amulet.lwo"
        needsRender 	1
        modelRotate 	-10, 240, 90, 0
        modelOrigin 	0, 0, 0, 0
        viewOffset 		-6, -20, 0, 0
        lightOrigin 	-6, 0, 0, 0
        lightColor 		0.3, 0.35, 0.4, 1
        notime		1
    }
    	
    windowDef MainMenuBackgroundObjectsAnimation
    {
        rect	0,0,640,640
        visible	1

        onTime 0 {
            transition "MainMenuBackgroundObjectAmulet::modelRotate" "-10, 240, 90, 0" "10, 300, 70, 0" 10000 ;
        }
        
        onTime 10000 {
            transition "MainMenuBackgroundObjectAmulet::modelRotate" "10, 300, 70, 0" "10, 280, 90, 0" 10000 ;
        }
        
        onTime 20000 {
            transition "MainMenuBackgroundObjectAmulet::modelRotate" "10, 280, 90, 0" "10, 260, 70, 0" 10000 ;
        }

        onTime 30000 {
            transition "MainMenuBackgroundObjectAmulet::modelRotate" "10, 260, 70, 0" "-10, 240, 90, 0" 10000 ;
        }
        
        onTime 40000 {
            resetTime 0;
        }
    }


	/* windowDef MainMenuBlueOnRightBecauseAmadeusWantsItSoBad
	{
		rect	0, 0, 640, 480
		matcolor	1 ,1 ,1 ,0.8
		background	"guis/assets/mainmenu/background_bm"
	} */
// The background parchment for the main menu
windowDef MainMenuParchment
{
		rect		280, 0, 320, 640
		matcolor	1, 1, 1, 0
		background "guis/assets/mainmenu/parchment_mainmenu"
		visible 1
}

windowDef MainMenuIvy1
	{
		rect		470, -30, 200, 200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy_corner1"
		visible 1
	}
	
windowDef MainMenuIvy2
	{
		rect		-20, -20, 200, -200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy_corner2"
		visible 1
	}
	
	windowDef MainMenuIvy3
	{
		rect		-20, 310, -200, -200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy_corner1"
		visible 1
	}
	
	windowDef MainMenuIvy4
	{
		rect		460, 300, 200, -200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy_corner1"
		visible 1
	}
	
	windowDef MainMenuIvy5
	{
		rect		320, 280, 200, -200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy1"
		visible 1
	}
	
	windowDef MainMenuIvy6
	{
		rect		80, 0, 200, 200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy1"
		visible 1
	}
	
	windowDef MainMenuIvy7
	{
		rect		-10, 100, 200, 200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy2"
		rotate		87
		visible 1
	}
	
	windowDef MainMenuIvy8
	{
		rect		250, -30, 400, 200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy_title"
		visible 1
	}
	
	windowDef MainMenuIvy9
	{
		rect		455, 160, 200, 200
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menuivy2"
		rotate		-93
		visible 1
	}
	
	windowDef MainMenuGear1
	{
		rect		350, 20, 64, 64
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menugear1"
		rotate		time * -0.1
		visible 1
	}
	
	windowDef MainMenuGear2
	{
		rect		385, 60, 64, 64
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menugear1"
		rotate		time * 0.1
		visible 1
	}
	
	windowDef MainMenuGear3
	{
		rect		437, 48, 64, 64
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menugear1"
		rotate		time * -0.1
		visible 1
	}
	
	windowDef MainMenuGear4
	{
		rect		484, 26, 64, 64
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menugear1"
		rotate		time * 0.1
		visible 1
	}
	
	windowDef MainMenuGearLarge1
	{
		rect		280, 15, 128, 128
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menugear2"
		rotate		time * 0.1
		visible 1
	}
	
	windowDef MainMenuTitle
	{
		rect		320, 0, 280, 160
		matcolor	1, 1, 1, 1
		background "guis/assets/mainmenu/bm_menutitle"
		visible 1
	}

	onTime 0 {
		// Amulet
			transition "MainMenuBackgroundObjectAmulet::viewOffset" "-6, -13, 0, 0" "-6, 0, 0, 0" 750 ;
		// Ivy borders
			transition "MainMenuIvy1::matcolor" "1 1 1 0" "1 1 1 1" "750";
			transition "MainMenuIvy2::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy3::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy4::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy5::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy6::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy7::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy8::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuIvy9::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
		// Gears
			transition "MainMenuGearLarge1::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuGear1::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuGear2::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuGear3::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
			transition "MainMenuGear4::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
		// BM Title
			transition "MainMenuTitle::matcolor" "1 1 1 0" "1 1 1 1" "750" ;
	}
}