| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #include "BsGUIOptions.h"
- namespace BansheeEngine
- {
- GUIOption::GUIOption()
- :min(0), max(0), type(Type::FixedWidth)
- {
- }
- GUIOption GUIOption::position(INT32 x, INT32 y)
- {
- GUIOption option;
- option.min = (UINT32)x;
- option.max = (UINT32)y;
- option.type = Type::Position;
- return option;
- }
- GUIOption GUIOption::fixedWidth(UINT32 value)
- {
- GUIOption option;
- option.min = option.max = value;
- option.type = Type::FixedWidth;
- return option;
- }
- GUIOption GUIOption::flexibleWidth(UINT32 min, UINT32 max)
- {
- GUIOption option;
- option.min = min;
- option.max = max;
- option.type = Type::FlexibleWidth;
- return option;
- }
- GUIOption GUIOption::fixedHeight(UINT32 value)
- {
- GUIOption option;
- option.min = option.max = value;
- option.type = Type::FixedHeight;
- return option;
- }
- GUIOption GUIOption::flexibleHeight(UINT32 min, UINT32 max)
- {
- GUIOption option;
- option.min = min;
- option.max = max;
- option.type = Type::FlexibleHeight;
- return option;
- }
- }
|