From 423f2995304bc16db77bf19b6ca5a84ab37582e2 Mon Sep 17 00:00:00 2001 From: Chaosus Date: Thu, 9 Nov 2017 13:55:30 +0300 Subject: [PATCH] Enable asset store for godot 3.0 --- editor/plugins/asset_library_editor_plugin.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index cd532644376..d2e7feb6e10 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -33,6 +33,8 @@ #include "editor_settings.h" #include "io/json.h" +#include "version_generated.gen.h" + void EditorAssetLibraryItem::configure(const String &p_title, int p_asset_id, const String &p_category, int p_category_id, const String &p_author, int p_author_id, int p_rating, const String &p_cost) { title->set_text(p_title); @@ -867,6 +869,8 @@ void EditorAssetLibrary::_search(int p_page) { } args += String() + "sort=" + sort_key[sort->get_selected()]; + args += "&godot_version=" + itos(VERSION_MAJOR) + "." + itos(VERSION_MINOR); + String support_list; for (int i = 0; i < SUPPORT_MAX; i++) { if (support->get_popup()->is_item_checked(i)) { @@ -1348,13 +1352,11 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { search_hb2->add_child(memnew(Label(TTR("Site:") + " "))); repository = memnew(OptionButton); - // FIXME: Reenable me once GH-7147 is fixed. - /* repository->add_item("godotengine.org"); repository->set_item_metadata(0, "https://godotengine.org/asset-library/api"); - */ repository->add_item("localhost"); - repository->set_item_metadata(/*1*/ 0, "http://127.0.0.1/asset-library/api"); + repository->set_item_metadata(1, "http://127.0.0.1/asset-library/api"); + repository->connect("item_selected", this, "_repository_changed"); search_hb2->add_child(repository);