1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
---|---|
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #include "GUI/BsGUIOptions.h" |
4 | |
5 | namespace bs |
6 | { |
7 | GUIOption GUIOption::position(INT32 x, INT32 y) |
8 | { |
9 | GUIOption option; |
10 | |
11 | option.min = (UINT32)x; |
12 | option.max = (UINT32)y; |
13 | option.type = Type::Position; |
14 | |
15 | return option; |
16 | } |
17 | |
18 | GUIOption GUIOption::fixedWidth(UINT32 value) |
19 | { |
20 | GUIOption option; |
21 | |
22 | option.min = option.max = value; |
23 | option.type = Type::FixedWidth; |
24 | |
25 | return option; |
26 | } |
27 | |
28 | GUIOption GUIOption::flexibleWidth(UINT32 min, UINT32 max) |
29 | { |
30 | GUIOption option; |
31 | |
32 | option.min = min; |
33 | option.max = max; |
34 | option.type = Type::FlexibleWidth; |
35 | |
36 | return option; |
37 | } |
38 | |
39 | GUIOption GUIOption::fixedHeight(UINT32 value) |
40 | { |
41 | GUIOption option; |
42 | |
43 | option.min = option.max = value; |
44 | option.type = Type::FixedHeight; |
45 | |
46 | return option; |
47 | } |
48 | |
49 | GUIOption GUIOption::flexibleHeight(UINT32 min, UINT32 max) |
50 | { |
51 | GUIOption option; |
52 | |
53 | option.min = min; |
54 | option.max = max; |
55 | option.type = Type::FlexibleHeight; |
56 | |
57 | return option; |
58 | } |
59 | } |