summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/PCKPacker.xml9
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp4
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp7
-rw-r--r--platform/android/os_android.cpp34
5 files changed, 17 insertions, 39 deletions
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index f3091a3e3f..ff45ca925c 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -3,6 +3,14 @@
<brief_description>
</brief_description>
<description>
+ The [PCKPacker] is used to create packages in application runtime.
+ [codeblock]
+ var packer = PCKPacker.new()
+ packer.pck_start("test.pck", 0)
+ packer.add_file("res://text.txt", "text.txt")
+ packer.flush(false)
+ [/codeblock]
+ The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package.
</description>
<tutorials>
</tutorials>
@@ -15,6 +23,7 @@
<argument index="1" name="source_path" type="String">
</argument>
<description>
+ Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]).
</description>
</method>
<method name="flush">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index e14a3b3759..bf22b865d3 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -194,7 +194,7 @@
</return>
<description>
Reloads the currently active scene.
- Returns an [enum Error] code as described in [method change_scene], with the addition of [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet.
+ Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.
</description>
</method>
<method name="set_auto_accept_quit">
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index cc4c21cc04..a8cf5b46e1 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -3235,8 +3235,8 @@ void TileSetEditor::update_workspace_minsize() {
delete tiles;
workspace->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
- workspace_container->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
- workspace_overlay->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
+ workspace_container->set_custom_minimum_size(workspace_min_size * workspace->get_scale() + WORKSPACE_MARGIN * 2);
+ workspace_overlay->set_custom_minimum_size(workspace_min_size * workspace->get_scale() + WORKSPACE_MARGIN * 2);
}
void TileSetEditor::update_edited_region(const Vector2 &end_point) {
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index 23a86f8d2b..761a3de37c 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -907,8 +907,10 @@ void GDScriptTokenizerText::_advance() {
return;
}
hexa_found = true;
- } else if (GETCHAR(i) == 'b') {
- if (hexa_found || bin_found || str.length() != 1 || !((i == 1 && str[0] == '0') || (i == 2 && str[1] == '0' && str[0] == '-'))) {
+ } else if (hexa_found && _is_hex(GETCHAR(i))) {
+
+ } else if (!hexa_found && GETCHAR(i) == 'b') {
+ if (bin_found || str.length() != 1 || !((i == 1 && str[0] == '0') || (i == 2 && str[1] == '0' && str[0] == '-'))) {
_make_error("Invalid numeric constant at 'b'");
return;
}
@@ -921,7 +923,6 @@ void GDScriptTokenizerText::_advance() {
exponent_found = true;
} else if (_is_number(GETCHAR(i))) {
//all ok
- } else if (hexa_found && _is_hex(GETCHAR(i))) {
} else if (bin_found && _is_bin(GETCHAR(i))) {
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 9156181bbe..defee8f1f1 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -49,9 +49,6 @@
#include "java_godot_io_wrapper.h"
#include "java_godot_wrapper.h"
-#define PAN_GESTURE_MIN_DELTA 5 // only advertise PanGesture event with dx and dy greater than this
-#define MAGNIFY_GESTURE_MIN_FACTOR 0.1 // only advertise MagnifyGesture event with a factor difference from 1.0 greater than this
-
class AndroidLogger : public Logger {
public:
virtual void logv(const char *p_format, va_list p_list, bool p_err) {
@@ -409,35 +406,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ERR_FAIL_COND(touch.size() != p_points.size());
- if (touch.size() == 1) {
- Point2 d = (p_points[0].pos - touch.write[0].pos);
- if (fabs(d.x) > PAN_GESTURE_MIN_DELTA || fabs(d.y) > PAN_GESTURE_MIN_DELTA) {
- Ref<InputEventPanGesture> ev;
- ev.instance();
- ev->set_position(p_points[0].pos);
- ev->set_delta(d);
- input->parse_input_event(ev);
- touch.write[0].pos = p_points[0].pos;
- }
- } else if (touch.size() == 2) {
- Point2 v0 = touch[1].pos - touch[0].pos;
- float l0 = (v0.x * v0.x) + (v0.y * v0.y);
- if (l0 != 0.0) {
- Point2 v1 = p_points[1].pos - p_points[0].pos;
- float l1 = (v1.x * v1.x) + (v1.y * v1.y);
- float f = (l1 / l0);
- if (fabs(f - 1.0) > MAGNIFY_GESTURE_MIN_FACTOR) {
- Ref<InputEventMagnifyGesture> ev;
- ev.instance();
- ev->set_position(p_points[0].pos + v1 / 2);
- ev->set_factor(sqrt(f));
- input->parse_input_event(ev);
- touch.write[0].pos = p_points[0].pos;
- touch.write[1].pos = p_points[1].pos;
- }
- }
- }
-
for (int i = 0; i < touch.size(); i++) {
int idx = -1;
@@ -452,7 +420,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ERR_CONTINUE(idx == -1);
if (touch[i].pos == p_points[idx].pos)
- continue; //no unnecessary move
+ continue; //no move unncesearily
Ref<InputEventScreenDrag> ev;
ev.instance();