summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/AnimationPlayer.xml1
-rw-r--r--doc/classes/CheckBox.xml23
-rw-r--r--doc/classes/CheckButton.xml23
-rw-r--r--doc/classes/Tween.xml1
-rw-r--r--editor/editor_inspector.cpp2
-rw-r--r--editor/editor_sectioned_inspector.cpp6
-rw-r--r--modules/gdnative/SCsub20
-rw-r--r--modules/gdnative/gdnative_builders.py97
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java2
9 files changed, 47 insertions, 128 deletions
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 8bc2c34c6d..bb1754b810 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
+ [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween] node, but it requires doing everything by code.
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 5ba159880e..b5c7332bc1 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CheckBox" inherits="Button" version="3.2">
<brief_description>
- Binary choice user interface widget.
+ Binary choice user interface widget. See also [CheckButton].
</brief_description>
<description>
- A checkbox allows the user to make a binary choice (choosing only one of two possible options).
+ A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different apperance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
</description>
<tutorials>
</tutorials>
@@ -18,41 +18,58 @@
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
- The vertical offset used when rendering the check icons.
+ The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="checked" type="Texture">
+ The check icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is focused.
</theme_item>
<theme_item name="font" type="Font">
+ The [Font] to use for the [CheckBox] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ The [CheckBox] text's font color.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ The [CheckBox] text's font color when it's disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ The [CheckBox] text's font color when it's hovered.
</theme_item>
<theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckBox] text's font color when it's pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The separation between the check icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
<theme_item name="radio_checked" type="Texture">
+ If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="radio_unchecked" type="Texture">
+ If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
<theme_item name="unchecked" type="Texture">
+ The check icon to display when the [CheckBox] is unchecked.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index e6a890b21f..769acb5d16 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CheckButton" inherits="Button" version="3.2">
<brief_description>
- Checkable button.
+ Checkable button. See also [CheckBox].
</brief_description>
<description>
- CheckButton is a toggle button displayed as a check field.
+ CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different apperance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
</description>
<tutorials>
</tutorials>
@@ -18,41 +18,58 @@
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
- The vertical offset used when rendering the icons.
+ The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="disabled" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is focused.
</theme_item>
<theme_item name="font" type="Font">
+ The [Font] to use for the [CheckButton] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ The [CheckButton] text's font color.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ The [CheckButton] text's font color when it's disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ The [CheckButton] text's font color when it's hovered.
</theme_item>
<theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ The [CheckButton] text's font color when it's pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
+ The separation between the toggle icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
<theme_item name="off" type="Texture">
+ The icon to display when the [CheckButton] is unchecked.
</theme_item>
<theme_item name="off_disabled" type="Texture">
+ The icon to display when the [CheckButton] is unchecked and disabled.
</theme_item>
<theme_item name="on" type="Texture">
+ The icon to display when the [CheckButton] is checked.
</theme_item>
<theme_item name="on_disabled" type="Texture">
+ The icon to display when the [CheckButton] is checked and disabled.
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 9345cd059a..97d436c707 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
+ [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
Here is a brief usage example that causes a 2D node to move smoothly between two positions:
[codeblock]
var tween = get_node("Tween")
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 56da7d93fa..7c1e58862e 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1596,7 +1596,7 @@ void EditorInspector::update_tree() {
if (capitalize_paths)
cat = cat.capitalize();
- if (!filter.is_subsequence_ofi(cat) && !filter.is_subsequence_ofi(name))
+ if (!filter.is_subsequence_ofi(cat) && !filter.is_subsequence_ofi(name) && property_prefix.to_lower().find(filter.to_lower()) == -1)
continue;
}
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index 28825b45e1..2090c12c91 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -245,6 +245,9 @@ void SectionedInspector::update_category_list() {
if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene" || pi.name.begins_with("_global_script"))
continue;
+ if (!filter.empty() && !filter.is_subsequence_ofi(pi.name) && !filter.is_subsequence_ofi(pi.name.replace("/", " ").capitalize()))
+ continue;
+
int sp = pi.name.find("/");
if (sp == -1)
pi.name = "global/" + pi.name;
@@ -252,9 +255,6 @@ void SectionedInspector::update_category_list() {
Vector<String> sectionarr = pi.name.split("/");
String metasection;
- if (!filter.empty() && !filter.is_subsequence_ofi(sectionarr[sectionarr.size() - 1].capitalize()))
- continue;
-
int sc = MIN(2, sectionarr.size() - 1);
for (int i = 0; i < sc; i++) {
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 0cdd585558..a18c75fa27 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -30,23 +30,3 @@ _, gensource = env_gdnative.CommandNoCache(['include/gdnative_api_struct.gen.h',
env_gdnative.add_source_files(env.modules_sources, [gensource])
env.use_ptrcall = True
-
-
-if ARGUMENTS.get('gdnative_wrapper', False):
- gensource, = env_gdnative.CommandNoCache('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', run_in_subprocess(gdnative_builders.build_gdnative_wrapper_code))
-
- gd_wrapper_env = env.Clone()
- gd_wrapper_env.Prepend(CPPPATH=['#modules/gdnative/include/'])
-
- if gd_wrapper_env['use_lto']:
- if not env.msvc:
- gd_wrapper_env.Append(CCFLAGS=['-fno-lto'])
- gd_wrapper_env.Append(LINKFLAGS=['-fno-lto'])
- else:
- gd_wrapper_env.Append(CCFLAGS=['/GL-'])
- gd_wrapper_env.Append(LINKFLAGS=['/LTCG:OFF'])
-
- if not env.msvc:
- gd_wrapper_env.Append(CCFLAGS=['-fPIC'])
-
- lib = gd_wrapper_env.add_library("#bin/gdnative_wrapper_code", [gensource])
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index 20c1a2233c..0d95a65b7e 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -12,30 +12,6 @@ def _spaced(e):
def _build_gdnative_api_struct_header(api):
- gdnative_api_init_macro = [
- '\textern const godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct;'
- ]
-
- for ext in api['extensions']:
- name = ext['name']
- gdnative_api_init_macro.append(
- '\textern const godot_gdnative_ext_{0}_api_struct *_gdnative_wrapper_{0}_api_struct;'.format(name))
-
- gdnative_api_init_macro.append('\t_gdnative_wrapper_api_struct = options->api_struct;')
- gdnative_api_init_macro.append('\tfor (unsigned int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { ')
- gdnative_api_init_macro.append('\t\tswitch (_gdnative_wrapper_api_struct->extensions[i]->type) {')
-
- for ext in api['extensions']:
- name = ext['name']
- gdnative_api_init_macro.append(
- '\t\t\tcase GDNATIVE_EXT_%s:' % ext['type'])
- gdnative_api_init_macro.append(
- '\t\t\t\t_gdnative_wrapper_{0}_api_struct = (godot_gdnative_ext_{0}_api_struct *)'
- ' _gdnative_wrapper_api_struct->extensions[i];'.format(name))
- gdnative_api_init_macro.append('\t\t\t\tbreak;')
- gdnative_api_init_macro.append('\t\t}')
- gdnative_api_init_macro.append('\t}')
-
out = [
'/* THIS FILE IS GENERATED DO NOT EDIT */',
'#ifndef GODOT_GDNATIVE_API_STRUCT_H',
@@ -49,8 +25,6 @@ def _build_gdnative_api_struct_header(api):
'#include <pluginscript/godot_pluginscript.h>',
'#include <videodecoder/godot_videodecoder.h>',
'',
- '#define GDNATIVE_API_INIT(options) do { \\\n' + ' \\\n'.join(gdnative_api_init_macro) + ' \\\n } while (0)',
- '',
'#ifdef __cplusplus',
'extern "C" {',
'#endif',
@@ -238,76 +212,5 @@ def build_gdnative_api_struct(target, source, env):
fd.write(_build_gdnative_api_struct_source(api))
-def _build_gdnative_wrapper_code(api):
- out = [
- '/* THIS FILE IS GENERATED DO NOT EDIT */',
- '',
- '#include <gdnative/gdnative.h>',
- '#include <nativescript/godot_nativescript.h>',
- '#include <pluginscript/godot_pluginscript.h>',
- '#include <arvr/godot_arvr.h>',
- '#include <videodecoder/godot_videodecoder.h>',
- '',
- '#include <gdnative_api_struct.gen.h>',
- '',
- '#ifdef __cplusplus',
- 'extern "C" {',
- '#endif',
- '',
- 'godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct = 0;',
- ]
-
- for ext in api['extensions']:
- name = ext['name']
- out.append('godot_gdnative_ext_' + name + '_api_struct *_gdnative_wrapper_' + name + '_api_struct = 0;')
-
- out += ['']
-
- for funcdef in api['core']['api']:
- args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
-
- args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
-
- return_line = '\treturn ' if funcdef['return_type'] != 'void' else '\t'
- return_line += '_gdnative_wrapper_api_struct->' + funcdef['name'] + '(' + args + ');'
-
- out.append(return_line)
- out.append('}')
- out.append('')
-
- for ext in api['extensions']:
- name = ext['name']
- for funcdef in ext['api']:
- args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
-
- args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
-
- return_line = '\treturn ' if funcdef['return_type'] != 'void' else '\t'
- return_line += '_gdnative_wrapper_' + name + '_api_struct->' + funcdef['name'] + '(' + args + ');'
-
- out.append(return_line)
- out.append('}')
- out.append('')
-
- out += [
- '#ifdef __cplusplus',
- '}',
- '#endif'
- ]
-
- return '\n'.join(out)
-
-
-def build_gdnative_wrapper_code(target, source, env):
- with open(source[0], 'r') as fd:
- api = json.load(fd)
-
- wrapper_file = target[0]
- with open(wrapper_file, 'w') as fd:
- fd.write(_build_gdnative_wrapper_code(api))
-
-
if __name__ == '__main__':
subprocess_main(globals())
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
index 44998aa6c0..e901b4b36d 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
@@ -123,7 +123,7 @@ public class GodotEditText extends EditText {
}
private void setMaxInputLength(EditText p_edit_text, int p_max_input_length) {
- if (p_max_input_length >= 0) {
+ if (p_max_input_length > 0) {
InputFilter[] filters = new InputFilter[1];
filters[0] = new InputFilter.LengthFilter(p_max_input_length);
p_edit_text.setFilters(filters);