コード例 #1
0
	GUIGameObjectField* GUIGameObjectField::create(const String& typeNamespace, const String& type, const GUIOptions& options, const String& style)
	{
		const String* curStyle = &style;
		if (*curStyle == StringUtil::BLANK)
			curStyle = &BuiltinEditorResources::ObjectFieldStyleName;

		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), typeNamespace, type, GUIContent(), 0, *curStyle,
			GUIDimensions::create(options), false);
	}
コード例 #2
0
	GUITextField* GUITextField::create(bool multiline, const HString& labelText, const GUIOptions& options,
		const String& style)
	{
		const String* curStyle = &style;
		if (*curStyle == StringUtil::BLANK)
			curStyle = &GUITextField::getGUITypeName();

		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, GUIContent(labelText), DEFAULT_LABEL_WIDTH, *curStyle,
			GUIDimensions::create(options), true);
	}
コード例 #3
0
	GUITextField* GUITextField::create(bool multiline, const HString& labelText, UINT32 labelWidth,
		const String& style)
	{
		const String* curStyle = &style;
		if (*curStyle == StringUtil::BLANK)
			curStyle = &GUITextField::getGUITypeName();

		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, GUIContent(labelText), labelWidth, *curStyle,
			GUIDimensions::create(), true);
	}
コード例 #4
0
	GUIGameObjectField* GUIGameObjectField::create(const String& typeNamespace, const String& type, const HString& labelText,
		const String& style)
	{
		const String* curStyle = &style;
		if (*curStyle == StringUtil::BLANK)
			curStyle = &BuiltinEditorResources::ObjectFieldStyleName;

		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), typeNamespace, type, GUIContent(labelText), DEFAULT_LABEL_WIDTH, *curStyle,
			GUIDimensions::create(), true);
	}
コード例 #5
0
	void GUIGameObjectField::setValue(const HGameObject& value, bool triggerEvent)
	{
		if (value)
		{
			if (mInstanceId == value.getInstanceId())
				return;

			mInstanceId = value->getInstanceId();
			mDropButton->setContent(GUIContent(HString(toWString(value->getName()) + L" (" + toWString(mType) + L")")));
		}
		else
		{
			if (mInstanceId == 0)
				return;

			mInstanceId = 0;
			mDropButton->setContent(GUIContent(HString(L"None (" + toWString(mType) + L")")));
		}

		if (triggerEvent)
			onValueChanged(value);
	}
コード例 #6
0
	GUIDropButton::GUIDropButton(UINT32 dragType, const String& styleName, const GUIDimensions& dimensions)
		:GUIButtonBase(styleName, GUIContent(HString(L"None")), dimensions), mDragType(dragType)
	{

	}
コード例 #7
0
ファイル: BsGUIButton.cpp プロジェクト: AlfHub/BansheeEngine
	GUIButton* GUIButton::create(const HString& text, const GUIOptions& options, const String& styleName)
	{
		return create(GUIContent(text), options, styleName);
	}
コード例 #8
0
	GUIToggle* GUIToggle::create(const HString& text, SPtr<GUIToggleGroup> toggleGroup,
		const GUIOptions& options, const String& styleName)
	{
		return create(GUIContent(text), toggleGroup, options, styleName);
	}
コード例 #9
0
	GUIToggle* GUIToggle::create(const HString& text, const String& styleName)
	{
		return create(GUIContent(text), styleName);
	}