Browse Source

Bugfix: Default empty texture field will display the "(None)" label and without the clear button

BearishSun 6 years ago
parent
commit
f8bc05dc8b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/EditorScript/BsGUITextureField.cpp

+ 3 - 0
Source/EditorScript/BsGUITextureField.cpp

@@ -65,6 +65,9 @@ namespace bs
 
 		mDropButton->onDataDropped.connect(std::bind(&GUITextureField::dataDropped, this, _1));
 		mDropButton->onClick.connect(std::bind(&GUITextureField::onDropButtonClicked, this));
+
+		mDropButton->setContent(GUIContent(HString("(None)")));
+		mClearButton->setVisible(false);
 	}
 
 	GUITextureField* GUITextureField::create(GUITextureFieldType type, const GUIFieldOptions& options)