Full UI Lua Package


SUBMITTED BY: Guest

DATE: April 24, 2013, 11:44 p.m.

FORMAT: C++

SIZE: 1.5 kB

HITS: 1349

  1. //
  2. // Okzoniom::RPG
  3. // Copyright (C) 2010 - 2013
  4. //
  5. // - Louis SCHNELLBACH
  6. //
  7. $hfile "../UI/Widget.h"
  8. $hfile "../UI/TextBase.h"
  9. $hfile "../UI/Text2D.h"
  10. class Widget
  11. {
  12. Widget(const string& id, Widget* parent=NULL) ;
  13. string getID() const;
  14. void callback(string);
  15. Widget* getParent();
  16. void addChild(Widget* w);
  17. void removeChild(Widget* w);
  18. Widget* getRootParent();
  19. void visible(bool b);
  20. bool isVisible() const;
  21. void focus(bool b);
  22. void focusable(bool);
  23. bool isFocused() const;
  24. bool isKeepingFocus() const;
  25. bool isFocusable() const;
  26. void movable(bool);
  27. bool isMovable() const;
  28. void setSize(TVertex<float>);
  29. TVertex<float> getSize() const;
  30. void setOffset(TVertex<float>);
  31. TVertex<float> getOffset() const;
  32. void setPosition(TVertex<float>);
  33. TVertex<float> getPosition() const;
  34. bool contains(float x, float y) const;
  35. };
  36. class TextBase : public Widget
  37. {
  38. public:
  39. TextBase(const string& id, Widget* = nullptr, const string& = L"", float = Font::DefaultSize);
  40. void setText(string);
  41. string getText() const;
  42. void setFontSize(float);
  43. float getFontSize() const;
  44. };
  45. class Text2D : public TextBase
  46. {
  47. public:
  48. Text2D(const string&, Widget* = nullptr, const string& = L"", float = Font::DefaultSize);
  49. };

comments powered by Disqus