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.

menumenu.h 920B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __MENUMENU_H
  2. #define __MENUMENU_H
  3. #include <vector>
  4. #include <SDL.h>
  5. #include "../punkt2d.h"
  6. #include "menuitem.h"
  7. namespace segl {
  8. class MenuMenu {
  9. private:
  10. std::vector<MenuItem*> menuitems;
  11. int itempos;
  12. Punkt2D menupos;
  13. bool centermenu;
  14. bool centerScreenX;
  15. bool dohighlight;
  16. bool paintbackground;
  17. int basefontsize;
  18. int offset;
  19. int maxwidth;
  20. int valuewidth;
  21. GLFontEngine fontengine;
  22. // Soll anderes center evtl. ersetzen
  23. // TODO: cleanup
  24. bool fullcenter;
  25. public:
  26. MenuMenu();
  27. void setPos(const Punkt2D&);
  28. void setCenter(bool);
  29. void setCenterScreenX(bool);
  30. void setBaseFontSize(int);
  31. void setMaxWidth(int);
  32. void setPaintBackground(bool);
  33. void up();
  34. void down();
  35. void left();
  36. void right();
  37. void select();
  38. void charInput(char c);
  39. void resetItemPos();
  40. void addMenuItem(MenuItem*);
  41. void render();
  42. };
  43. } // namespace segl
  44. #endif