|
CoriEngine
|
An abstract class that is ment to be used as a template for defining layers. More...
#include <Layer.hpp>


Public Member Functions | |
| Layer (std::string name) | |
| virtual | ~Layer () |
| virtual void | OnAttach () |
| Method that runs when the layer gets attached to the LayerStack. | |
| virtual void | OnDetach () |
| Method that runs when the layer gets detached to the LayerStack. | |
| virtual void | OnUpdate (GameTimer &gameTimer) |
| Run every frame. | |
| virtual void | OnTickUpdate (GameTimer &gameTimer) |
| Run every tick. | |
| virtual void | OnImGuiRender (GameTimer &gameTimer) |
| Run every frame, this is the method where you do all the ImGui stuff. | |
| virtual void | OnEvent (Event &event) |
| This is the method to handle all the event at. | |
| void | SetModal (const bool state) |
| Change the Layer modal state. | |
| bool | IsModal () const |
| Checks if the Layer is modal. | |
| std::string_view | GetName () const |
| Returns the name of the Layer. | |
| std::expected< void, CoriError<> > | BindScene (const std::string &name) |
| Binds the Scene to the Layer. | |
| std::expected< void, CoriError<> > | UnbindScene () |
| Unbinds the Scene from the Layer. | |
Public Attributes | |
| World::SceneHandle | ActiveScene { nullptr } |
| A SceneHandle to the Scene that is currently bound. | |
Static Public Attributes | |
| static Physics::DebugImguiRenderer | m_DebugImGuiRenderer |
Friends | |
| class | Application |
An abstract class that is ment to be used as a template for defining layers.
|
virtual |
| std::expected< void, CoriError<> > Cori::Core::Layer::BindScene | ( | const std::string & | name | ) |
Binds the Scene to the Layer.
| name | Name of the Scene to bind. |
Definition at line 26 of file Layer.cpp.

|
inlinenodiscard |
|
inlinenodiscard |
|
virtual |
Method that runs when the layer gets attached to the LayerStack.
Reimplemented in Cori::Core::Internal::ImGuiLayer.
Definition at line 18 of file Layer.cpp.

|
virtual |
Method that runs when the layer gets detached to the LayerStack.
Reimplemented in Cori::Core::Internal::ImGuiLayer.
Definition at line 22 of file Layer.cpp.

|
inlinevirtual |
This is the method to handle all the event at.
| event | Event to handle or skip. |
Reimplemented in Cori::Core::Internal::ImGuiLayer.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
Change the Layer modal state.
| state | Desired state. @detail When Layer is in a modal state all events that are passed to it will be considered handled and will not be passed further down the LayerStack. Also when a layer is modal any layer below it will not be updated, both tick update and frame update, it effectively stops any logic execution in the layers below it. |
| std::expected< void, CoriError<> > Cori::Core::Layer::UnbindScene | ( | ) |
Unbinds the Scene from the Layer.
Definition at line 47 of file Layer.cpp.

|
friend |
| World::SceneHandle Cori::Core::Layer::ActiveScene { nullptr } |
|
inlinestatic |