#pragma once
#include "gamestate.h"

#include "LDTypes.h"
#include "Unit.h"
#include "Universe.h"



class CGSShop : public CGameState
{

  public:

    enum ShopItemType
    {
      SIT_NONE,
      SIT_PLANETARY_VEHICLE,
      SIT_SPACE_ENGINE,
      SIT_PLANETARY_OXYGEN,
      SIT_PLANETARY_WEAPON,
      SIT_RADAR
    };

    struct ShopItem
    {
      ShopItemType      Type;
      std::string       Name;
      std::string       Desc;
      long long         Cost;
      LD::ShopItem      Item;

      ShopItem( ShopItemType Type = SIT_NONE, const std::string& Name = std::string(), const std::string& Desc = std::string(), long long Cost = 0, LD::ShopItem Item = LD::SI_NONE ) :
        Type( Type ),
        Name( Name ),
        Desc( Desc ),
        Cost( Cost ),
        Item( Item )
      {
      }
    };

    std::vector<ShopItem>   m_ShopItems;

    int                     m_ItemDisplayOffset;



    CGSShop();
    virtual ~CGSShop();

    virtual void            Display( IDirect3DDevice8* pDevice );

    virtual void            UpdateFrame( const float fElapsedTime );

    void                    DisplayItem( int X, int Y, ShopItem& Item );

    virtual void            OnChar( int iChar );
    virtual void            OnKeyDown( int iChar );
    virtual void            OnMouse( int X, int Y, int Buttons );

    void                    SellResources();

};
