Text3D.pkg 2.7 KB

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