2
0

UIImage.h 610 B

123456789101112131415161718192021222324252627
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <UI/UIElement.h>
  6. #include <UI/UITexturedQuad.h>
  7. /// A static image UI element
  8. class UIImage : public UIElement
  9. {
  10. public:
  11. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, UIImage)
  12. /// Set properties
  13. void SetImage(const UITexturedQuad &inImage) { mImage = inImage; }
  14. /// Cloning / copying
  15. virtual void CopyTo(UIElement *ioElement) const override;
  16. /// Draw element
  17. virtual void Draw() const override;
  18. private:
  19. UITexturedQuad mImage;
  20. };