5 #include <ThirdParty/glm/glm/gtx/string_cast.hpp> 6 #include <ThirdParty/glm/glm/gtc/matrix_transform.hpp> 33 EngineImGui::EngineImGui()
43 void EngineImGui::Render()
45 if (allowCameraMovement)
48 const gainput::InputDevice* keyboard =
Engine::GetEngine().lock()->GetInputManager().lock()->GetInputManager().GetDevice(
51 if (keyboard->GetBool(gainput::KeyCtrlL) && keyboard->GetBool(gainput::KeyShiftL) && keyboard->GetBool(gainput::KeyE))
53 if (devMenuCooldown < 0.f)
56 devMenuCooldown = 0.25f;
59 if (devMenuCooldown >= 0.f)
68 void EngineImGui::DevMenu()
83 allowCameraMovement = !allowCameraMovement;
100 const eastl::vector<float> deltaTimes =
Engine::GetEngine().lock()->GetTime().lock()->GetPreviousFramerates();
106 void EngineImGui::CameraMovement()
const 108 float camMoveSpeed = 100.f;
111 const gainput::InputDevice* keyboard =
Engine::GetEngine().lock()->GetInputManager().lock()->GetInputManager().GetDevice(
132 camera.lock()->SetRotation(camera.lock()->GetRotation() += glm::vec3(0, 1, 0) *
Engine::GetEngine().lock()->GetTime().lock()->GetDeltaTime());
136 camera.lock()->SetRotation(camera.lock()->GetRotation() += glm::vec3(0, -1, 0) *
Engine::GetEngine().lock()->GetTime().lock()->GetDeltaTime());
138 glm::vec3 target = glm::normalize(camera.lock()->GetPosition() + camera.lock()->GetRotation());
139 camera.lock()->SetView(glm::lookAt(camera.lock()->GetPosition(), camera.lock()->GetPosition() - target, camera.lock()->GetUp()));
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
ImGuiWindowFlags fpsWindowFlags
ImGuiWindowFlags menuBarWindowFlags
IMGUI_API bool BeginMenuBar()
static EventHandlerImpl< T > * Bind(void(*nonMemberFunctionToCall)(T &))
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
IMGUI_API ImGuiIO & GetIO()
IMGUI_API float GetTime()
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
IMGUI_API bool BeginMenu(const char *label, bool enabled=true)
IMGUI_API bool MenuItem(const char *label, const char *shortcut=NULL, bool selected=false, bool enabled=true)
ImGuiInputTextFlags textFlags
IMGUI_API void EndMenuBar()
static eastl::weak_ptr< Engine > GetEngine() noexcept
This method allows you to get the instance of the Engine. This method will automatically initialize t...
IMGUI_API void PlotLines(const char *label, const float *values, int values_count, int values_offset=0, const char *overlay_text=NULL, float scale_min=FLT_MAX, float scale_max=FLT_MAX, ImVec2 graph_size=ImVec2(0, 0), int stride=sizeof(float))