Text3D.pkg 2.2 KB

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