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/BsGUIScrollBarHorz.h" |
4 | #include "GUI/BsGUIDimensions.h" |
5 | |
6 | namespace bs |
7 | { |
8 | GUIScrollBarHorz::GUIScrollBarHorz(bool resizeable, const String& styleName, const GUIDimensions& dimensions) |
9 | :GUIScrollBar(true, resizeable, styleName, dimensions) |
10 | { |
11 | |
12 | } |
13 | |
14 | GUIScrollBarHorz* GUIScrollBarHorz::create(const String& styleName) |
15 | { |
16 | return new (bs_alloc<GUIScrollBarHorz>()) GUIScrollBarHorz(false, getStyleName<GUIScrollBarHorz>(false, styleName), |
17 | GUIDimensions::create()); |
18 | } |
19 | |
20 | GUIScrollBarHorz* GUIScrollBarHorz::create(bool resizeable, const String& styleName) |
21 | { |
22 | return new (bs_alloc<GUIScrollBarHorz>()) GUIScrollBarHorz(resizeable, getStyleName<GUIScrollBarHorz>(resizeable, styleName), |
23 | GUIDimensions::create()); |
24 | } |
25 | |
26 | GUIScrollBarHorz* GUIScrollBarHorz::create(const GUIOptions& options, const String& styleName) |
27 | { |
28 | return new (bs_alloc<GUIScrollBarHorz>()) GUIScrollBarHorz(false, getStyleName<GUIScrollBarHorz>(false, styleName), |
29 | GUIDimensions::create(options)); |
30 | } |
31 | |
32 | GUIScrollBarHorz* GUIScrollBarHorz::create(bool resizeable, const GUIOptions& options, const String& styleName) |
33 | { |
34 | return new (bs_alloc<GUIScrollBarHorz>()) GUIScrollBarHorz(resizeable, getStyleName<GUIScrollBarHorz>(resizeable, styleName), |
35 | GUIDimensions::create(options)); |
36 | } |
37 | |
38 | const String& GUIScrollBarHorz::getGUITypeName(bool resizable) |
39 | { |
40 | static String typeName = "ScrollBarHorz" ; |
41 | static String resizableTypeName = "ResizeableScrollBarHorz" ; |
42 | |
43 | if(resizable) |
44 | return resizableTypeName; |
45 | else |
46 | return typeName; |
47 | } |
48 | } |