LkEngine 0.1.2
 
Loading...
Searching...
No Matches
EditorContext.h
1#pragma once
2
4#include "LkEngine/Core/LObject/ObjectPtr.h"
5#include "LkEngine/Asset/Asset.h"
6
7#include <imgui/imgui.h>
8
9
10namespace LkEngine {
11
12 static_assert(std::is_same_v<uint32_t, ImGuiID>);
13
15 {
16 public:
17 LEditorContext() = default;
18 LEditorContext(const LEditorContext& Other) = delete;
19 LEditorContext(LEditorContext&& Other) = delete;
20 LEditorContext operator=(const LEditorContext& Other) = delete;
21 LEditorContext operator=(LEditorContext&& Other) = delete;
22
23 static void Cache();
24
25 public:
26 /* Focus data. */
27 bool bEditorViewportFocused = false;
28 bool bLastFrameEditorViewportFocused = false;
29 uint32_t FocusedWindowID = 0;
30 const char* FocusedWindowName = "";
31 uint32_t LastFrameFocusedWindowID = 0;
32 const char* LastFrameFocusedWindowName = "";
33
34 /* Hover data. */
35 bool bEditorViewportHovered = false;
36 bool bLastFrameEditorViewportHovered = false;
37 uint32_t HoveredWindowID = 0;
38 const char* HoveredWindowName = "";
39 uint32_t LastFrameHoveredWindowID = 0;
40 const char* LastFrameHoveredWindowName = "";
41
42 /* Keyboard and mouse input. */
44 {
45 bool bKeyboardEnabled = false;
46 bool bMouseEnabled = false;
47
48 uint32_t LastToggleFocusedWindowID = 0;
49 const char* LastToggleFocusedWindowName = "";
50 };
51 FInputData Input{};
52 };
53
54 static LEditorContext EditorContext;
55
56}
LObject implementation.
Definition EditorContext.h:15
Definition Asset.h:11
Definition EditorContext.h:44