Browse Source

Update rlImGui.cpp

SplatTab 3 years ago
parent
commit
59d874d393
1 changed files with 9 additions and 1 deletions
  1. 9 1
      rlImGui.cpp

+ 9 - 1
rlImGui.cpp

@@ -434,6 +434,14 @@ void rlImGuiImage(const Texture *image)
     ImGui::Image((ImTextureID)image, ImVec2(float(image->width), float(image->height)));
     ImGui::Image((ImTextureID)image, ImVec2(float(image->width), float(image->height)));
 }
 }
 
 
+bool rlImGuiImageButton(const Texture *image) {
+    if (ImGui::ImageButton((ImTextureID)image, ImVec2(float(image->width), float(image->height))))
+    {
+        return true;
+    }
+    return false;
+}
+
 void rlImGuiImageSize(const Texture *image, int width, int height)
 void rlImGuiImageSize(const Texture *image, int width, int height)
 {
 {
     ImGui::Image((ImTextureID)image, ImVec2(float(width), float(height)));
     ImGui::Image((ImTextureID)image, ImVec2(float(width), float(height)));
@@ -467,4 +475,4 @@ void rlImGuiImageRect(const Texture* image, int destWidth, int destHeight, Recta
     }
     }
 
 
     ImGui::Image((ImTextureID)image, ImVec2(float(destWidth), float(destHeight)),uv0,uv1);
     ImGui::Image((ImTextureID)image, ImVec2(float(destWidth), float(destHeight)),uv0,uv1);
-}
+}