Text3D.pkg 3.1 KB

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