10#include "glm/ext/vector_float3.hpp"
26 if (inputManager.IsKeyPressed(GLFW_KEY_ESCAPE))
35 window.
SetSize(
static_cast<int>(width),
static_cast<int>(height));
38 constexpr float kDefaultCameraZ = -2.0F;
43 cameraManager.SetActiveCamera(camera);
53 rmluiContext.
SetFont(
"examples/rmlui_usage/asset/LatoLatin-Regular.ttf");
54 rmluiContext.
SetFont(
"examples/rmlui_usage/asset/LatoLatin-Bold.ttf");
55 rmluiContext.
SetFont(
"examples/rmlui_usage/asset/LatoLatin-Italic.ttf");
56 rmluiContext.
SetFont(
"examples/rmlui_usage/asset/LatoLatin-BoldItalic.ttf");
57 rmluiContext.
SetFont(
"examples/rmlui_usage/asset/NotoEmoji-Regular.ttf");
64 std::string message = std::string(demoName) +
" demo hover clicked";
CameraManager is a resource that manages the active camera entity.
Definition CameraManager.hpp:24
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
void Stop()
Stop the core execution. It will finish the current loop, call shutdown systems if any and stop.
Definition Core.cpp:64
TResource & GetResource()
Get a reference of a resource.
Definition Core.inl:14
Entity CreateEntity()
Create an entity in the context of the registry.
Definition Core.cpp:44
decltype(auto) AddComponent(TComponent &&component)
Add a component to an entity.
Definition Entity.hpp:55
Definition UIContext.hpp:21
bool RegisterEventListener(Rml::Element &element, const Rml::String &eventType, std::function< void(Rml::Event &)> callback, bool useCapture=false)
Definition UIContext.cpp:462
void SetFont(const std::string &fontPath) override
Definition UIContext.cpp:296
bool LoadOverlayDocument(const std::string &docPath)
Definition UIContext.cpp:357
Rml::Element * GetElementById(const std::string &elementId)
Definition UIContext.cpp:434
void SetSize(int width, int height)
Set the window size.
Definition Window.cpp:31
void Info(const T &msg) noexcept
Definition Logger.hpp:47
Definition DemoCommon.hpp:19
void EscapeKeySystem(Engine::Core &core)
Definition DemoCommon.hpp:23
void RegisterHoverClick(Rmlui::Resource::UIContext &rmluiContext, const char *demoName)
Definition DemoCommon.hpp:60
void ConfigureWindowAndCamera(Engine::Core &core, uint32_t width, uint32_t height)
Definition DemoCommon.hpp:32
void ConfigureDefaultWindowAndCamera(Engine::Core &core)
Definition DemoCommon.hpp:46
void LoadDefaultFonts(Rmlui::Resource::UIContext &rmluiContext)
Definition DemoCommon.hpp:51
constexpr uint32_t kDefaultWindowHeight
Definition DemoCommon.hpp:21
void AttachHoverOverlay(Rmlui::Resource::UIContext &rmluiContext, const char *demoName)
Definition DemoCommon.hpp:69
constexpr uint32_t kDefaultWindowWidth
Definition DemoCommon.hpp:20