guiChunkedBitmapCtrl.h 936 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "console/console.h"
  2. #include "console/consoleTypes.h"
  3. #include "gfx/bitmap/gBitmap.h"
  4. #include "gui/core/guiControl.h"
  5. #include "gfx/gfxDevice.h"
  6. #include "gfx/gfxTextureHandle.h"
  7. #include "gfx/gfxDrawUtil.h"
  8. #include "console/engineAPI.h"
  9. #include "T3D/assets/ImageAsset.h"
  10. class GuiChunkedBitmapCtrl : public GuiControl
  11. {
  12. private:
  13. typedef GuiControl Parent;
  14. void renderRegion(const Point2I &offset, const Point2I &extent);
  15. protected:
  16. DECLARE_IMAGEASSET(GuiChunkedBitmapCtrl, Bitmap, GFXDefaultGUIProfile)
  17. bool mUseVariable;
  18. bool mTile;
  19. public:
  20. //creation methods
  21. DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
  22. DECLARE_CATEGORY( "Gui Images" );
  23. GuiChunkedBitmapCtrl();
  24. static void initPersistFields();
  25. //Parental methods
  26. bool onWake() override;
  27. void onSleep() override;
  28. void setBitmap(const char *name);
  29. void onRender(Point2I offset, const RectI &updateRect) override;
  30. };