//---------------------------------------------------------------------------------------------------------------------------------------------------
// <copyright file="TitleScreen.cs" company="DarkWynter Studios">
//     Copyright (C)2007 DarkWynter Studios.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------------------------------------------------------------------------------------
// {Contact : darkwynter.com for licensing information
//---------------------------------------------------------------------------------------------------------------------------------------------------
//

namespace DarkWynter.Engine.Menus.GameScreens
{
    #region Using Statements
    using System;
    using System.Collections.Generic;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Audio;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Storage;
    using DarkWynter.Engine.Menus;
    using DarkWynter.Engine.Controllers;
    using DarkWynter.Engine.Globals;
    using DarkWynter.Stream;
    #endregion

    //using Scurvy.Media;

    /// <summary>
    /// Our Starting Title Screen.
    /// Snowflake graphic thanks to Robert Redwood http://www.easyelements.com/photoshop-snowflake-brush-set.html
    /// </summary>
    public class TitleScreen : GameScreen
    {

        Texture2D snowFlake;
        Vector2 location;
        Vector2 scale;
        float rotation;
        float frontBack;

        Vector2 backgroundLocation; 
        Vector2 backgroundOrigin;

        Random rand = new Random();

        /// <summary>
        /// Title Screen constructor.
        /// </summary>
        public TitleScreen(Enums_Engine.EngineState GameEngineState)
            : base(GameEngineState)
        {

            //Instantiate the GameMenu
            // Title screen will only have the splash image
            menu = new GameMenu("", Statics_Stream.RenderSettings.GAME_WINDOW_WIDTH / 2, Statics_Stream.RenderSettings.GAME_WINDOW_HEIGHT / 2);

            // Game Screen Backgrounds
            // Check for widescreen and load appropriatly
            if ((Statics_Stream.RenderSettings.GAME_WINDOW_WIDTH) / Statics_Stream.RenderSettings.GAME_WINDOW_HEIGHT > 1.5)
            {
                // Load the textures for the game screens
                SetBackground(Statics_Engine.SystemSettings.content.Load<Texture2D>("Content/_textures/TitleScreen_wide"), 1.0f);
            }
            else
            {
                // Load the textures for the game screens
                SetBackground(Statics_Engine.SystemSettings.content.Load<Texture2D>("Content/_textures/TitleScreen_wide"), 1.0f);
                
                snowFlake = Statics_Engine.SystemSettings.content.Load<Texture2D>("Content/_textures/thoughtImage");
                location = new Vector2(200, 0);
                rotation = 0.0f;
                scale = new Vector2(0.5f, 0.5f);

            }

            //Video vid = Statics_Engine.SystemSettings.content.Load<Video>("Content/_video/ElementalGame114");
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            //now draw the menu elements
            menu.Draw(spriteBatch);

        }
    }
}