Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

textlabel.h 684B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __GLGUITEXTLABEL_H
  2. #define __GLGUITEXTLABEL_H
  3. #include <iostream>
  4. #include <string>
  5. #include <SDL.h>
  6. #include <SDL_opengl.h>
  7. #include "object.h"
  8. #include "../color.h"
  9. #include "../glfontengine.h"
  10. namespace segl {
  11. class GLGuiTextLabel : public GLGuiObject{
  12. protected:
  13. GLFontEngine fontengine;
  14. std::string text;
  15. Color col;
  16. int x, y;
  17. bool center;
  18. int wrap;
  19. public:
  20. GLGuiTextLabel(int _x, int _y, bool _center=false, int _wrap=0);
  21. GLGuiTextLabel(std::string, int _x, int _y, bool _center=false, int _wrap=0);
  22. void setText(std::string str);
  23. void setColor(Color);
  24. void setPos(int _x, int _y);
  25. virtual void render();
  26. };
  27. } // namespace segl
  28. #endif