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/BsGUIContent.h"
4
5namespace bs
6{
7 const UINT32 GUIContent::IMAGE_TEXT_SPACING = 3;
8
9 const HSpriteTexture& GUIContent::getImage(GUIElementState state) const
10 {
11 switch (state)
12 {
13 case GUIElementState::Normal:
14 return images.normal;
15 case GUIElementState::Hover:
16 return images.hover;
17 case GUIElementState::Active:
18 return images.active;
19 case GUIElementState::Focused:
20 case GUIElementState::FocusedHover:
21 return images.focused;
22 case GUIElementState::NormalOn:
23 return images.normalOn;
24 case GUIElementState::HoverOn:
25 return images.hoverOn;
26 case GUIElementState::ActiveOn:
27 return images.activeOn;
28 case GUIElementState::FocusedOn:
29 case GUIElementState::FocusedHoverOn:
30 return images.focusedOn;
31 default:
32 return images.normal;
33 }
34 }
35}