refactor: create gui widget classes
This commit is contained in:
27
include/render/gui/MobTooltip.h
Normal file
27
include/render/gui/MobTooltip.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "GuiWidget.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
namespace game {
|
||||
|
||||
class Mob;
|
||||
|
||||
} // namespace game
|
||||
|
||||
namespace gui {
|
||||
|
||||
class MobTooltip : public GuiWidget {
|
||||
private:
|
||||
const game::Mob* m_Mob;
|
||||
public:
|
||||
MobTooltip(client::Client* client);
|
||||
|
||||
virtual void render();
|
||||
|
||||
void setMob(const game::Mob* mob) { m_Mob = mob; }
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
} // namespace td
|
||||
22
include/render/gui/TowerPlacePopup.h
Normal file
22
include/render/gui/TowerPlacePopup.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "GuiWidget.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace td {
|
||||
namespace gui {
|
||||
|
||||
class TowerPlacePopup : public GuiWidget {
|
||||
private:
|
||||
glm::vec2 m_ClickWorldPos;
|
||||
public:
|
||||
TowerPlacePopup(client::Client* client);
|
||||
|
||||
virtual void render();
|
||||
|
||||
void setClickPos(const glm::vec2& worldPos);
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user