#ifndef VDNPCEDITOR_H
#define VDNPCEDITOR_H



/* **********************************************************************************************************************
   Included Header Files
   **********************************************************************************************************************/

#include <windows.h>
#include <list>
#include "VDNPC.h"
#include "VDSprite.h"
#include "VDError.h"
#include "Resource.h"
using namespace std;



/* **********************************************************************************************************************
   VDNPCEditor
   **********************************************************************************************************************/

class VDNPCEditor {
public:
    VDNPCEditor();
    ~VDNPCEditor();

    void FreeMemory();
    HWND CreateNPCEditor(HINSTANCE instance, HWND parentWindow, LPCSTR className);
    void ProcessNPCEditor(LPDIRECT3DDEVICE9 direct3DDevice, vector<VDNPC>* npcs);
    BOOL AddNPC(vector<VDNPC>* npcs, LPCSTR name, LPCSTR imageFileLocation);
    void RemoveNPC(vector<VDNPC>* npcs, LPCSTR name);
    void AddNPCDialogue(vector<VDNPC>* npcs, LPCSTR npcName, int id, LPCSTR text);
    void RemoveNPCDialogue(vector<VDNPC>* npcs, LPCSTR name, int id);
    void AddNPCDialogueOption(vector<VDNPC>* npcs, LPCSTR name, int dialogueID, LPCSTR text, int nextID);
    void RemoveNPCDialogueOption(vector<VDNPC>* npcs, LPCSTR npcName, int dialogueID, LPCSTR optionName);
    void VDOpenFile(HWND window, LPSTR filter, LPSTR fileName);
    void WriteNPCs(vector<VDNPC>* npcs);
    void CreateNPCTexture(LPDIRECT3DDEVICE9 direct3DDevice, LPCSTR npcName);

        VDNPC GetNPC(LPCSTR aName, vector<VDNPC>* npcs);
         HWND GetWindow();
         HWND GetNPCListBox();
         HWND GetNameEditBox();
         HWND GetLoadSpriteButton();
    VDSprite* GetNPCSpriteSheet();
       LPCSTR GetNPCSpriteSheetLocation();
       LPRECT GetNPCSpriteDimensions(LPRECT outRect);
    VDSprite* GetNPCSprite();
         HWND GetShiftNPCUp();
         HWND GetShiftNPCDown();
         HWND GetPreviousAnimation();
         HWND GetNextAnimation();
         HWND GetRemoveNPCButton();
         HWND GetSaveNPCButton();
         HWND GetDialogueListBox();
         HWND GetTextEditBox();
         HWND GetTextIDEditBox();
         HWND GetRemoveDialogueButton();
         HWND GetSaveDialogueButton();
         HWND GetOptionsListBox();
         HWND GetTextEditBox2();
         HWND GetTextIDEditBox2();
         HWND GetRemoveOptionButton();
         HWND GetSaveOptionButton();
         HWND GetSaveChangesButton();
private:
         HWND window;
         HWND npcListBox;
         char npcEditorPreviousNPCSelection[FILE_NAME_MAX_SIZE];
         HWND nameEditBox;
         HWND loadSpriteButton;
    VDSprite* npcSpriteSheet;
         char npcSpriteSheetLocation[FILE_NAME_MAX_SIZE];
         RECT npcSpriteDimensions;
    VDSprite* npcSprite;
         char npcSpriteImageLocation[FILE_NAME_MAX_SIZE];
         HWND shiftNPCUp;
         HWND shiftNPCDown;
         HWND previousAnimation;
         HWND nextAnimation;
         HWND removeNPCButton;
         HWND saveNPCButton;
         HWND dialogueListBox;
         char npcEditorPreviousDialogueSelection[FILE_NAME_MAX_SIZE];
         HWND textEditBox;
         HWND textIDEditBox;
         HWND removeDialogueButton;
         HWND saveDialogueButton;
         HWND optionListBox;
         char npcEditorPreviousOptionSelection[FILE_NAME_MAX_SIZE];
         HWND textEditBox2;
         HWND textIDEditBox2;
         HWND removeOptionButton;
         HWND saveOptionButton;
         HWND saveChangesButton;
};



#endif  // VDNPCEDITOR_H