BsGUIOptions.cpp 933 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include "BsGUIOptions.h"
  2. using namespace CamelotFramework;
  3. namespace BansheeEngine
  4. {
  5. GUIOption::GUIOption()
  6. :min(0), max(0), type(Type::FixedWidth)
  7. {
  8. }
  9. GUIOption GUIOption::fixedWidth(CM::UINT32 value)
  10. {
  11. GUIOption option;
  12. option.min = option.max = value;
  13. option.type = Type::FixedWidth;
  14. return option;
  15. }
  16. GUIOption GUIOption::flexibleWidth(CM::UINT32 min, CM::UINT32 max)
  17. {
  18. GUIOption option;
  19. option.min = min;
  20. option.max = max;
  21. option.type = Type::FlexibleWidth;
  22. return option;
  23. }
  24. GUIOption GUIOption::fixedHeight(CM::UINT32 value)
  25. {
  26. GUIOption option;
  27. option.min = option.max = value;
  28. option.type = Type::FixedHeight;
  29. return option;
  30. }
  31. GUIOption GUIOption::flexibleHeight(CM::UINT32 min, CM::UINT32 max)
  32. {
  33. GUIOption option;
  34. option.min = min;
  35. option.max = max;
  36. option.type = Type::FlexibleHeight;
  37. return option;
  38. }
  39. }