Browse Source

Fixed some options in assetlib

Juan Linietsky 9 năm trước cách đây
mục cha
commit
1f2ad872cc

+ 17 - 2
tools/editor/asset_library_editor_plugin.cpp

@@ -537,6 +537,8 @@ void EditorAssetLibrary::_notification(int p_what) {
 	if (p_what==NOTIFICATION_READY) {
 	if (p_what==NOTIFICATION_READY) {
 		TextureFrame *tf = memnew(TextureFrame);
 		TextureFrame *tf = memnew(TextureFrame);
 		tf->set_texture(get_icon("Error","EditorIcons"));
 		tf->set_texture(get_icon("Error","EditorIcons"));
+		reverse->set_icon(get_icon("Updown","EditorIcons"));
+
 		error_hb->add_child(tf);
 		error_hb->add_child(tf);
 		error_label->raise();
 		error_label->raise();
 
 
@@ -1295,8 +1297,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
 
 
 	sort->set_h_size_flags(SIZE_EXPAND_FILL);
 	sort->set_h_size_flags(SIZE_EXPAND_FILL);
 
 
-	reverse = memnew( CheckBox);
-	reverse->set_text(TTR("Reverse"));
+	reverse = memnew( ToolButton );
+	reverse->set_toggle_mode(true);
+	//reverse->set_text(TTR("Reverse"));
 	search_hb2->add_child(reverse);
 	search_hb2->add_child(reverse);
 
 
 	search_hb2->add_child(memnew(VSeparator));
 	search_hb2->add_child(memnew(VSeparator));
@@ -1324,6 +1327,18 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
 	search_hb2->add_child(repository);
 	search_hb2->add_child(repository);
 	repository->set_h_size_flags(SIZE_EXPAND_FILL);
 	repository->set_h_size_flags(SIZE_EXPAND_FILL);
 
 
+
+	search_hb2->add_child(memnew(VSeparator));
+
+	support = memnew( MenuButton );
+	search_hb2->add_child(support);
+	support->set_text(TTR("Support.."));
+	support->get_popup()->add_check_item(TTR("Official"),SUPPORT_OFFICIAL);
+	support->get_popup()->add_check_item(TTR("Community"),SUPPORT_COMMUNITY);
+	support->get_popup()->add_check_item(TTR("Testing"),SUPPORT_TESTING);
+	support->get_popup()->set_item_checked(SUPPORT_OFFICIAL,true);
+	support->get_popup()->set_item_checked(SUPPORT_COMMUNITY,true);
+
 	/////////
 	/////////
 
 
 	PanelContainer * library_scroll_bg = memnew( PanelContainer );
 	PanelContainer * library_scroll_bg = memnew( PanelContainer );

+ 7 - 1
tools/editor/asset_library_editor_plugin.h

@@ -190,11 +190,12 @@ class EditorAssetLibrary : public PanelContainer {
 	OptionButton *categories;
 	OptionButton *categories;
 	OptionButton *repository;
 	OptionButton *repository;
 	OptionButton *sort;
 	OptionButton *sort;
-	CheckBox *reverse;
+	ToolButton *reverse;
 	Button *search;
 	Button *search;
 	ProgressBar *load_status;
 	ProgressBar *load_status;
 	HBoxContainer *error_hb;
 	HBoxContainer *error_hb;
 	Label *error_label;
 	Label *error_label;
+	MenuButton *support;
 
 
 	HBoxContainer *contents;
 	HBoxContainer *contents;
 
 
@@ -206,6 +207,11 @@ class EditorAssetLibrary : public PanelContainer {
 
 
 	bool templates_only;
 	bool templates_only;
 
 
+	enum Support {
+		SUPPORT_OFFICIAL,
+		SUPPORT_COMMUNITY,
+		SUPPORT_TESTING
+	};
 
 
 	enum SortOrder {
 	enum SortOrder {
 		SORT_RATING,
 		SORT_RATING,

BIN
tools/editor/icons/icon_updown.png


+ 0 - 3
tools/editor/project_manager.cpp

@@ -1022,9 +1022,6 @@ ProjectManager::ProjectManager() {
 
 
 
 
 
 
-
-
-
 	OS::get_singleton()->set_low_processor_usage_mode(true);
 	OS::get_singleton()->set_low_processor_usage_mode(true);
 
 
 	npdialog = memnew( NewProjectDialog );
 	npdialog = memnew( NewProjectDialog );