| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #pragma once
- #include "BsEditorPrerequisites.h"
- #include "BsGUIElementContainer.h"
- #include "CmVector4.h"
- namespace BansheeEditor
- {
- class BS_ED_EXPORT GUIVector4Field : public BS::GUIElementContainer
- {
- struct PrivatelyConstruct {};
- public:
- static const CM::String& getGUITypeName();
- static GUIVector4Field* create(BS::GUIWidget& parent, const BS::GUIContent& labelContent,
- const BS::GUIOptions& layoutOptions, BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- static GUIVector4Field* create(BS::GUIWidget& parent, const CM::HString& labelText,
- const BS::GUIOptions& layoutOptions, BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- static GUIVector4Field* create(BS::GUIWidget& parent,
- const BS::GUIOptions& layoutOptions, BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- static GUIVector4Field* create(BS::GUIWidget& parent, const BS::GUIContent& labelContent,
- BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- static GUIVector4Field* create(BS::GUIWidget& parent, const CM::HString& labelText,
- BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- static GUIVector4Field* create(BS::GUIWidget& parent,
- BS::GUIElementStyle* labelStyle = nullptr, BS::GUIElementStyle* inputBoxStyle = nullptr);
- GUIVector4Field(const PrivatelyConstruct& dummy, BS::GUIWidget& parent, const BS::GUIContent& labelContent,
- BS::GUIElementStyle* labelStyle, BS::GUIElementStyle* inputBoxStyle, const BS::GUILayoutOptions& layoutOptions);
- GUIVector4Field(const PrivatelyConstruct& dummy, BS::GUIWidget& parent,
- BS::GUIElementStyle* labelStyle, BS::GUIElementStyle* inputBoxStyle, const BS::GUILayoutOptions& layoutOptions);
- CM::Vector4 getValue() const;
- void setValue(const CM::Vector4& value);
- CM::Vector2I _getOptimalSize() const;
- protected:
- virtual ~GUIVector4Field();
- void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height,
- CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
- protected:
- static const CM::UINT32 ELEMENT_LABEL_WIDTH;
- BS::GUILabel* mLabel;
- GUIFloatField* mFieldX;
- GUIFloatField* mFieldY;
- GUIFloatField* mFieldZ;
- GUIFloatField* mFieldW;
- void construct(BS::GUIWidget& parent, const BS::GUIContent& labelContent, BS::GUIElementStyle* labelStyle,
- BS::GUIElementStyle* inputBoxStyle, const BS::GUILayoutOptions& layoutOptions, bool withLabel);
- };
- }
|