Sprite.pkg 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. $#include "UI/Sprite.h"
  2. enum BlendMode{};
  3. class Sprite : public UIElement
  4. {
  5. Sprite();
  6. virtual ~Sprite();
  7. void SetPosition(const Vector2& position);
  8. void SetPosition(float x, float y);
  9. void SetHotSpot(const IntVector2& hotSpot);
  10. void SetHotSpot(int x, int y);
  11. void SetScale(const Vector2& scale);
  12. void SetScale(float x, float y);
  13. void SetScale(float scale);
  14. void SetRotation(float angle);
  15. void SetTexture(Texture* texture);
  16. void SetImageRect(const IntRect& rect);
  17. void SetFullImageRect();
  18. void SetBlendMode(BlendMode mode);
  19. const Vector2& GetPosition() const;
  20. const IntVector2& GetHotSpot() const;
  21. const Vector2& GetScale() const;
  22. float GetRotation() const;
  23. Texture* GetTexture() const;
  24. const IntRect& GetImageRect() const;
  25. BlendMode GetBlendMode() const;
  26. const Matrix3x4& GetTransform() const;
  27. tolua_property__get_set Vector2& position;
  28. tolua_property__get_set IntVector2& hotSpot;
  29. tolua_property__get_set Vector2& scale;
  30. tolua_property__get_set float rotation;
  31. tolua_property__get_set Texture* texture;
  32. tolua_property__get_set IntRect& imageRect;
  33. tolua_property__get_set BlendMode blendMode;
  34. tolua_readonly tolua_property__get_set Matrix3x4& transform;
  35. };
  36. ${
  37. #define TOLUA_DISABLE_tolua_UILuaAPI_Sprite_new00
  38. static int tolua_UILuaAPI_Sprite_new00(lua_State* tolua_S)
  39. {
  40. return ToluaNewObject<Sprite>(tolua_S);
  41. }
  42. #define TOLUA_DISABLE_tolua_UILuaAPI_Sprite_new00_local
  43. static int tolua_UILuaAPI_Sprite_new00_local(lua_State* tolua_S)
  44. {
  45. return ToluaNewObjectGC<Sprite>(tolua_S);
  46. }
  47. $}