Text3D.pkg 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. $#include "Text3D.h"
  2. class Text3D : public Drawable
  3. {
  4. Text3D();
  5. ~Text3D();
  6. bool SetFont(const String fontName, int size = DEFAULT_FONT_SIZE);
  7. bool SetFont(Font* font, int size = DEFAULT_FONT_SIZE);
  8. void SetMaterial(Material* material);
  9. void SetText(const String text);
  10. void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign);
  11. void SetHorizontalAlignment(HorizontalAlignment align);
  12. void SetVerticalAlignment(VerticalAlignment align);
  13. void SetTextAlignment(HorizontalAlignment align);
  14. void SetRowSpacing(float spacing);
  15. void SetWordwrap(bool enable);
  16. void SetTextEffect(TextEffect textEffect);
  17. void SetEffectColor(const Color& effectColor);
  18. void SetEffectDepthBias(float bias);
  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. TextEffect GetTextEffect() const;
  34. const Color& GetEffectColor() const;
  35. float GetEffectDepthBias() const;
  36. int GetWidth() const;
  37. int GetRowHeight() const;
  38. unsigned GetNumRows() const;
  39. const PODVector<int>& GetRowWidths() const;
  40. const Color& GetColor(Corner corner) const;
  41. float GetOpacity() const;
  42. bool GetFaceCamera() const;
  43. tolua_property__get_set Font* font;
  44. tolua_property__get_set Material* material;
  45. tolua_readonly tolua_property__get_set int fontSize;
  46. tolua_property__get_set String text;
  47. tolua_property__get_set HorizontalAlignment textAlignment;
  48. tolua_property__get_set HorizontalAlignment horizontalAlignment;
  49. tolua_property__get_set VerticalAlignment verticalAlignment;
  50. tolua_property__get_set float rowSpacing;
  51. tolua_property__get_set bool wordwrap;
  52. tolua_property__get_set TextEffect textEffect;
  53. tolua_property__get_set Color& effectColor;
  54. tolua_property__get_set float effectDepthBias;
  55. tolua_property__get_set int width;
  56. tolua_property__get_set Color& color; // Write only property.
  57. tolua_readonly tolua_property__get_set int rowHeight;
  58. tolua_readonly tolua_property__get_set unsigned numRows;
  59. tolua_property__get_set float opacity;
  60. tolua_property__get_set bool faceCamera;
  61. };
  62. ${
  63. #define TOLUA_DISABLE_tolua_UILuaAPI_Text3D_new00
  64. static int tolua_UILuaAPI_Text3D_new00(lua_State* tolua_S)
  65. {
  66. return ToluaNewObject<Text3D>(tolua_S);
  67. }
  68. #define TOLUA_DISABLE_tolua_UILuaAPI_Text3D_new00_local
  69. static int tolua_UILuaAPI_Text3D_new00_local(lua_State* tolua_S)
  70. {
  71. return ToluaNewObjectGC<Text3D>(tolua_S);
  72. }
  73. #define TOLUA_DISABLE_tolua_get_Text3D_color_ref
  74. #define tolua_get_Text3D_color_ref NULL
  75. $}