/******************************************************************************
*	File		-	world_view.h
*	Author		-	Joey Pollack
*	Date		-	2022/01/26 (y/m/d)
*	Mod Date	-	2022/01/26 (y/m/d)
*	Description	-	A rendered view of the world
******************************************************************************/

#ifndef WORLD_VIEW_H_
#define WORLD_VIEW_H_

#include <gui/panel.h>

namespace lunarium 
{ 
    class Image;
    class World;   
    
namespace editor
{
    class Editor;
    class WorldView : public Panel
    {
    public:
        WorldView();
        void DoFrame();

        void Update(float delta) override;

        void SetWorld(World* pWorld);
        World* GetWorld();

    private:
        lunarium::World* mpWorld;
        Editor* mpEditor;
        int mPrevWidth;
        int mPrevHeight;
        int mFrameBuffer;
        Image* mpCanvasImage;
    };
    
}}  // lunarium::editor

#endif  // WORLD_VIEW_H_