ソースを参照

Drop down callbacks are now properly hooked up

Marko Pintera 12 年 前
コミット
8965e5f961

+ 0 - 2
BansheeEngine/Include/BsGUIDropDownBox.h

@@ -12,8 +12,6 @@ namespace BansheeEngine
 
 
 		void initialize(CM::Viewport* target, CM::RenderWindow* window, GUIDropDownList* parentList,
 		void initialize(CM::Viewport* target, CM::RenderWindow* window, GUIDropDownList* parentList,
 			const CM::Vector<CM::WString>::type& elements, std::function<void(CM::UINT32)> selectedCallback);
 			const CM::Vector<CM::WString>::type& elements, std::function<void(CM::UINT32)> selectedCallback);
-
-		boost::signal<void(CM::UINT32)> onEntrySelected;
 	private:
 	private:
 		static const CM::UINT32 DROP_DOWN_BOX_WIDTH;
 		static const CM::UINT32 DROP_DOWN_BOX_WIDTH;
 
 

+ 2 - 2
BansheeEngine/Source/BsGUIDropDownBox.cpp

@@ -177,7 +177,7 @@ namespace BansheeEngine
 
 
 	void GUIDropDownBox::entrySelected(UINT32 idx)
 	void GUIDropDownBox::entrySelected(UINT32 idx)
 	{
 	{
-		if(!onEntrySelected.empty())
-			onEntrySelected(mDropDownStartIdx + idx);
+		if(mSelectedDropDownEntryCallback != nullptr)
+			mSelectedDropDownEntryCallback(mDropDownStartIdx + idx);
 	}
 	}
 }
 }