Peoplemon  0.1.0
Peoplemon 3 game source documentation
EditMapComponent.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_COMPONENTS_RENDER_EDITMAPCOMPONENT_HPP
2 #define EDITOR_COMPONENTS_RENDER_EDITMAPCOMPONENT_HPP
3 
4 #include <BLIB/Graphics/Sprite.hpp>
5 #include <BLIB/Interfaces/GUI/Renderer/Component.hpp>
6 #include <BLIB/Render.hpp>
7 
8 namespace editor
9 {
10 namespace component
11 {
12 namespace rdr
13 {
17 class EditMapComponent : public bl::gui::rdr::Component {
18 public:
23 
27  virtual ~EditMapComponent() = default;
28 
32  bl::rc::RenderTarget* getTarget() {
33  return renderTexture ? renderTexture.operator->() : nullptr;
34  }
35 
36 private:
37  bl::engine::Engine* enginePtr;
38  bl::rc::vk::RenderTexture::Handle renderTexture;
39  bl::gfx::Sprite sprite;
40 
41  virtual void setVisible(bool visible) override;
42  virtual void onElementUpdated() override;
43  virtual void onRenderSettingChange() override;
44  virtual bl::ecs::Entity getEntity() const override;
45  virtual void doCreate(bl::engine::Engine& engine, bl::gui::rdr::Renderer& renderer) override;
46  virtual void doSceneAdd(bl::rc::Overlay* overlay) override;
47  virtual void doSceneRemove() override;
48  virtual void handleAcquisition() override;
49  virtual void handleMove() override;
50 };
51 
52 } // namespace rdr
53 } // namespace component
54 } // namespace editor
55 
56 #endif
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
GUI renderer component for the map itself.
bl::rc::RenderTarget * getTarget()
Returns the render target the map is being rendered to.
virtual ~EditMapComponent()=default
Destroys the component.