Commit Graph

804 Commits

Author SHA1 Message Date
thebestnom 166103c759 Android: Keyboard modifier and arrow key support 2020-07-21 22:13:24 +03:00
Rémi Verschelde b7aa474680
Merge pull request #40422 from amanj120/forward_port_bundle_pr_resources
Create strings.xml files in the Gradle project to handle localization
2020-07-20 22:26:44 +02:00
PouleyKetchoupp d7aaec8ffe Disable virtual keyboard focus adjustment on Android
Fixes #37190

The default adjustment setting was causing the view to pan down in order
to adjust the focus on the text content.

We don't need any focus adjustment since we're using a fixed size window
for our application.

Documentation:
https://developer.android.com/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_NOTHING
2020-07-20 12:04:02 +02:00
Aman Jain 5ff6f7a86b Create strings.xml files in the gradle project to handle localization 2020-07-15 13:02:59 -04:00
thebestnom 4dc94e93bb Android: fix display server always alerting no Vulkan support 2020-07-14 19:37:36 +03:00
Rémi Verschelde 28e8347d6c
Merge pull request #40354 from bruvzg/add_vulkan_init_message
Display error popup instead of crashing if Vulkan init failed.
2020-07-14 09:03:25 +02:00
Aaron Franke 9986439352
Commit other files changed by file_format.sh 2020-07-13 14:14:11 -04:00
bruvzg 996910b627
Add error messages if Vulkan init failed, prevent Vulkan context freeing uninitialized device and instance. 2020-07-13 19:24:21 +03:00
Marcel Admiraal 26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
Rémi Verschelde dc856481ff
Merge pull request #40244 from amanj120/forward_port_bundle_pr_permissions
Refactor permissions and command line flags into separate methods
2020-07-10 13:19:37 +02:00
Aman Jain f579057748 Refactor permissions and command line flags into separate methods 2020-07-09 16:34:08 -04:00
Aman Jain 78e003951a Utility methods for writing files to Gradle project. 2020-07-09 13:57:15 -04:00
Stijn Hinlopen 929b98d24b Remove String::find_last (same as rfind) 2020-07-03 15:26:22 +02:00
Juan Linietsky 438c380458 Add a separate application focus/in notification out from Window focus notification. 2020-06-30 10:40:06 -03:00
Fredia Huya-Kouadio 2d53b8173e Fix the logic to enable focus awareness 2020-06-27 16:43:08 -07:00
Fredia Huya-Kouadio 175d43738a Enable the ability to use Godot as a subview within an Android app 2020-06-25 19:52:40 -07:00
Fredia Huya-Kouadio 206cbd960b Follow up cleanup for the godotpayment project module 2020-06-22 12:53:25 -07:00
Timo Schwarzer 83a966f0d8
Remove GodotPayment android plugin
This is now available in a separate repository
at https://github.com/godotengine/godot-google-play-billing
2020-06-22 09:21:05 +02:00
Rémi Verschelde 35414f1dec
Merge pull request #39053 from timoschwarzer/static-assert-variant-arg-max
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5
2020-06-19 23:51:22 +02:00
Fredia Huya-Kouadio 6daf9b78af Clean up the `GodotPlugin` public API. 2020-06-16 09:25:09 -07:00
Fredia Huya-Kouadio 2bf1f8e4b3 Add support for focus awareness 2020-06-04 15:49:55 -07:00
Marcus Brummer 21263a65a9 Check if the specified Android release keystore exists 2020-06-04 13:37:14 +02:00
PouleyKetchoupp be22a1f9bc Fix inconsistent error messages with Android custom export templates 2020-06-01 23:13:31 +02:00
volzhs c227733bd8 Add missing consumePurchase plugin method for GodotPayment 2020-05-28 22:48:48 +09:00
Fredia Huya-Kouadio c948d25b6e Validate that `Use Custom Build` is enabled when `Plugins` are selected
Remove `GodotPayment` from the default build template
2020-05-27 12:07:53 -07:00
Rémi Verschelde 7b7b872d94
Merge pull request #39080 from m4gr3d/fix_emit_signal
Use compile-time constant for the size of the signal parameters
2020-05-27 13:05:32 +02:00
Fredia Huya-Kouadio 63286ebba4 Use compile-time constant for the size of the signal parameters 2020-05-27 03:40:26 -07:00
Fredia Huya-Kouadio 75100e5644 Provide the ability for clients of the Godot library to add their own command line arguments 2020-05-27 02:13:52 -07:00
Rémi Verschelde 24ad4894cc
Merge pull request #39050 from timoschwarzer/google-play-billing-4.0
(4.0) Re-implement GodotPayment Android plugin using the Google Play Billing library
2020-05-26 15:34:06 +02:00
Timo Schwarzer 4b00bf8e83
Re-implement GodotPayment Android plugin using the Google Play Billing library 2020-05-25 22:24:17 +02:00
Rémi Verschelde 242b715144
Merge pull request #38996 from mbrlabs/android-plugin-fix
Perform a clean Gradle build if android plugins changed
2020-05-25 22:18:41 +02:00
Rémi Verschelde 072646f5dd
Merge pull request #39047 from m4gr3d/fix_emit_signal
Fix parameters passing when emitting signal
2020-05-25 22:13:49 +02:00
Timo Schwarzer 05b32fc01d
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5 2020-05-25 21:55:03 +02:00
Fredia Huya-Kouadio bf76d2afcf Stop ignoring hidden files and directories in the `assets` directory 2020-05-25 12:03:35 -07:00
Fredia Huya-Kouadio e7e736c03b Fix parameters passing when emitting signal
The issue was caused because we were using variables local to the `for` loop block.
2020-05-25 11:50:36 -07:00
Marcus Brummer abd66c1bb0 Perform a clean Gradle build if android plugins changed
Fixes #38986
2020-05-25 19:18:02 +02:00
Rémi Verschelde 3ecdc27f49
Merge pull request #39004 from nekomatata/android-reset-surface
Proper surface reset when resuming app on Android
2020-05-24 22:31:03 +02:00
PouleyKetchoupp b987677cc0 Proper surface reset when resuming app on Android
Just re-creating the window instead of restarting the app entirely.
2020-05-24 20:42:21 +02:00
PouleyKetchoupp 39f59786fa Use long instead of int for object id in Android java wrapper
Using int for 64-bit values might cause issues with objects not found
in ObjectDB when the id is truncated.
2020-05-24 13:26:18 +02:00
Rémi Verschelde aec07538f4
Merge pull request #38309 from SkyLucilfer/AndroidLineEdit
Fix Android LineEdit editing bugs
2020-05-20 11:45:59 +02:00
Rémi Verschelde ca3192d18a Style: Fix unnecessary semicolons that confused clang-format 2020-05-19 11:24:58 +02:00
Fredia Huya-Kouadio 6e2988f26a Update the permission string for the Oculus hand tracking to match the latest api update 2020-05-18 15:28:18 -07:00
Fabio Alessandrelli 90c7102b51 Move mix_rate, ouput_latency to AudioDriverManager
Each driver used to define the (same) project settings values
`audio/mix_rate` and `audio/output_latency`, but the setting names are
not driver specific.
Overriding is still possible via platform tags.
2020-05-18 13:02:06 +02:00
Fredia Huya-Kouadio 14e6696c8e Implementation of the Godot Android Plugin configuration file 2020-05-17 11:11:26 -07:00
SkyJJ cc473b948f Fix Android LineEdit editing bugs 2020-05-16 17:55:27 +02:00
Rémi Verschelde d999071edf
Merge pull request #37924 from thebestnom/migrate-to-androidX
Android: Migrate deprecated support library to AndroidX
2020-05-16 09:03:17 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00