BsGUIColorField.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIElementContainer.h"
  4. namespace BansheeEngine
  5. {
  6. class BS_ED_EXPORT GUIColorField : public GUIElementContainer
  7. {
  8. struct PrivatelyConstruct {};
  9. public:
  10. static const String& getGUITypeName();
  11. static GUIColorField* create(const GUIContent& labelContent,
  12. const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
  13. static GUIColorField* create(const HString& labelText,
  14. const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
  15. static GUIColorField* create(const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK,
  16. const String& toggleStyle = StringUtil::BLANK);
  17. static GUIColorField* create(const GUIContent& labelContent, const String& labelStyle = StringUtil::BLANK,
  18. const String& toggleStyle = StringUtil::BLANK);
  19. static GUIColorField* create(const HString& labelText, const String& labelStyle = StringUtil::BLANK,
  20. const String& toggleStyle = StringUtil::BLANK);
  21. static GUIColorField* create(const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
  22. GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent,
  23. const String& labelStyle, const String& toggleStyle, const GUILayoutOptions& layoutOptions);
  24. GUIColorField(const PrivatelyConstruct& dummy, const String& labelStyle, const String& toggleStyle,
  25. const GUILayoutOptions& layoutOptions);
  26. Color getValue() const;
  27. void setValue(const Color& value);
  28. void setLabelWidth(UINT32 width);
  29. void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
  30. RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
  31. Vector2I _getOptimalSize() const;
  32. protected:
  33. virtual ~GUIColorField();
  34. protected:
  35. UINT32 mLabelWidth;
  36. GUILabel* mLabel;
  37. GUIColor* mColor;
  38. };
  39. }