diff --git a/src/Panda.hpp b/src/Panda.hpp index 917d293..0b3aa2f 100755 --- a/src/Panda.hpp +++ b/src/Panda.hpp @@ -144,15 +144,17 @@ namespace panda // ############################################################################################ - // # Graphic - // ### GUI + #ifdef PANDA_INCLUDE_IMGUI + void GuiInit(); void GuiDestroy(); void GuiBegin(); void GuiEnd(); void GuiThemeSetup(); + #endif + // ### atlas bool LoadTextureAtlas(const char *image_path, const char *ini_path, std::string AtlasKey); bool UnloadTextureAtlas(std::string AtlasKey); diff --git a/src/core/Graphic.cpp b/src/core/Gui.cpp similarity index 93% rename from src/core/Graphic.cpp rename to src/core/Gui.cpp index 1f69e68..632e5cf 100755 --- a/src/core/Graphic.cpp +++ b/src/core/Gui.cpp @@ -2,9 +2,10 @@ #include #include #include -#include +#ifdef PANDA_INCLUDE_IMGUI #include "Panda.hpp" +#include #if PLATFORM_ANDROID @@ -143,19 +144,8 @@ void panda::GuiThemeSetup() style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); } +#endif -void panda::DrawRenderTexture(const RenderTexture &buffer, const float &x, const float &y, const Color &color) -{ - DrawTextureRec( - buffer.texture, - {0.0f, 0.0f, 1.0f*buffer.texture.width, -1.0f*buffer.texture.height}, - {x, y}, color); -} - -Rectangle panda::GetTextureRect(const Texture &tex, bool flipX, bool flipY) -{ - return { 0.0f, 0.0f, (flipX ? -tex.width : tex.width)*1.0f, (flipY ? -tex.height : tex.height)*1.0f }; -} /////////////////////////////////