Text3D.pkg 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. $#include "Text3D.h"
  2. class Text3D : public Drawable
  3. {
  4. Text3D(Context* context);
  5. ~Text3D();
  6. bool SetFont(const String& fontName, int size = DEFAULT_FONT_SIZE);
  7. bool SetFont(const char* fontName, int size = DEFAULT_FONT_SIZE);
  8. bool SetFont(Font* font, int size = DEFAULT_FONT_SIZE);
  9. bool SetFont(Font* font);
  10. void SetMaterial(Material* material);
  11. void SetText(const String& text);
  12. void SetText(const char* text);
  13. void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign);
  14. void SetHorizontalAlignment(HorizontalAlignment align);
  15. void SetVerticalAlignment(VerticalAlignment align);
  16. void SetTextAlignment(HorizontalAlignment align);
  17. void SetRowSpacing(float spacing);
  18. void SetWordwrap(bool enable);
  19. void SetWidth(int width);
  20. void SetColor(const Color& color);
  21. void SetColor(Corner corner, const Color& color);
  22. void SetOpacity(float opacity);
  23. void SetFaceCamera(bool enable);
  24. Font* GetFont() const;
  25. Material* GetMaterial() const;
  26. int GetFontSize() const;
  27. const String& GetText() const;
  28. HorizontalAlignment GetTextAlignment() const;
  29. HorizontalAlignment GetHorizontalAlignment() const;
  30. VerticalAlignment GetVerticalAlignment() const;
  31. float GetRowSpacing() const;
  32. bool GetWordwrap() const;
  33. int GetWidth() const;
  34. int GetRowHeight() const;
  35. unsigned GetNumRows() const;
  36. const Color& GetColor(Corner corner) const;
  37. float GetOpacity() const;
  38. bool GetFaceCamera() const;
  39. void SetFontAttr(ResourceRef value);
  40. ResourceRef GetFontAttr() const;
  41. void SetMaterialAttr(ResourceRef value);
  42. ResourceRef GetMaterialAttr() const;
  43. const Color& GetColorAttr() const;
  44. tolua_property__get_set Font* font;
  45. tolua_property__get_set Material* material;
  46. tolua_readonly tolua_property__get_set int fontSize;
  47. tolua_property__get_set String& text;
  48. tolua_property__get_set HorizontalAlignment textAlignment;
  49. tolua_property__get_set HorizontalAlignment horizontalAlignment;
  50. tolua_property__get_set VerticalAlignment verticalAlignment;
  51. tolua_property__get_set float rowSpacing;
  52. tolua_property__get_set bool wordwrap;
  53. tolua_property__get_set int width;
  54. tolua_property__get_set Color& color; // Write only property.
  55. tolua_readonly tolua_property__get_set int rowHeight;
  56. tolua_readonly tolua_property__get_set unsigned numRows;
  57. tolua_property__get_set float opacity;
  58. tolua_property__get_set bool faceCamera;
  59. tolua_property__get_set ResourceRef fontAttr;
  60. tolua_property__get_set ResourceRef materialAttr;
  61. tolua_readonly tolua_property__get_set Color& colorAttr;
  62. };
  63. ${
  64. #define SetColorAttr SetColor
  65. #define TOLUA_DISABLE_tolua_get_Text3D_color_ref
  66. #define tolua_get_Text3D_color_ref NULL
  67. $}