Beispiel #1
0
void EditorAddonLibrary::_notification(int p_what) {

	if (p_what==NOTIFICATION_READY) {
		_api_request("api/configure");
	}

	if (p_what==NOTIFICATION_PROCESS) {


	}

}
Beispiel #2
0
void EditorAddonLibrary::_select_asset(int p_id){

	_api_request("api/asset","?id="+itos(p_id));

	/*
	if (description) {
		memdelete(description);
	}


	description = memnew( EditorAddonLibraryItemDescription );
	add_child(description);
	description->popup_centered_minsize();*/
}
void EditorAssetLibrary::_select_asset(int p_id) {

	_api_request("asset/" + itos(p_id), REQUESTING_ASSET);

	/*
	if (description) {
		memdelete(description);
	}


	description = memnew( EditorAssetLibraryItemDescription );
	add_child(description);
	description->popup_centered_minsize();*/
}
Beispiel #4
0
void EditorAddonLibrary::_search(int p_page) {

	String args;

	args=String()+"?sort="+sort_key[sort->get_selected()];

	if (categories->get_selected()>0) {

		args+="&category="+itos(categories->get_item_metadata(categories->get_selected()));
	}

	if (filter->get_text()!=String()) {
		args+="&filter="+filter->get_text().http_escape();
	}

	if (p_page>0) {
		args+="&page="+itos(p_page);
	}

	_api_request("api/search",args);
}
void EditorAssetLibrary::_select_asset(int p_id) {

	_api_request("asset/" + itos(p_id), REQUESTING_ASSET);
}