summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/base/classes.xml42
-rw-r--r--doc/tools/makerst.py4
-rw-r--r--platform/windows/os_windows.cpp2
-rw-r--r--scene/gui/item_list.cpp29
-rw-r--r--tools/editor/editor_import_export.cpp46
-rw-r--r--tools/editor/editor_import_export.h4
-rw-r--r--tools/editor/project_export.cpp12
-rw-r--r--tools/editor/project_export.h3
8 files changed, 87 insertions, 55 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index df488c3c09..b1871632d0 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -1780,7 +1780,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Return the intersection between two [AABB]s. An empty AABB (size 0,0,0) is returned on failure.
+ Return the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
@@ -2102,7 +2102,7 @@
</brief_description>
<description>
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
- Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
+ Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
</description>
<methods>
<method name="add_track">
@@ -5925,7 +5925,7 @@
<return type="bool">
</return>
<description>
- Return true of this is the current camera (see [method Camera2D.make_current]).
+ Return true of this is the current camera (see [method make_current]).
</description>
</method>
<method name="set_limit">
@@ -7339,7 +7339,7 @@
</argument>
<description>
Set the array of points forming the polygon.
- When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode[/code]=0), or a list of lines (for [code]build_mode[/code]=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
+ When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
</description>
</method>
<method name="get_polygon" qualifiers="const">
@@ -7353,14 +7353,14 @@
<argument index="0" name="build_mode" type="int">
</argument>
<description>
- Set whether the polygon is to be a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1).
+ Set whether the polygon is to be a [ConvexPolygon2D] ([code]build_mode==0[/code]), or a [ConcavePolygon2D] ([code]build_mode==1[/code]).
</description>
</method>
<method name="get_build_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return whether the polygon is a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1).
+ Return whether the polygon is a [ConvexPolygon2D] ([code]build_mode==0[/code]), or a [ConcavePolygon2D] ([code]build_mode==1[/code]).
</description>
</method>
<method name="set_trigger">
@@ -12909,19 +12909,13 @@ verify_host will check the SSL identity of the host if set to true.
<argument index="3" name="body" type="String" default="&quot;&quot;">
</argument>
<description>
- Sends a request to the connected host. The url is the what is normally behind the hostname, i.e:
-http://somehost.com/index.php
-url would be "index.php"
-
-Headers are HTTP request headers
-
-To create a POST request with query strings to push to the server, do:
-var fields = {"username" : "user",
- "password" : "pass"}
-var queryString = httpClient.query_string_from_dict(fields)
-var headers = ["Content-Type: application/x-www-form-urlencoded",
- "Content-Length: " + str(queryString.length())]
-var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
+ Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ To create a POST request with query strings to push to the server, do::
+ var fields = {"username" : "user", "password" : "pass"}
+ var queryString = httpClient.query_string_from_dict(fields)
+ var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
+ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
</description>
</method>
<method name="send_body_text">
@@ -13028,12 +13022,10 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu
<argument index="0" name="fields" type="Dictionary">
</argument>
<description>
- Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary.
-
-var fields = {"username": "user", "password": "pass"}
-String queryString = httpClient.query_string_from_dict(fields)
-
-returns:= "username=user&amp;password=pass"
+ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.::
+ var fields = {"username": "user", "password": "pass"}
+ String queryString = httpClient.query_string_from_dict(fields)
+ returns:= "username=user&amp;password=pass"
</description>
</method>
</methods>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index a31b7134f1..1e2d276fb3 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -166,9 +166,9 @@ def rstize_text(text,cclass):
if param.find('.') != -1:
(class_param, method_param) = param.split('.')
- tag_text = ':ref:`'+class_param+'.'+method_param+'<' + class_param.lower() + '_' + method_param + '>`'
+ tag_text = ':ref:`'+class_param+'.'+method_param+'<class_' + class_param + '_' + method_param + '>`'
else:
- tag_text = ':ref:`' + param + '<' + cclass +"_"+ param + '>`'
+ tag_text = ':ref:`' + param + '<class_' + cclass +"_"+ param + '>`'
elif cmd.find('image=') == 0:
tag_text = "" #'![](' + cmd[6:] + ')'
elif cmd.find('url=') == 0:
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 8a291a298b..95a6a6ac58 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2075,7 +2075,7 @@ String OS_Windows::get_system_dir(SystemDir p_dir) const {
id=CSIDL_MYPICTURES;
} break;
case SYSTEM_DIR_DOCUMENTS: {
- id=0x000C;
+ id=CSIDL_PERSONAL;
} break;
case SYSTEM_DIR_DOWNLOADS: {
id=0x000C ;
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index f035cb7722..2d2cabfc01 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -826,22 +826,25 @@ void ItemList::_notification(int p_what) {
if (current_columns==1) {
rcache.size.width = width-rcache.pos.x;
}
- if (items[i].custom_bg.a>0.001) {
- Rect2 r=rcache;
- r.pos+=base_ofs;
- draw_rect(r,items[i].custom_bg);
- }
- if (items[i].selected) {
- Rect2 r=rcache;
- r.pos+=base_ofs;
- r.pos.x-=sbsel->get_margin(MARGIN_LEFT);
- r.size.x+=sbsel->get_margin(MARGIN_LEFT)+sbsel->get_margin(MARGIN_RIGHT);
- r.pos.y-=sbsel->get_margin(MARGIN_TOP);
- r.size.y+=sbsel->get_margin(MARGIN_TOP)+sbsel->get_margin(MARGIN_BOTTOM);
+ Rect2 r=rcache;
+ r.pos+=base_ofs;
- draw_style_box(sbsel,r);
+ // Use stylebox to dimension potential bg color, even if not selected
+ r.pos.x-=sbsel->get_margin(MARGIN_LEFT);
+ r.size.x+=sbsel->get_margin(MARGIN_LEFT)+sbsel->get_margin(MARGIN_RIGHT);
+ r.pos.y-=sbsel->get_margin(MARGIN_TOP);
+ r.size.y+=sbsel->get_margin(MARGIN_TOP)+sbsel->get_margin(MARGIN_BOTTOM);
+ if (items[i].selected) {
+ draw_style_box(sbsel,r);
+ }
+ if (items[i].custom_bg.a>0.001) {
+ r.pos.x+=2;
+ r.size.x-=4;
+ r.pos.y+=2;
+ r.size.y-=4;
+ draw_rect(r,items[i].custom_bg);
}
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index 77331256f3..b845eba66b 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -162,6 +162,7 @@ EditorExportPlugin::EditorExportPlugin() {
/////////////////////////////////////////////////////////////////////////////////////////////////////
+
static void _add_to_list(EditorFileSystemDirectory *p_efsd,Set<StringName>& r_list) {
for(int i=0;i<p_efsd->get_subdir_count();i++) {
@@ -170,13 +171,11 @@ static void _add_to_list(EditorFileSystemDirectory *p_efsd,Set<StringName>& r_li
}
for(int i=0;i<p_efsd->get_file_count();i++) {
-
r_list.insert(p_efsd->get_file_path(i));
}
}
-
struct __EESortDepCmp {
_FORCE_INLINE_ bool operator()(const StringName& p_l,const StringName& p_r) const {
@@ -187,7 +186,7 @@ struct __EESortDepCmp {
-static void _add_files_with_filter(DirAccess *da,const List<String>& p_filters,Set<StringName>& r_list) {
+static void _edit_files_with_filter(DirAccess *da,const List<String>& p_filters,Set<StringName>& r_list,bool exclude) {
List<String> files;
@@ -218,8 +217,17 @@ static void _add_files_with_filter(DirAccess *da,const List<String>& p_filters,S
for(const List<String>::Element *F=p_filters.front();F;F=F->next()) {
if (fullpath.matchn(F->get())) {
- r_list.insert(fullpath);
- print_line("Added: "+fullpath);
+ String act = "Added: ";
+
+ if (!exclude) {
+ r_list.insert(fullpath);
+ } else {
+ act = "Removed: ";
+ r_list.erase(fullpath);
+ }
+
+
+ print_line(act+fullpath);
}
}
}
@@ -230,13 +238,13 @@ static void _add_files_with_filter(DirAccess *da,const List<String>& p_filters,S
if (E->get().begins_with("."))
continue;
da->change_dir(E->get());
- _add_files_with_filter(da,p_filters,r_list);
+ _edit_files_with_filter(da,p_filters,r_list,exclude);
da->change_dir("..");
}
}
-static void _add_filter_to_list(Set<StringName>& r_list,const String& p_filter) {
+static void _edit_filter_list(Set<StringName>& r_list,const String& p_filter,bool exclude) {
if (p_filter=="")
return;
@@ -250,11 +258,16 @@ static void _add_filter_to_list(Set<StringName>& r_list,const String& p_filter)
}
DirAccess *da = DirAccess::open("res://");
- _add_files_with_filter(da,filters,r_list);
+ _edit_files_with_filter(da,filters,r_list,exclude);
memdelete(da);
+}
+static void _add_filter_to_list(Set<StringName>& r_list,const String& p_filter) {
+ _edit_filter_list(r_list,p_filter,false);
+}
-
+static void _remove_filter_from_list(Set<StringName>& r_list,const String& p_filter) {
+ _edit_filter_list(r_list,p_filter,true);
}
Vector<uint8_t> EditorExportPlatform::get_exported_file_default(String& p_fname) const {
@@ -307,6 +320,8 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const
cf+="*.flags";
_add_filter_to_list(exported,cf);
+ cf = EditorImportExport::get_singleton()->get_export_custom_filter_exclude();
+ _remove_filter_from_list(exported,cf);
}
@@ -380,6 +395,9 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const
cf+="*.flags";
_add_filter_to_list(exported,cf);
+ cf = EditorImportExport::get_singleton()->get_export_custom_filter_exclude();
+ _remove_filter_from_list(exported,cf);
+
}
@@ -1530,13 +1548,17 @@ EditorImportExport::ExportFilter EditorImportExport::get_export_filter() const{
}
void EditorImportExport::set_export_custom_filter(const String& p_custom_filter){
-
export_custom_filter=p_custom_filter;
}
+void EditorImportExport::set_export_custom_filter_exclude(const String& p_custom_filter){
+ export_custom_filter_exclude=p_custom_filter;
+}
String EditorImportExport::get_export_custom_filter() const{
-
return export_custom_filter;
}
+String EditorImportExport::get_export_custom_filter_exclude() const{
+ return export_custom_filter_exclude;
+}
void EditorImportExport::set_export_image_action(ImageAction p_action) {
@@ -1699,6 +1721,7 @@ void EditorImportExport::load_config() {
export_custom_filter=cf->get_value("export_filter","filter");
+ export_custom_filter_exclude=cf->get_value("export_filter","filter_exclude");
String t=cf->get_value("export_filter","type");
if (t=="selected")
export_filter=EXPORT_SELECTED;
@@ -1888,6 +1911,7 @@ void EditorImportExport::save_config() {
}
cf->set_value("export_filter","filter",export_custom_filter);
+ cf->set_value("export_filter", "filter_exclude",export_custom_filter_exclude);
String file_action_section = "export_filter_files";
diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h
index 272464d9b0..60b7f919d8 100644
--- a/tools/editor/editor_import_export.h
+++ b/tools/editor/editor_import_export.h
@@ -285,7 +285,7 @@ protected:
Set<String> image_formats;
ExportFilter export_filter;
- String export_custom_filter;
+ String export_custom_filter, export_custom_filter_exclude;
Map<StringName,FileAction> files;
Map<StringName,Ref<EditorExportPlatform> > exporters;
Map<StringName,ImageGroup> image_groups;
@@ -332,7 +332,9 @@ public:
ExportFilter get_export_filter() const;
void set_export_custom_filter(const String& p_custom_filter);
+ void set_export_custom_filter_exclude(const String& p_custom_filter);
String get_export_custom_filter() const;
+ String get_export_custom_filter_exclude() const;
void set_export_image_action(ImageAction p_action);
ImageAction get_export_image_action() const;
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index 164443d001..b5e7715d93 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -217,6 +217,11 @@ void ProjectExportDialog::_filters_edited(String what) {
_save_export_cfg();
}
+void ProjectExportDialog::_filters_exclude_edited(String what) {
+ EditorImportExport::get_singleton()->set_export_custom_filter_exclude(what);
+ _save_export_cfg();
+}
+
void ProjectExportDialog::_quality_edited(float what) {
EditorImportExport::get_singleton()->set_export_image_quality(what);
@@ -314,6 +319,7 @@ void ProjectExportDialog::_notification(int p_what) {
export_mode->select( EditorImportExport::get_singleton()->get_export_filter() );
convert_text_scenes->set_pressed( EditorImportExport::get_singleton()->get_convert_text_scenes() );
filters->set_text( EditorImportExport::get_singleton()->get_export_custom_filter() );
+ filters_exclude->set_text( EditorImportExport::get_singleton()->get_export_custom_filter_exclude() );
if (EditorImportExport::get_singleton()->get_export_filter()!=EditorImportExport::EXPORT_SELECTED)
tree_vb->hide();
else
@@ -1083,6 +1089,7 @@ void ProjectExportDialog::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_prop_edited"),&ProjectExportDialog::_prop_edited);
ObjectTypeDB::bind_method(_MD("_export_mode_changed"),&ProjectExportDialog::_export_mode_changed);
ObjectTypeDB::bind_method(_MD("_filters_edited"),&ProjectExportDialog::_filters_edited);
+ ObjectTypeDB::bind_method(_MD("_filters_exclude_edited"),&ProjectExportDialog::_filters_exclude_edited);
ObjectTypeDB::bind_method(_MD("_export_action"),&ProjectExportDialog::_export_action);
ObjectTypeDB::bind_method(_MD("_export_action_pck"),&ProjectExportDialog::_export_action_pck);
ObjectTypeDB::bind_method(_MD("_quality_edited"),&ProjectExportDialog::_quality_edited);
@@ -1195,8 +1202,11 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
tree->set_column_min_width(1,90);
filters = memnew( LineEdit );
- vb->add_margin_child("Filters to export non-resource files (Comma Separated, ie: *.json, *.txt):",filters);
+ vb->add_margin_child("Filters to export non-resource files (Comma Separated, eg: *.json, *.txt):",filters);
filters->connect("text_changed",this,"_filters_edited");
+ filters_exclude = memnew( LineEdit );
+ vb->add_margin_child("Filters to exclude from export (Comma Separated, eg: *.json, *.txt):",filters_exclude);
+ filters_exclude->connect("text_changed",this,"_filters_exclude_edited");
convert_text_scenes = memnew( CheckButton );
convert_text_scenes->set_text("Convert text scenes to binary on export");
diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h
index b9e49489e3..dc076ce201 100644
--- a/tools/editor/project_export.h
+++ b/tools/editor/project_export.h
@@ -75,7 +75,7 @@ private:
ConfirmationDialog *confirm;
Button *button_reload;
- LineEdit *filters;
+ LineEdit *filters, *filters_exclude;
HBoxContainer *plat_errors;
Label *platform_error_string;
@@ -155,6 +155,7 @@ private:
void _platform_selected();
void _filters_edited(String what);
+ void _filters_exclude_edited(String what);
void _update_group_tree();
void _image_filter_changed(String);