2018-07-06 14:24:49 +02:00
|
|
|
/*
|
|
|
|
* =====================================================================================
|
|
|
|
*
|
|
|
|
* Filename: HUD.hpp
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Created: 06/07/2018 13:58:33
|
|
|
|
*
|
|
|
|
* Author: Quentin Bazin, <quent42340@gmail.com>
|
|
|
|
*
|
|
|
|
* =====================================================================================
|
|
|
|
*/
|
|
|
|
#ifndef HUD_HPP_
|
|
|
|
#define HUD_HPP_
|
|
|
|
|
|
|
|
#include "BlockCursor.hpp"
|
2018-07-06 15:08:13 +02:00
|
|
|
#include "BlockInfoWidget.hpp"
|
2018-07-06 14:24:49 +02:00
|
|
|
#include "Crosshair.hpp"
|
|
|
|
#include "DebugOverlay.hpp"
|
|
|
|
#include "Hotbar.hpp"
|
|
|
|
|
|
|
|
class HUD : public Transformable, public IDrawable {
|
|
|
|
public:
|
2018-12-25 23:14:39 +01:00
|
|
|
HUD(Player &player, World &world, glm::mat4 &viewMatrix, glm::mat4 &projectionMatrix);
|
2018-07-06 14:24:49 +02:00
|
|
|
|
2018-12-26 18:36:46 +01:00
|
|
|
void onEvent(const sf::Event &event);
|
2018-07-06 14:24:49 +02:00
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void draw(RenderTarget &target, RenderStates states) const override;
|
|
|
|
|
|
|
|
Shader m_shader;
|
|
|
|
|
|
|
|
Hotbar m_hotbar;
|
|
|
|
|
|
|
|
glm::vec4 m_selectedBlock{0, 0, 0, -1};
|
|
|
|
BlockCursor m_blockCursor;
|
|
|
|
Crosshair m_crosshair;
|
|
|
|
|
|
|
|
DebugOverlay m_debugOverlay;
|
|
|
|
bool m_isDebugOverlayVisible = false;
|
2018-07-06 15:08:13 +02:00
|
|
|
|
|
|
|
BlockInfoWidget m_blockInfoWidget;
|
2018-07-06 14:24:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HUD_HPP_
|