QuasarEngine
Cross-platform 3D engine and editor
Toggle main menu visibility
Loading...
Searching...
No Matches
ImGuiLayer.h
Go to the documentation of this file.
1
#pragma once
2
7
8
#include <
quasar/core/Layer.h
>
9
#include <
quasar/events/Event.h
>
10
11
namespace
Quasar
12
{
13
class
Window
;
14
30
class
ImGuiLayer
final :
public
Layer
31
{
32
public
:
35
explicit
ImGuiLayer
(
Window
& window);
36
38
void
OnAttach
()
override
;
39
41
void
OnDetach
()
override
;
42
44
void
OnEvent
(
Event
& event)
override
;
45
47
void
Begin
();
48
52
void
End
();
53
57
void
SetBlockEvents
(
bool
block) { m_BlockEvents = block; }
58
59
private
:
60
Window
* m_Window =
nullptr
;
61
bool
m_BlockEvents =
true
;
62
};
63
}
Event.h
Base class of all events, with their types and categories.
Layer.h
Base class for every part of an application that is updated, rendered and receives events.
Quasar::Event
Base class of all events.
Definition
Event.h:111
Quasar::ImGuiLayer::ImGuiLayer
ImGuiLayer(Window &window)
Creates the layer for a window that has an OpenGL context.
Quasar::ImGuiLayer::OnDetach
void OnDetach() override
Stops the backends, then ImGui.
Quasar::ImGuiLayer::OnAttach
void OnAttach() override
Starts ImGui and its GLFW and OpenGL backends.
Quasar::ImGuiLayer::End
void End()
Draws the ImGui frame in the window, then the ImGui windows outside it.
Quasar::ImGuiLayer::OnEvent
void OnEvent(Event &event) override
Marks the mouse and keyboard events as handled while ImGui uses them. See SetBlockEvents().
Quasar::ImGuiLayer::SetBlockEvents
void SetBlockEvents(bool block)
Chooses whether the events used by ImGui are kept from the layers below.
Definition
ImGuiLayer.h:57
Quasar::ImGuiLayer::Begin
void Begin()
Starts a new ImGui frame. The application calls it before the OnImGuiRender() hooks.
Quasar::Window
Application window.
Definition
Window.h:42
Quasar
Contains all the engine code.
quasar
core
ImGuiLayer.h
Generated by
1.18.0