Text3D.pkg 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 SetTextEffect(TextEffect textEffect);
  18. void SetEffectColor(const Color& effectColor);
  19. void SetEffectDepthBias(float bias);
  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. TextEffect GetTextEffect() const;
  35. const Color& GetEffectColor() const;
  36. float GetEffectDepthBias() const;
  37. int GetWidth() const;
  38. int GetRowHeight() const;
  39. unsigned GetNumRows() const;
  40. const PODVector<int>& GetRowWidths() const;
  41. const Color& GetColor(Corner corner) const;
  42. float GetOpacity() const;
  43. bool GetFaceCamera() const;
  44. void SetFontAttr(ResourceRef value);
  45. ResourceRef GetFontAttr() const;
  46. void SetMaterialAttr(ResourceRef value);
  47. ResourceRef GetMaterialAttr() const;
  48. const Color& GetColorAttr() const;
  49. tolua_property__get_set Font* font;
  50. tolua_property__get_set Material* material;
  51. tolua_readonly tolua_property__get_set int fontSize;
  52. tolua_property__get_set String& text;
  53. tolua_property__get_set HorizontalAlignment textAlignment;
  54. tolua_property__get_set HorizontalAlignment horizontalAlignment;
  55. tolua_property__get_set VerticalAlignment verticalAlignment;
  56. tolua_property__get_set float rowSpacing;
  57. tolua_property__get_set bool wordwrap;
  58. tolua_property__get_set TextEffect textEffect;
  59. tolua_property__get_set Color& effectColor;
  60. tolua_property__get_set float effectDepthBias;
  61. tolua_property__get_set int width;
  62. tolua_property__get_set Color& color; // Write only property.
  63. tolua_readonly tolua_property__get_set int rowHeight;
  64. tolua_readonly tolua_property__get_set unsigned numRows;
  65. tolua_property__get_set float opacity;
  66. tolua_property__get_set bool faceCamera;
  67. tolua_property__get_set ResourceRef fontAttr;
  68. tolua_property__get_set ResourceRef materialAttr;
  69. tolua_readonly tolua_property__get_set Color& colorAttr;
  70. };
  71. ${
  72. #define SetColorAttr SetColor
  73. #define TOLUA_DISABLE_tolua_get_Text3D_color_ref
  74. #define tolua_get_Text3D_color_ref NULL
  75. $}