| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #pragma once
- #include "BsScriptEditorPrerequisites.h"
- #include "BsGUIElementContainer.h"
- namespace BansheeEngine
- {
- class BS_SCR_BED_EXPORT GUIResourceField : public GUIElementContainer
- {
- struct PrivatelyConstruct {};
- public:
- static const String& getGUITypeName();
- static GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, const GUIOptions& layoutOptions,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, const GUIOptions& layoutOptions,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText,
- const String& style = StringUtil::BLANK);
- static GUIResourceField* create(const String& typeNamespace, const String& type, const String& style = StringUtil::BLANK);
- GUIResourceField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type, const GUIContent& labelContent,
- UINT32 labelWidth, const String& style, const GUILayoutOptions& layoutOptions, bool withLabel);
- HResource getValue() const;
- void setValue(const HResource& value);
- String getUUID() const { return mUUID; }
- void setUUID(const String& uuid);
- void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
- Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth);
- Vector2I _getOptimalSize() const;
- Event<void(const String&)> onValueChanged;
- private:
- virtual ~GUIResourceField();
- void styleUpdated();
- void dataDropped(void* data);
- void onClearButtonClicked();
- private:
- static const UINT32 DEFAULT_LABEL_WIDTH;
- GUILayout* mLayout;
- GUILabel* mLabel;
- GUIDropButton* mDropButton;
- GUIButton* mClearButton;
- String mNamespace;
- String mType;
- String mUUID;
- };
- }
|