guiChunkedBitmapCtrl.h 857 B

12345678910111213141516171819202122232425262728293031323334353637
  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. class GuiChunkedBitmapCtrl : public GuiControl
  10. {
  11. private:
  12. typedef GuiControl Parent;
  13. void renderRegion(const Point2I &offset, const Point2I &extent);
  14. protected:
  15. StringTableEntry mBitmapName;
  16. GFXTexHandle mTexHandle;
  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();
  27. void onSleep();
  28. void setBitmap(const char *name);
  29. void onRender(Point2I offset, const RectI &updateRect);
  30. };