ITextSceneNode.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_TEXT_SCENE_NODE_H_INCLUDED
  5. #define IRR_I_TEXT_SCENE_NODE_H_INCLUDED
  6. #include "ISceneNode.h"
  7. namespace irr
  8. {
  9. namespace gui
  10. {
  11. class IGUIFont;
  12. }
  13. namespace scene
  14. {
  15. //! A scene node for displaying 2d text at a position in three dimensional space
  16. class ITextSceneNode : public ISceneNode
  17. {
  18. public:
  19. //! constructor
  20. ITextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
  21. const core::vector3df& position = core::vector3df(0,0,0))
  22. : ISceneNode(parent, mgr, id, position) {}
  23. //! sets the text string
  24. virtual void setText(const wchar_t* text) = 0;
  25. //! get the text string
  26. virtual const wchar_t* getText() const = 0;
  27. //! sets the color of the text
  28. virtual void setTextColor(video::SColor color) = 0;
  29. //! get the color of the text
  30. virtual video::SColor getTextColor() const = 0;
  31. //! set the font used to draw the text
  32. virtual void setFont(gui::IGUIFont* font) = 0;
  33. //! Get the font used to draw the text
  34. virtual gui::IGUIFont* getFont() const = 0;
  35. };
  36. } // end namespace scene
  37. } // end namespace irr
  38. #endif