guiChunkedBitmapCtrl.h 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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, onImageChanged, GFXDefaultGUIProfile);
  17. DECLARE_ASSET_SETGET(GuiChunkedBitmapCtrl, Bitmap);
  18. bool mUseVariable;
  19. bool mTile;
  20. public:
  21. //creation methods
  22. DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
  23. DECLARE_CATEGORY( "Gui Images" );
  24. GuiChunkedBitmapCtrl();
  25. static void initPersistFields();
  26. //Parental methods
  27. bool onWake();
  28. void onSleep();
  29. void setBitmap(const char *name);
  30. void onRender(Point2I offset, const RectI &updateRect);
  31. void onImageChanged() {}
  32. };