/****************************************************************************** * File - imgui_ext.h * Author - Joey Pollack * Date - 2022/07/07 (y/m/d) * Mod Date - 2022/07/07 (y/m/d) * Description - Adds new and custom methods to the imgui api ******************************************************************************/ #ifndef LUNARIUM_IMGUI_EXT_H_ #define LUNARIUM_IMGUI_EXT_H_ #include #include #include namespace lunarium { class ImGuiExt { public: /// This function was taken from the Hazel engine written by Cherno! /// https://github.com/TheCherno/Hazel/blob/master/Hazelnut/src/Panels/SceneHierarchyPanel.cpp static bool Vec3Control(const std::string& label, glm::vec3& values, float resetValue = 0.0f, float columnWidth = 100.0f); static bool Vec2Control(const std::string& label, glm::vec3& values, float resetValue = 0.0f, float columnWidth = 100.0f); static bool FloatControl(const std::string& label, float& values, float resetValue = 0.0f, float columnWidth = 100.0f); static void TextCentered(const std::string text); static bool ButtonCentered(const char* label, float alignment = 0.5f); }; } #endif // LUNARIUM_IMGUI_EXT_H_