/*
 * TowerGUI.h
 *
 *  Created on: 5 nov. 2020
 *      Author: Persson-dev
 */

#pragma once

#include <memory>

#include "client/render/gui/GuiManager.h"

struct SDL_Window;
typedef void* SDL_GLContext;

namespace td {

namespace client {

class Client;

} // namespace client

namespace render {

class Renderer;

class TowerGui {
private:
	SDL_Window* m_Window;
	SDL_GLContext m_GlContext;
	td::render::Renderer* m_Renderer;
	td::gui::GuiManager m_GuiManager;
	std::unique_ptr<td::client::Client> m_Client;
public:
	TowerGui(SDL_Window* wndow, SDL_GLContext glContext, td::render::Renderer* renderer);
	~TowerGui();

	void Render();
private:
	void InitWidgets();
	void Tick();
	void BeginFrame();
	void EndFrame();
};

} // namespace render
} // namespace td
