summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_node.cpp20
-rw-r--r--editor/editor_node.h8
-rw-r--r--editor/editor_themes.cpp5
-rw-r--r--editor/icons/icon_GUI_toggle_off.svg6
-rw-r--r--editor/icons/icon_GUI_toggle_on.svg6
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp2
-rw-r--r--editor/project_settings_editor.cpp6
-rw-r--r--editor/script_create_dialog.cpp2
-rw-r--r--modules/gdnative/SCsub45
-rw-r--r--modules/gdnative/arvr/SCsub (renamed from modules/gdnative/nativearvr/SCsub)0
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.cpp (renamed from modules/gdnative/nativearvr/arvr_interface_gdnative.cpp)0
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.h (renamed from modules/gdnative/nativearvr/arvr_interface_gdnative.h)0
-rw-r--r--modules/gdnative/arvr/config.py (renamed from modules/gdnative/nativearvr/config.py)0
-rw-r--r--modules/gdnative/arvr/register_types.cpp (renamed from modules/gdnative/nativearvr/register_types.cpp)4
-rw-r--r--modules/gdnative/arvr/register_types.h (renamed from modules/gdnative/nativearvr/register_types.h)4
-rw-r--r--modules/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative_api.json26
-rw-r--r--modules/gdnative/include/arvr/godot_arvr.h (renamed from modules/gdnative/include/nativearvr/godot_nativearvr.h)2
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h2
-rw-r--r--modules/gdnative/register_types.cpp6
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/2d/tile_map.cpp23
-rw-r--r--scene/2d/tile_map.h4
-rw-r--r--scene/gui/check_button.cpp23
-rw-r--r--scene/gui/check_button.h1
-rw-r--r--servers/physics/space_sw.cpp4
-rw-r--r--servers/visual/visual_server_canvas.h2
-rw-r--r--servers/visual_server.h2
28 files changed, 142 insertions, 65 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 740dd360ae..0675cf2c75 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5388,12 +5388,12 @@ EditorNode::EditorNode() {
save_confirmation->connect("confirmed", this, "_menu_confirm_current");
save_confirmation->connect("custom_action", this, "_discard_changes");
- file_templates = memnew(FileDialog);
+ file_templates = memnew(EditorFileDialog);
file_templates->set_title(TTR("Import Templates From ZIP File"));
gui_base->add_child(file_templates);
- file_templates->set_mode(FileDialog::MODE_OPEN_FILE);
- file_templates->set_access(FileDialog::ACCESS_FILESYSTEM);
+ file_templates->set_mode(EditorFileDialog::MODE_OPEN_FILE);
+ file_templates->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_templates->clear_filters();
file_templates->add_filter("*.tpz ; Template Package");
@@ -5401,15 +5401,15 @@ EditorNode::EditorNode() {
gui_base->add_child(file);
file->set_current_dir("res://");
- file_export = memnew(FileDialog);
- file_export->set_access(FileDialog::ACCESS_FILESYSTEM);
+ file_export = memnew(EditorFileDialog);
+ file_export->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
gui_base->add_child(file_export);
file_export->set_title(TTR("Export Project"));
file_export->connect("file_selected", this, "_dialog_action");
- file_export_lib = memnew(FileDialog);
+ file_export_lib = memnew(EditorFileDialog);
file_export_lib->set_title(TTR("Export Library"));
- file_export_lib->set_mode(FileDialog::MODE_SAVE_FILE);
+ file_export_lib->set_mode(EditorFileDialog::MODE_SAVE_FILE);
file_export_lib->connect("file_selected", this, "_dialog_action");
file_export_lib_merge = memnew(CheckButton);
file_export_lib_merge->set_text(TTR("Merge With Existing"));
@@ -5422,10 +5422,10 @@ EditorNode::EditorNode() {
file_export_password->set_editable(false);
file_export->get_vbox()->add_margin_child(TTR("Password:"), file_export_password);
- file_script = memnew(FileDialog);
+ file_script = memnew(EditorFileDialog);
file_script->set_title(TTR("Open & Run a Script"));
- file_script->set_access(FileDialog::ACCESS_FILESYSTEM);
- file_script->set_mode(FileDialog::MODE_OPEN_FILE);
+ file_script->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ file_script->set_mode(EditorFileDialog::MODE_OPEN_FILE);
List<String> sexts;
ResourceLoader::get_recognized_extensions_for_type("Script", &sexts);
for (List<String>::Element *E = sexts.front(); E; E = E->next()) {
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 6e0117a4ac..7d0649cef3 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -294,10 +294,10 @@ private:
ProjectSettingsEditor *project_settings;
EditorFileDialog *file;
ExportTemplateManager *export_template_manager;
- FileDialog *file_templates;
- FileDialog *file_export;
- FileDialog *file_export_lib;
- FileDialog *file_script;
+ EditorFileDialog *file_templates;
+ EditorFileDialog *file_export;
+ EditorFileDialog *file_export_lib;
+ EditorFileDialog *file_script;
CheckButton *file_export_lib_merge;
LineEdit *file_export_password;
String current_path;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index de0c3f55cc..ffa978e194 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -568,6 +568,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("modulate_arrow", "OptionButton", true);
// CheckButton
+ theme->set_stylebox("normal", "CheckButton", style_menu);
+ theme->set_stylebox("pressed", "CheckButton", style_menu);
+ theme->set_stylebox("disabled", "CheckButton", style_menu);
+ theme->set_stylebox("hover", "CheckButton", style_menu);
+
theme->set_icon("on", "CheckButton", theme->get_icon("GuiToggleOn", "EditorIcons"));
theme->set_icon("off", "CheckButton", theme->get_icon("GuiToggleOff", "EditorIcons"));
diff --git a/editor/icons/icon_GUI_toggle_off.svg b/editor/icons/icon_GUI_toggle_off.svg
index 0d43b158b5..aea0f85f96 100644
--- a/editor/icons/icon_GUI_toggle_off.svg
+++ b/editor/icons/icon_GUI_toggle_off.svg
@@ -1,5 +1,5 @@
-<svg width="64" height="32" version="1.1" viewBox="0 0 64 31.999998" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<path transform="translate(0 1020.4)" d="m24 4.002c-6.6307 0-12 5.3654-12 11.996v0.003906c0 6.6307 5.3693 12 12 12h16c6.6307 0 12-5.3693 12-12v-0.003906c0-6.6307-5.3693-11.996-12-11.996h-16zm0 2h16c5.5573 0 10 4.4388 10 9.9961v0.003906c0 5.5573-4.4427 10-10 10h-16c-5.5573 0-10-4.4427-10-10v-0.003906c0-5.5573 4.4427-9.9961 10-9.9961zm7 4.9961a1.0001 1.0001 0 0 0 -1 1v8a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-3h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2v-2h4a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-5zm9 0a1.0001 1.0001 0 0 0 -1 1v4 4a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-3h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2v-2h4a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-5zm-17 0.003906c-2.7496 0-5 2.2504-5 5s2.2504 5 5 5 5-2.2504 5-5-2.2504-5-5-5zm0 2c1.6687 0 3 1.3313 3 3s-1.3313 3-3 3-3-1.3313-3-3 1.3313-3 3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<svg width="42" height="26" version="1.1" viewBox="0 0 42 25.999998" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1026.4)">
+<path d="m13 1027.4c-6.6307 0-12 5.3663-12 11.998 0 6.6318 5.3693 12.002 12 12.002h16c6.6307 0 12-5.3702 12-12.002 0-6.6317-5.3693-11.998-12-11.998zm0 2.0003h16c5.5573 0 10 4.4395 10 9.9977 0 5.5583-4.4427 10.002-10 10.002h-16c-5.5573 0-10-4.4434-10-10.002 0-5.5582 4.4427-9.9977 10-9.9977zm7 4.9969a1.0001 1.0003 0 0 0 -1 1.0002v8.0013a1 1.0002 0 0 0 1 1.0002 1 1.0002 0 0 0 1 -1.0002v-3.0005h2a1 1.0002 0 0 0 1 -1.0002 1 1.0002 0 0 0 -1 -1.0001h-2v-2.0003h4a1 1.0002 0 0 0 1 -1.0002 1 1.0002 0 0 0 -1 -1.0002zm9 0a1.0001 1.0003 0 0 0 -1 1.0002v8.0013a1 1.0002 0 0 0 1 1.0002 1 1.0002 0 0 0 1 -1.0002v-3.0005h2a1 1.0002 0 0 0 1 -1.0002 1 1.0002 0 0 0 -1 -1.0001h-2v-2.0003h4a1 1.0002 0 0 0 1 -1.0002 1 1.0002 0 0 0 -1 -1.0002zm-17 0c-2.7496 0-5 2.2508-5 5.0008 0 2.7501 2.2504 5.0009 5 5.0009s5-2.2508 5-5.0009c0-2.75-2.2504-5.0008-5-5.0008zm0 2.0004c1.6687 0 3 1.3315 3 3.0004 0 1.669-1.3313 3.0005-3 3.0005s-3-1.3315-3-3.0005c0-1.6689 1.3313-3.0004 3-3.0004z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_GUI_toggle_on.svg b/editor/icons/icon_GUI_toggle_on.svg
index fd2b915fc3..c0a11810d4 100644
--- a/editor/icons/icon_GUI_toggle_on.svg
+++ b/editor/icons/icon_GUI_toggle_on.svg
@@ -1,5 +1,5 @@
-<svg width="64" height="32" version="1.1" viewBox="0 0 64 31.999998" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<path transform="translate(0 1020.4)" d="m24 4.002c-6.6307 0-12 5.3654-12 11.996 0 6.6307 5.3693 12 12 12h16c6.6307 0 12-5.3693 12-12 0-6.6307-5.3693-11.996-12-11.996h-16zm17 6.9961a1 1 0 0 1 1 1v8a1.0001 1.0001 0 0 1 -1.752 0.66211l-5.248-6v5.3379a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1v-8a1.0001 1.0001 0 0 1 1.752 -0.6582l5.248 6v-5.3418a1 1 0 0 1 1 -1zm-15 0.003906c2.7496 0 5 2.2504 5 5s-2.2504 5-5 5-5-2.2504-5-5 2.2504-5 5-5zm0 2c-1.6687 0-3 1.3313-3 3s1.3313 3 3 3 3-1.3313 3-3-1.3313-3-3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<svg width="42" height="26" version="1.1" viewBox="0 0 42 25.999998" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1026.4)">
+<path d="m13 1027.4c-6.6307 0-12 5.3662-12 11.998s5.3693 12.002 12 12.002h16c6.6307 0 12-5.3702 12-12.002s-5.3693-11.998-12-11.998zm17 6.9972a1 1.0002 0 0 1 1 1.0001v8.0014a1.0001 1.0003 0 0 1 -1.752 0.6623l-5.248-6.001v5.3387a1 1.0002 0 0 1 -1 1.0001 1 1.0002 0 0 1 -1 -1.0001v-8.0014a1.0001 1.0003 0 0 1 1.752 -0.6583l5.248 6.001v-5.3427a1 1.0002 0 0 1 1 -1.0001zm-15 0c2.7496 0 5 2.2507 5 5.0008s-2.2504 5.0008-5 5.0008-5-2.2507-5-5.0008 2.2504-5.0008 5-5.0008zm0 2.0003c-1.6687 0-3 1.3315-3 3.0005s1.3313 3.0005 3 3.0005 3-1.3315 3-3.0005-1.3313-3.0005-3-3.0005z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index d421b3798b..3210af1433 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -43,7 +43,7 @@ void ResourcePreloaderEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
load->set_icon(get_icon("Folder", "EditorIcons"));
- _delete->set_icon(get_icon("Del", "EditorIcons"));
+ _delete->set_icon(get_icon("Remove", "EditorIcons"));
}
if (p_what == NOTIFICATION_READY) {
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index b21c176543..340ea708b4 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -1318,7 +1318,7 @@ void ProjectSettingsEditor::_update_translations() {
t->set_text(0, translations[i].replace_first("res://", ""));
t->set_tooltip(0, translations[i]);
t->set_metadata(0, i);
- t->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove"));
+ t->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove"));
}
}
@@ -1436,7 +1436,7 @@ void ProjectSettingsEditor::_update_translations() {
t->set_text(0, keys[i].replace_first("res://", ""));
t->set_tooltip(0, keys[i]);
t->set_metadata(0, keys[i]);
- t->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove"));
+ t->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove"));
if (keys[i] == remap_selected) {
t->select(0);
translation_res_option_add_button->set_disabled(false);
@@ -1454,7 +1454,7 @@ void ProjectSettingsEditor::_update_translations() {
t2->set_text(0, path.replace_first("res://", ""));
t2->set_tooltip(0, path);
t2->set_metadata(0, j);
- t2->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove"));
+ t2->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove"));
t2->set_cell_mode(1, TreeItem::CELL_MODE_RANGE);
t2->set_text(1, langnames);
t2->set_editable(1, true);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index c19b80e649..0f1712c224 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -703,9 +703,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
internal = memnew(CheckButton);
internal->connect("pressed", this, "_built_in_pressed");
hb = memnew(HBoxContainer);
- Control *empty = memnew(Control);
hb->add_child(internal);
- hb->add_child(empty);
l = memnew(Label);
l->set_text(TTR("Built-in Script"));
l->set_align(Label::ALIGN_RIGHT);
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index c0d1d114d7..88588417d1 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -12,7 +12,7 @@ gdn_env.add_source_files(env.modules_sources, "nativescript/*.cpp")
gdn_env.Append(CPPPATH=['#modules/gdnative/include/'])
-SConscript("nativearvr/SCsub")
+SConscript("arvr/SCsub")
SConscript("pluginscript/SCsub")
def _spaced(e):
@@ -25,7 +25,7 @@ def _build_gdnative_api_struct_header(api):
'#define GODOT_GDNATIVE_API_STRUCT_H',
'',
'#include <gdnative/gdnative.h>',
- '#include <nativearvr/godot_nativearvr.h>',
+ '#include <arvr/godot_arvr.h>',
'#include <nativescript/godot_nativescript.h>',
'#include <pluginscript/godot_pluginscript.h>',
'',
@@ -35,34 +35,47 @@ def _build_gdnative_api_struct_header(api):
'extern "C" {',
'#endif',
'',
+ 'typedef struct godot_gdnative_api_version {',
+ '\tunsigned int major;',
+ '\tunsigned int minor;',
+ '} godot_gdnative_api_version;',
+ '',
+ 'typedef struct godot_gdnative_api_struct {',
+ '\tunsigned int type;',
+ '\tgodot_gdnative_api_version version;',
+ '\tconst godot_gdnative_api_struct *next;',
+ '} godot_gdnative_api_struct;',
+ '',
'enum GDNATIVE_API_TYPES {',
'\tGDNATIVE_' + api['core']['type'] + ','
]
for name in api['extensions']:
- out += ['\tGDNATIVE_' + api['extensions'][name]['type'] + ',']
+ out += ['\tGDNATIVE_EXT_' + api['extensions'][name]['type'] + ',']
out += ['};', '']
for name in api['extensions']:
out += [
- 'typedef struct godot_gdnative_' + name + '_api_struct {',
+ 'typedef struct godot_gdnative_ext_' + name + '_api_struct {',
'\tunsigned int type;',
- '\tconst void *next;'
+ '\tgodot_gdnative_api_version version;',
+ '\tconst godot_gdnative_api_struct *next;'
]
for funcdef in api['extensions'][name]['api']:
args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
out.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcdef['name'], args))
- out += ['} godot_gdnative_' + name + '_api_struct;', '']
+ out += ['} godot_gdnative_ext_' + name + '_api_struct;', '']
out += [
- 'typedef struct godot_gdnative_api_struct {',
+ 'typedef struct godot_gdnative_core_api_struct {',
'\tunsigned int type;',
- '\tconst void *next;',
+ '\tgodot_gdnative_api_version version;',
+ '\tconst godot_gdnative_api_struct *next;',
'\tunsigned int num_extensions;',
- '\tconst void **extensions;',
+ '\tconst godot_gdnative_api_struct **extensions;',
]
for funcdef in api['core']['api']:
@@ -70,7 +83,7 @@ def _build_gdnative_api_struct_header(api):
out.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcdef['name'], args))
out += [
- '} godot_gdnative_api_struct;',
+ '} godot_gdnative_core_api_struct;',
'',
'#ifdef __cplusplus',
'}',
@@ -91,8 +104,9 @@ def _build_gdnative_api_struct_source(api):
for name in api['extensions']:
out += [
- 'extern const godot_gdnative_' + name + '_api_struct api_extension_' + name + '_struct = {',
- '\tGDNATIVE_' + api['extensions'][name]['type'] + ',',
+ 'extern const godot_gdnative_ext_' + name + '_api_struct api_extension_' + name + '_struct = {',
+ '\tGDNATIVE_EXT_' + api['extensions'][name]['type'] + ',',
+ '\t{' + str(api['extensions'][name]['version']['major']) + ', ' + str(api['extensions'][name]['version']['minor']) + '},',
'\tNULL,'
]
@@ -101,16 +115,17 @@ def _build_gdnative_api_struct_source(api):
out += ['};\n']
- out += ['', 'const void *gdnative_extensions_pointers[] = {']
+ out += ['', 'const godot_gdnative_api_struct *gdnative_extensions_pointers[] = {']
for name in api['extensions']:
- out += ['\t(void *)&api_extension_' + name + '_struct,']
+ out += ['\t(godot_gdnative_api_struct *)&api_extension_' + name + '_struct,']
out += ['};\n']
out += [
- 'extern const godot_gdnative_api_struct api_struct = {',
+ 'extern const godot_gdnative_core_api_struct api_struct = {',
'\tGDNATIVE_' + api['core']['type'] + ',',
+ '\t{' + str(api['core']['version']['major']) + ', ' + str(api['core']['version']['minor']) + '},',
'\tNULL,',
'\t' + str(len(api['extensions'])) + ',',
'\tgdnative_extensions_pointers,',
diff --git a/modules/gdnative/nativearvr/SCsub b/modules/gdnative/arvr/SCsub
index ecc5996108..ecc5996108 100644
--- a/modules/gdnative/nativearvr/SCsub
+++ b/modules/gdnative/arvr/SCsub
diff --git a/modules/gdnative/nativearvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
index e2a7019fa4..e2a7019fa4 100644
--- a/modules/gdnative/nativearvr/arvr_interface_gdnative.cpp
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
diff --git a/modules/gdnative/nativearvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h
index e45b51e070..e45b51e070 100644
--- a/modules/gdnative/nativearvr/arvr_interface_gdnative.h
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.h
diff --git a/modules/gdnative/nativearvr/config.py b/modules/gdnative/arvr/config.py
index 4d1bdfe4d1..4d1bdfe4d1 100644
--- a/modules/gdnative/nativearvr/config.py
+++ b/modules/gdnative/arvr/config.py
diff --git a/modules/gdnative/nativearvr/register_types.cpp b/modules/gdnative/arvr/register_types.cpp
index c7d7847a21..139750a02d 100644
--- a/modules/gdnative/nativearvr/register_types.cpp
+++ b/modules/gdnative/arvr/register_types.cpp
@@ -31,9 +31,9 @@
#include "register_types.h"
#include "arvr_interface_gdnative.h"
-void register_nativearvr_types() {
+void register_arvr_types() {
ClassDB::register_class<ARVRInterfaceGDNative>();
}
-void unregister_nativearvr_types() {
+void unregister_arvr_types() {
}
diff --git a/modules/gdnative/nativearvr/register_types.h b/modules/gdnative/arvr/register_types.h
index 5e7557c7e9..4918319926 100644
--- a/modules/gdnative/nativearvr/register_types.h
+++ b/modules/gdnative/arvr/register_types.h
@@ -28,5 +28,5 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-void register_nativearvr_types();
-void unregister_nativearvr_types();
+void register_arvr_types();
+void unregister_arvr_types();
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 3fc04a5498..832a0cb859 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -41,7 +41,7 @@ const String init_symbol = "godot_gdnative_init";
const String terminate_symbol = "godot_gdnative_terminate";
// Defined in gdnative_api_struct.gen.cpp
-extern const godot_gdnative_api_struct api_struct;
+extern const godot_gdnative_core_api_struct api_struct;
String GDNativeLibrary::platform_names[NUM_PLATFORMS + 1] = {
"X11_32bit",
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 2a67911aac..770fb429c7 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -1,6 +1,10 @@
{
"core": {
- "type": "CORE_1_0_0",
+ "type": "CORE",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
"api": [
{
"name": "godot_color_new_rgba",
@@ -5604,7 +5608,11 @@
},
"extensions": {
"nativescript": {
- "type": "NATIVESCRIPT_1_0_0",
+ "type": "NATIVESCRIPT",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
"api": [
{
"name": "godot_nativescript_register_class",
@@ -5670,7 +5678,11 @@
]
},
"pluginscript": {
- "type": "PLUGINSCRIPT_1_0_0",
+ "type": "PLUGINSCRIPT",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
"api": [
{
"name": "godot_pluginscript_register_language",
@@ -5681,8 +5693,12 @@
}
]
},
- "nativearvr": {
- "type": "NATIVEARVR_1_0_0",
+ "arvr": {
+ "type": "ARVR",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
"api": [
{
"name": "godot_arvr_register_interface",
diff --git a/modules/gdnative/include/nativearvr/godot_nativearvr.h b/modules/gdnative/include/arvr/godot_arvr.h
index a4f4d6a9f1..c12251439d 100644
--- a/modules/gdnative/include/nativearvr/godot_nativearvr.h
+++ b/modules/gdnative/include/arvr/godot_arvr.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_nativearvr.h */
+/* godot_arvr.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 25d45db306..8fa96fd3af 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -237,7 +237,7 @@ typedef struct {
uint64_t editor_api_hash;
uint64_t no_api_hash;
godot_object *gd_native_library; // pointer to GDNativeLibrary that is being initialized
- const struct godot_gdnative_api_struct *api_struct;
+ const struct godot_gdnative_core_api_struct *api_struct;
const godot_string *active_library_path;
} godot_gdnative_init_options;
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index 87f9cddaa2..19a62b9c4f 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -35,7 +35,7 @@
#include "io/resource_loader.h"
#include "io/resource_saver.h"
-#include "nativearvr/register_types.h"
+#include "arvr/register_types.h"
#include "nativescript/register_types.h"
#include "pluginscript/register_types.h"
@@ -157,7 +157,7 @@ void register_gdnative_types() {
GDNativeCallRegistry::singleton->register_native_call_type("standard_varcall", cb_standard_varcall);
- register_nativearvr_types();
+ register_arvr_types();
register_nativescript_types();
register_pluginscript_types();
@@ -214,7 +214,7 @@ void unregister_gdnative_types() {
unregister_pluginscript_types();
unregister_nativescript_types();
- unregister_nativearvr_types();
+ unregister_arvr_types();
memdelete(GDNativeCallRegistry::singleton);
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 1afbd150a2..cb8ee761e6 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -248,7 +248,7 @@ public:
void draw_circle(const Point2 &p_pos, float p_radius, const Color &p_color);
void draw_texture(const Ref<Texture> &p_texture, const Point2 &p_pos, const Color &p_modulate = Color(1, 1, 1, 1), const Ref<Texture> &p_normal_map = Ref<Texture>());
void draw_texture_rect(const Ref<Texture> &p_texture, const Rect2 &p_rect, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>());
- void draw_texture_rect_region(const Ref<Texture> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>(), bool p_clip_uv = true);
+ void draw_texture_rect_region(const Ref<Texture> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>(), bool p_clip_uv = false);
void draw_style_box(const Ref<StyleBox> &p_style_box, const Rect2 &p_rect);
void draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, Ref<Texture> p_texture = Ref<Texture>(), float p_width = 1, const Ref<Texture> &p_normal_map = Ref<Texture>());
void draw_polygon(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture> p_texture = Ref<Texture>(), const Ref<Texture> &p_normal_map = Ref<Texture>(), bool p_antialiased = false);
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 41097ce8d7..5fb9e3f527 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -448,13 +448,12 @@ void TileMap::_update_dirty_quadrants() {
if (r == Rect2()) {
tex->draw_rect(canvas_item, rect, false, modulate, c.transpose, normal_map);
} else {
- tex->draw_rect_region(canvas_item, rect, r, modulate, c.transpose, normal_map);
+ tex->draw_rect_region(canvas_item, rect, r, modulate, c.transpose, normal_map, clip_uv);
}
Vector<TileSet::ShapeData> shapes = tile_set->tile_get_shapes(c.id);
for (int i = 0; i < shapes.size(); i++) {
-
Ref<Shape2D> shape = shapes[i].shape;
if (shape.is_valid()) {
Transform2D xform;
@@ -1236,6 +1235,21 @@ void TileMap::set_light_mask(int p_light_mask) {
}
}
+void TileMap::set_clip_uv(bool p_enable) {
+
+ if (clip_uv == p_enable)
+ return;
+
+ _clear_quadrants();
+ clip_uv = p_enable;
+ _recreate_quadrants();
+}
+
+bool TileMap::get_clip_uv() const {
+
+ return clip_uv;
+}
+
void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_tileset", "tileset"), &TileMap::set_tileset);
@@ -1268,6 +1282,9 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_center_y", "enable"), &TileMap::set_center_y);
ClassDB::bind_method(D_METHOD("get_center_y"), &TileMap::get_center_y);
+ ClassDB::bind_method(D_METHOD("set_clip_uv", "enable"), &TileMap::set_clip_uv);
+ ClassDB::bind_method(D_METHOD("get_clip_uv"), &TileMap::get_clip_uv);
+
ClassDB::bind_method(D_METHOD("set_y_sort_mode", "enable"), &TileMap::set_y_sort_mode);
ClassDB::bind_method(D_METHOD("is_y_sort_mode_enabled"), &TileMap::is_y_sort_mode_enabled);
@@ -1329,6 +1346,7 @@ void TileMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_half_offset", PROPERTY_HINT_ENUM, "Offset X,Offset Y,Disabled"), "set_half_offset", "get_half_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_tile_origin", PROPERTY_HINT_ENUM, "Top Left,Center,Bottom Left"), "set_tile_origin", "get_tile_origin");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_y_sort"), "set_y_sort_mode", "is_y_sort_mode_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_clip_uv"), "set_clip_uv", "get_clip_uv");
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_kinematic", PROPERTY_HINT_NONE, ""), "set_collision_use_kinematic", "get_collision_use_kinematic");
@@ -1379,6 +1397,7 @@ TileMap::TileMap() {
navigation = NULL;
y_sort_mode = false;
occluder_light_mask = 1;
+ clip_uv = false;
fp_adjust = 0.00001;
tile_origin = TILE_ORIGIN_TOP_LEFT;
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index c9d14e09d1..706b87cec3 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -161,6 +161,7 @@ private:
bool used_size_cache_dirty;
bool quadrant_order_dirty;
bool y_sort_mode;
+ bool clip_uv;
float fp_adjust;
float friction;
float bounce;
@@ -285,6 +286,9 @@ public:
virtual void set_use_parent_material(bool p_use_parent_material);
+ void set_clip_uv(bool p_enable);
+ bool get_clip_uv() const;
+
void clear();
TileMap();
diff --git a/scene/gui/check_button.cpp b/scene/gui/check_button.cpp
index e68159e27f..77fdedd5e5 100644
--- a/scene/gui/check_button.cpp
+++ b/scene/gui/check_button.cpp
@@ -32,6 +32,23 @@
#include "print_string.h"
#include "servers/visual_server.h"
+Size2 CheckButton::get_minimum_size() const {
+
+ Size2 minsize = Button::get_minimum_size();
+
+ Ref<Texture> on = Control::get_icon("on");
+ Ref<Texture> off = Control::get_icon("off");
+ Size2 tex_size = Size2(0, 0);
+ if (!on.is_null())
+ tex_size = Size2(on->get_width(), on->get_height());
+ if (!off.is_null())
+ tex_size = Size2(MAX(tex_size.width, off->get_width()), MAX(tex_size.height, off->get_height()));
+ minsize += Size2(tex_size.width + get_constant("hseparation"), 0);
+ minsize.height = MAX(minsize.height, tex_size.height);
+
+ return get_stylebox("normal")->get_minimum_size() + minsize;
+}
+
void CheckButton::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {
@@ -41,9 +58,11 @@ void CheckButton::_notification(int p_what) {
Ref<Texture> on = Control::get_icon("on");
Ref<Texture> off = Control::get_icon("off");
+ Ref<StyleBox> sb = get_stylebox("normal");
+ Size2 sb_ofs = Size2(sb->get_margin(MARGIN_RIGHT), sb->get_margin(MARGIN_TOP));
Vector2 ofs;
- ofs.x = get_size().width - on->get_width();
- ofs.y = int((get_size().height - on->get_height()) / 2);
+ ofs.x = get_minimum_size().width - (on->get_width() + sb_ofs.width);
+ ofs.y = sb_ofs.height;
if (is_pressed())
on->draw(ci, ofs);
diff --git a/scene/gui/check_button.h b/scene/gui/check_button.h
index af3b80fe04..eb68943fe7 100644
--- a/scene/gui/check_button.h
+++ b/scene/gui/check_button.h
@@ -39,6 +39,7 @@ class CheckButton : public Button {
GDCLASS(CheckButton, Button);
protected:
+ virtual Size2 get_minimum_size() const;
void _notification(int p_what);
public:
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 7e68d54bfa..7fac56f3d7 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -956,15 +956,15 @@ void SpaceSW::call_queries() {
while (state_query_list.first()) {
BodySW *b = state_query_list.first()->self();
- b->call_queries();
state_query_list.remove(state_query_list.first());
+ b->call_queries();
}
while (monitor_query_list.first()) {
AreaSW *a = monitor_query_list.first()->self();
- a->call_queries();
monitor_query_list.remove(monitor_query_list.first());
+ a->call_queries();
}
}
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index 09ac9959f9..a92370f1f0 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -175,7 +175,7 @@ public:
void canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color);
void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color);
void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID());
- void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID(), bool p_clip_uv = true);
+ void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID(), bool p_clip_uv = false);
void canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, VS::NinePatchAxisMode p_x_axis_mode = VS::NINE_PATCH_STRETCH, VS::NinePatchAxisMode p_y_axis_mode = VS::NINE_PATCH_STRETCH, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1), RID p_normal_map = RID());
void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0, RID p_normal_map = RID());
void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), RID p_normal_map = RID(), bool p_antialiased = false);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 86c32a45a0..7b0976b100 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -810,7 +810,7 @@ public:
virtual void canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color) = 0;
virtual void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color) = 0;
virtual void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID()) = 0;
- virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID(), bool p_clip_uv = true) = 0;
+ virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID(), bool p_clip_uv = false) = 0;
virtual void canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, NinePatchAxisMode p_x_axis_mode = NINE_PATCH_STRETCH, NinePatchAxisMode p_y_axis_mode = NINE_PATCH_STRETCH, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1), RID p_normal_map = RID()) = 0;
virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0, RID p_normal_map = RID()) = 0;
virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), RID p_normal_map = RID(), bool p_antialiased = false) = 0;