CoriEngine
Loading...
Searching...
No Matches
Cori::Core::Internal::ImGuiLayer Class Referencefinal

#include <ImGuiLayer.hpp>

Inheritance diagram for Cori::Core::Internal::ImGuiLayer:
Collaboration diagram for Cori::Core::Internal::ImGuiLayer:

Public Member Functions

 ImGuiLayer ()
 ~ImGuiLayer () override
void OnAttach () override
 Method that runs when the layer gets attached to the LayerStack.
void OnDetach () override
 Method that runs when the layer gets detached to the LayerStack.
void OnEvent (Event &event) override
 This is the method to handle all the event at.
void StartFrame ()
void EndFrame ()
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.
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

Detailed Description

Definition at line 7 of file ImGuiLayer.hpp.

Constructor & Destructor Documentation

◆ ImGuiLayer()

Cori::Core::Internal::ImGuiLayer::ImGuiLayer ( )

Definition at line 10 of file ImGuiLayer.cpp.

Here is the call graph for this function:

◆ ~ImGuiLayer()

Cori::Core::Internal::ImGuiLayer::~ImGuiLayer ( )
override

Definition at line 37 of file ImGuiLayer.cpp.

Member Function Documentation

◆ BindScene()

std::expected< void, CoriError<> > Cori::Core::Layer::BindScene ( const std::string & name)
inherited

Binds the Scene to the Layer.

Parameters
nameName of the Scene to bind.
Returns
Expected object with void on success or CoriError<> on failure.

Definition at line 26 of file Layer.cpp.

Here is the call graph for this function:

◆ EndFrame()

void Cori::Core::Internal::ImGuiLayer::EndFrame ( )

Definition at line 73 of file ImGuiLayer.cpp.

◆ GetName()

std::string_view Cori::Core::Layer::GetName ( ) const
inlinenodiscardinherited

Returns the name of the Layer.

Returns
String view, so read only.

Definition at line 72 of file Layer.hpp.

◆ IsModal()

bool Cori::Core::Layer::IsModal ( ) const
inlinenodiscardinherited

Checks if the Layer is modal.

Definition at line 66 of file Layer.hpp.

◆ OnAttach()

void Cori::Core::Internal::ImGuiLayer::OnAttach ( )
overridevirtual

Method that runs when the layer gets attached to the LayerStack.

Reimplemented from Cori::Core::Layer.

Definition at line 41 of file ImGuiLayer.cpp.

◆ OnDetach()

void Cori::Core::Internal::ImGuiLayer::OnDetach ( )
overridevirtual

Method that runs when the layer gets detached to the LayerStack.

Reimplemented from Cori::Core::Layer.

Definition at line 45 of file ImGuiLayer.cpp.

◆ OnEvent()

void Cori::Core::Internal::ImGuiLayer::OnEvent ( Event & event)
overridevirtual

This is the method to handle all the event at.

Parameters
eventEvent to handle or skip.

Reimplemented from Cori::Core::Layer.

Definition at line 53 of file ImGuiLayer.cpp.

Here is the call graph for this function:

◆ OnImGuiRender()

virtual void Cori::Core::Layer::OnImGuiRender ( GameTimer & gameTimer)
inlinevirtualinherited

Run every frame, this is the method where you do all the ImGui stuff.

Parameters
gameTimerGlobal timer.

Definition at line 46 of file Layer.hpp.

◆ OnTickUpdate()

virtual void Cori::Core::Layer::OnTickUpdate ( GameTimer & gameTimer)
inlinevirtualinherited

Run every tick.

Parameters
gameTimerGlobal timer.

Definition at line 39 of file Layer.hpp.

◆ OnUpdate()

virtual void Cori::Core::Layer::OnUpdate ( GameTimer & gameTimer)
inlinevirtualinherited

Run every frame.

Parameters
gameTimerGlobal timer.

Definition at line 33 of file Layer.hpp.

◆ SetModal()

void Cori::Core::Layer::SetModal ( const bool state)
inlineinherited

Change the Layer modal state.

Parameters
stateDesired 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.

Definition at line 61 of file Layer.hpp.

◆ StartFrame()

void Cori::Core::Internal::ImGuiLayer::StartFrame ( )

Definition at line 65 of file ImGuiLayer.cpp.

◆ UnbindScene()

std::expected< void, CoriError<> > Cori::Core::Layer::UnbindScene ( )
inherited

Unbinds the Scene from the Layer.

Returns
Expected object with void on success or CoriError<> on failure.

Definition at line 47 of file Layer.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ ActiveScene

World::SceneHandle Cori::Core::Layer::ActiveScene { nullptr }
inherited

A SceneHandle to the Scene that is currently bound.

Definition at line 90 of file Layer.hpp.

◆ m_DebugImGuiRenderer

Physics::DebugImguiRenderer Cori::Core::Layer::m_DebugImGuiRenderer
inlinestaticinherited

Definition at line 92 of file Layer.hpp.


The documentation for this class was generated from the following files: