diff --git a/.github/workflows/client-build-tool.yml b/.github/workflows/client-build-tool.yml index ef0c528d..1cc54364 100644 --- a/.github/workflows/client-build-tool.yml +++ b/.github/workflows/client-build-tool.yml @@ -102,6 +102,10 @@ on: template-download-url: required: true type: string + vr-dependencies: + required: false + type: boolean + default: false outputs: url: value: ${{ jobs.client-build-tool.outputs.url }} @@ -158,6 +162,11 @@ jobs: mv ./app-clone/mirror-godot-app/* . ls -lah + - name: Remove VR Requirements (if not for meta quest etc) + if: ${{ !inputs.vr-dependencies }} + run: | + rm -rf ./addons/mirror_internal/godotopenxrvendors/ + - name: Use custom project file (required for custom splash screen) if: ${{ inputs.custom-project-file }} run: | diff --git a/.github/workflows/deployment-pr.yml b/.github/workflows/deployment-pr.yml index 2011a227..360dd838 100644 --- a/.github/workflows/deployment-pr.yml +++ b/.github/workflows/deployment-pr.yml @@ -13,6 +13,13 @@ concurrency: cancel-in-progress: true jobs: + get-or-build-engine: + name: Building Engine + uses: ./.github/workflows/engine.yml + with: + environment: "" + self-hosted-runner: ${{ github.event.repository.name != 'the-mirror' }} + deploy-to-gcp: false # in the future if we can figure out how to make this secure we may re-enable this. build-windows-client: name: 🏁 Build Windows Dev PR uses: ./.github/workflows/client-build-tool.yml diff --git a/.github/workflows/engine.yml b/.github/workflows/engine.yml index cd33ef94..dcf63051 100644 --- a/.github/workflows/engine.yml +++ b/.github/workflows/engine.yml @@ -8,9 +8,13 @@ on: self-hosted-runner: required: true type: boolean + deploy-to-gcp: + required: false + type: boolean + default: true secrets: GCP_BUCKET_UPLOAD: - required: true + required: false outputs: commit_hash: value: ${{ jobs.build-windows.outputs.commit_hash }} @@ -128,10 +132,12 @@ jobs: name: ${{ matrix.artifact-name }}.exe - uses: 'google-github-actions/auth@v2' + if: ${{ inputs.deploy-to-gcp }} with: credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}' - name: Upload binary + if: ${{ inputs.deploy-to-gcp }} uses: 'google-github-actions/upload-cloud-storage@v2' with: path: ./godot-engine/bin/${{ matrix.artifact-name }}.exe @@ -269,10 +275,12 @@ jobs: path: "./godot-engine/bin/${{ matrix.artifact-name }}.zip" - uses: 'google-github-actions/auth@v2' + if: ${{ inputs.deploy-to-gcp }} with: credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}' - name: Upload binary + if: ${{ inputs.deploy-to-gcp }} uses: 'google-github-actions/upload-cloud-storage@v2' with: path: ./godot-engine/bin/${{ matrix.artifact-name }}.zip @@ -381,11 +389,117 @@ jobs: name: ${{ matrix.artifact-name }} - uses: 'google-github-actions/auth@v2' + if: ${{ inputs.deploy-to-gcp }} with: credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}' - name: Upload binary + if: ${{ inputs.deploy-to-gcp }} uses: 'google-github-actions/upload-cloud-storage@v2' with: path: ./godot-engine/bin/${{ matrix.artifact-name }} destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/ + build-android-linux: + runs-on: ${{ inputs.self-hosted-runner && 'linux-mirror' || 'ubuntu-22.04' }} + name: ${{ matrix.name }} + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + matrix: + include: + - name: Android Template + cache-name: android-template + target: template_debug + strip: true + sconsflags: debug_symbols=no optimize=speed + bin: "./bin/godot.linuxbsd.template_debug.x86_64" + artifact-name: "android-template" + artifact: true + tests: no + bucket-name: mirror_native_client_builds/Engine + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Java 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Check versions of the compiler + run: | + ldd --version + gcc --version + cmake --version + + - name: Get short commit hash + id: vars + run: | + echo "Git hash: $(git rev-parse --short=8 HEAD)" + echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT + + - name: Ensuring git hash exists (or will fail job) + if: steps.vars.outputs.sha_short == '' + run: exit 1 + + - name: Setup Godot build cache + uses: ./godot-engine/.github/actions/godot-cache + with: + cache-name: ${{ matrix.cache-name }} + continue-on-error: true + + - name: Setup scons + shell: bash + run: | + python -c "import sys; print(sys.version)" + python -m pip install scons==4.4.0 + scons --version + + - name: Setup GCC problem matcher + uses: ammaraskar/gcc-problem-matcher@master + + - name: Compilation (arm64) + uses: ./.github/actions/godot-build + with: + sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm64 + platform: android + target: ${{ matrix.target }} + tests: ${{ matrix.tests }} + + - name: Compilation (arm32) + uses: ./.github/actions/godot-build + with: + sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm32 + platform: android + target: ${{ matrix.target }} + tests: ${{ matrix.tests }} + + - name: Generate Godot templates + run: | + cd platform/android/java + ./gradlew generateGodotTemplates + cd ../../.. + ls -l bin/ + zip -r android-template.zip bin/ + + - name: Upload artifact + uses: ./.github/actions/upload-artifact + if: ${{ matrix.artifact }} + with: + path: ./godot-engine/android-template.zip + name: ${{ matrix.artifact-name }} + + - uses: 'google-github-actions/auth@v2' + if: ${{ inputs.deploy-to-gcp }} + with: + credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}' + + - name: Upload binary + if: ${{ inputs.deploy-to-gcp }} + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: ./godot-engine/bin/${{ matrix.artifact-name }} + destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/ \ No newline at end of file diff --git a/mirror-godot-app/.gitignore b/mirror-godot-app/.gitignore index b2d9e0a8..ee4e0728 100644 --- a/mirror-godot-app/.gitignore +++ b/mirror-godot-app/.gitignore @@ -23,3 +23,8 @@ node_modules # Voxel terrain voxels.db + +# Fix broken files from being checked into the repo +# caused by the openxr modules +~*.dll +*.tmp diff --git a/mirror-godot-app/addons/compressed_build_exporter/export_compressed_binary.gd b/mirror-godot-app/addons/compressed_build_exporter/export_compressed_binary.gd index 890af127..6657fc78 100644 --- a/mirror-godot-app/addons/compressed_build_exporter/export_compressed_binary.gd +++ b/mirror-godot-app/addons/compressed_build_exporter/export_compressed_binary.gd @@ -24,8 +24,9 @@ func _export_end() -> void: print("finished export - making cicd specific binaries") assert(not _path.is_empty()) assert(not _features.is_empty()) - if _export_platform.is_empty(): + if _export_platform.is_empty() or _export_platform == "android": return + print("Export platform: ", _export_platform) # We compress platforms we support, but not game server builds # The game server builds are a special case and are uploaded in two files. # They are uncompressed to gcp. @@ -48,6 +49,8 @@ static func _get_platform_name(platform: EditorExportPlatform) -> String: return "windows" elif platform is EditorExportPlatformMacOS: return "macos" + elif platform is EditorExportPlatformAndroid: + return "android" return "" diff --git a/mirror-godot-app/addons/godotopenxrvendors/GodotOpenXRVendors_CHANGES.md b/mirror-godot-app/addons/godotopenxrvendors/GodotOpenXRVendors_CHANGES.md new file mode 100644 index 00000000..10157ff6 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/GodotOpenXRVendors_CHANGES.md @@ -0,0 +1,37 @@ +# Change history for the Godot OpenXR loaders asset + +## 2.0.3 +- Migrate the export scripts from gdscript to C++ via gdextension +- Manually request eye tracking permission if it's included in the app manifest +- Change how singletons are accessed +- Fix the plugin version for the export plugins +- Add OpenXR extension wrappers for fb_scene, fb_spatial_entity, fb_spatial_entity_query, fb_spatial_entity_container + +## 2.0.0 +- Update to the new Godot 4.2 Android plugin packaging format +- Update the plugin to Godot v2 Android plugin +- Update to the Godot 4.2 Android library +- Add warning when multiple loaders are selected +- Add configs for the OpenXR Eye gaze interaction extension +- Add the ability to customize supported Meta devices +- Add support for Quest 3 devices +- Update the directory structure for the v2 plugin +- Update Meta OpenXR mobile SDK to version 57 +- Update the java version to 17 +- Rename the plugin to 'Godot OpenXR Vendors' +- Add godot-cpp dependency +- Add OpenXR 1.0.30 headers +- Add support for the Meta scene capture API (Donated by [Migeran](https://migeran.com)) + +## 1.1.0 +- Update Meta OpenXR loader to version 54 +- Update PICO OpenXR loader to version 2.2.0 +- Bump dependencies versions to match the latest Godot 4.x stable version (v4.0.3) + +## 1.0.0 +- First version +- Added support for Meta Quest loader +- Added support for Pico loader +- Added support for Khronos loader (Magic Leap 2, HTC, etc.) +- Added support for Lynx loader +- Add logic to automatically publish the Godot OpenXR loaders libraries to mavencentral on release diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/debug/godotopenxrkhronos-debug.aar b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/debug/godotopenxrkhronos-debug.aar new file mode 100644 index 00000000..61aaf31f Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/debug/godotopenxrkhronos-debug.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_debug.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_debug.x86_64.so new file mode 100644 index 00000000..9528d05b Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_debug.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_release.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_release.x86_64.so new file mode 100644 index 00000000..4a282456 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_release.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_debug.framework/libgodotopenxrkhronos.macos.template_debug b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_debug.framework/libgodotopenxrkhronos.macos.template_debug new file mode 100644 index 00000000..aaa79463 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_debug.framework/libgodotopenxrkhronos.macos.template_debug differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_release.framework/libgodotopenxrkhronos.macos.template_release b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_release.framework/libgodotopenxrkhronos.macos.template_release new file mode 100644 index 00000000..e7de1e78 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_release.framework/libgodotopenxrkhronos.macos.template_release differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_debug.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_debug.x86_64.dll new file mode 100644 index 00000000..7921634c Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_debug.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_release.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_release.x86_64.dll new file mode 100644 index 00000000..2ebe6623 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_release.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/release/godotopenxrkhronos-release.aar b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/release/godotopenxrkhronos-release.aar new file mode 100644 index 00000000..632ac62c Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/khronos/.bin/release/godotopenxrkhronos-release.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/LICENSE b/mirror-godot-app/addons/godotopenxrvendors/khronos/LICENSE new file mode 100644 index 00000000..6b0b1270 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/khronos/LICENSE @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/mirror-godot-app/addons/godotopenxrvendors/khronos/plugin.gdextension b/mirror-godot-app/addons/godotopenxrvendors/khronos/plugin.gdextension new file mode 100644 index 00000000..e5a424d3 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/khronos/plugin.gdextension @@ -0,0 +1,18 @@ +[configuration] + +entry_symbol = "plugin_library_init" +compatibility_minimum = "4.2" +android_aar_plugin = true + +[libraries] + +android.debug.arm64 = "res://addons/godotopenxrvendors/khronos/.bin/debug/arm64-v8a/libgodotopenxrkhronos.so" +android.release.arm64 = "res://addons/godotopenxrvendors/khronos/.bin/release/arm64-v8a/libgodotopenxrkhronos.so" +android.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/debug/x86_64/libgodotopenxrkhronos.so" +android.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/release/x86_64/libgodotopenxrkhronos.so" +macos.debug = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_debug.framework" +macos.release = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_debug.x86_64.dll" +windows.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_release.x86_64.dll" +linux.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_debug.x86_64.so" +linux.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_release.x86_64.so" diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/debug/godotopenxrlynx-debug.aar b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/debug/godotopenxrlynx-debug.aar new file mode 100644 index 00000000..a2d37ff7 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/debug/godotopenxrlynx-debug.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_debug.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_debug.x86_64.so new file mode 100644 index 00000000..44f765cb Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_debug.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_release.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_release.x86_64.so new file mode 100644 index 00000000..2c89b802 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_release.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_debug.framework/libgodotopenxrlynx.macos.template_debug b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_debug.framework/libgodotopenxrlynx.macos.template_debug new file mode 100644 index 00000000..3d10faad Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_debug.framework/libgodotopenxrlynx.macos.template_debug differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_release.framework/libgodotopenxrlynx.macos.template_release b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_release.framework/libgodotopenxrlynx.macos.template_release new file mode 100644 index 00000000..a19e52bb Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_release.framework/libgodotopenxrlynx.macos.template_release differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_debug.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_debug.x86_64.dll new file mode 100644 index 00000000..357988f9 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_debug.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_release.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_release.x86_64.dll new file mode 100644 index 00000000..67cafb0d Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_release.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/release/godotopenxrlynx-release.aar b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/release/godotopenxrlynx-release.aar new file mode 100644 index 00000000..945454b1 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/lynx/.bin/release/godotopenxrlynx-release.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/lynx/plugin.gdextension b/mirror-godot-app/addons/godotopenxrvendors/lynx/plugin.gdextension new file mode 100644 index 00000000..6bb83da9 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/lynx/plugin.gdextension @@ -0,0 +1,16 @@ +[configuration] + +entry_symbol = "plugin_library_init" +compatibility_minimum = "4.2" +android_aar_plugin = true + +[libraries] + +android.debug.arm64 = "res://addons/godotopenxrvendors/lynx/.bin/debug/arm64-v8a/libgodotopenxrlynx.so" +android.release.arm64 = "res://addons/godotopenxrvendors/lynx/.bin/release/arm64-v8a/libgodotopenxrlynx.so" +macos.debug = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_debug.framework" +macos.release = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_debug.x86_64.dll" +windows.release.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_release.x86_64.dll" +linux.debug.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_debug.x86_64.so" +linux.release.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_release.x86_64.so" diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/debug/godotopenxrmeta-debug.aar b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/debug/godotopenxrmeta-debug.aar new file mode 100644 index 00000000..e3f8703b Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/debug/godotopenxrmeta-debug.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.x86_64.so new file mode 100644 index 00000000..8dfe87fc Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.x86_64.so new file mode 100644 index 00000000..d98ddcc5 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_debug.framework/libgodotopenxrmeta.macos.template_debug b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_debug.framework/libgodotopenxrmeta.macos.template_debug new file mode 100644 index 00000000..a5862e3d Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_debug.framework/libgodotopenxrmeta.macos.template_debug differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_release.framework/libgodotopenxrmeta.macos.template_release b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_release.framework/libgodotopenxrmeta.macos.template_release new file mode 100644 index 00000000..ab709aeb Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_release.framework/libgodotopenxrmeta.macos.template_release differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_debug.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_debug.x86_64.dll new file mode 100644 index 00000000..357de7b2 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_debug.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_release.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_release.x86_64.dll new file mode 100644 index 00000000..7ff19a58 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_release.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/release/godotopenxrmeta-release.aar b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/release/godotopenxrmeta-release.aar new file mode 100644 index 00000000..4c050e7a Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/meta/.bin/release/godotopenxrmeta-release.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/LICENSE.txt b/mirror-godot-app/addons/godotopenxrvendors/meta/LICENSE.txt new file mode 100644 index 00000000..c2c569e9 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/meta/LICENSE.txt @@ -0,0 +1,3 @@ +Copyright © Facebook Technologies, LLC and its affiliates. All rights reserved. + +Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at https://developer.oculus.com/licenses/oculussdk/ diff --git a/mirror-godot-app/addons/godotopenxrvendors/meta/plugin.gdextension b/mirror-godot-app/addons/godotopenxrvendors/meta/plugin.gdextension new file mode 100644 index 00000000..8055b2fc --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/meta/plugin.gdextension @@ -0,0 +1,16 @@ +[configuration] + +entry_symbol = "plugin_library_init" +compatibility_minimum = "4.2" +android_aar_plugin = true + +[libraries] + +android.debug.arm64 = "res://addons/godotopenxrvendors/meta/.bin/debug/arm64-v8a/libgodotopenxrmeta.so" +android.release.arm64 = "res://addons/godotopenxrvendors/meta/.bin/release/arm64-v8a/libgodotopenxrmeta.so" +macos.debug = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_debug.framework" +macos.release = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_debug.x86_64.dll" +windows.release.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_release.x86_64.dll" +linux.debug.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.x86_64.so" +linux.release.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.x86_64.so" diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/debug/godotopenxrpico-debug.aar b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/debug/godotopenxrpico-debug.aar new file mode 100644 index 00000000..3407ec28 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/debug/godotopenxrpico-debug.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_debug.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_debug.x86_64.so new file mode 100644 index 00000000..4714d724 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_debug.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_release.x86_64.so b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_release.x86_64.so new file mode 100644 index 00000000..dcad6d97 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_release.x86_64.so differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_debug.framework/libgodotopenxrpico.macos.template_debug b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_debug.framework/libgodotopenxrpico.macos.template_debug new file mode 100644 index 00000000..62b40abc Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_debug.framework/libgodotopenxrpico.macos.template_debug differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_release.framework/libgodotopenxrpico.macos.template_release b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_release.framework/libgodotopenxrpico.macos.template_release new file mode 100644 index 00000000..046329e9 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_release.framework/libgodotopenxrpico.macos.template_release differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_debug.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_debug.x86_64.dll new file mode 100644 index 00000000..86f0b9a9 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_debug.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_release.x86_64.dll b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_release.x86_64.dll new file mode 100644 index 00000000..f7139633 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_release.x86_64.dll differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/release/godotopenxrpico-release.aar b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/release/godotopenxrpico-release.aar new file mode 100644 index 00000000..443cd5d2 Binary files /dev/null and b/mirror-godot-app/addons/godotopenxrvendors/pico/.bin/release/godotopenxrpico-release.aar differ diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/LICENSE.md b/mirror-godot-app/addons/godotopenxrvendors/pico/LICENSE.md new file mode 100644 index 00000000..a4f8adf2 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/pico/LICENSE.md @@ -0,0 +1,63 @@ +The Pico OpenXR loader binary is part of the [Pico OpenXR SDK](https://developer-global.pico-interactive.com/sdk?deviceId=1&platformId=3&itemId=11) v2.2.0 licensed under the "PICO IMMERSIVE PTE. LTD – SDK LICENSE TERMS" printed below. In communication with Godot developers, Pico explicitly clarified that the redistribution of the loader binary as part of the Godot export plugin and its repositories is permitted under these terms. + +--- + +# PICO IMMERSIVE PTE. LTD – SDK LICENSE TERMS + +These license terms are between You ("You") and Pico Immersive Pte. Ltd ("Pico") regarding Your use of the Pico Software Development Kit and any associated documentation, software code or other materials made available by Pico (collectively referred to in this agreement as the "SDK"). + +The SDK is made available by PICO to enable developers to build software applications for the Pico Platform. + +BY INSTALLING, ACCESSING OR OTHERWISE USING THE SDK, YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT AND CONSENT TO THE TRANSMISSION OF CERTAIN COMPUTER INFORMATION DURING USE AND FOR INTERNET-BASED SERVICES. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, DO NOT INSTALL, ACCESS OR USE THE SDK. + +1. _Installation._ You may install and use any number of copies of the SDK on your devices to design, develop and test your programs. Each copy must be complete, including all copyright and trademark notices. You must require end users to agree to terms of use that protect the SDK as much as these License terms. + +2. _Use._ You may use the SDK solely for the purpose of creating "Authorized Applications" which for the purpose of this license are applications, such as client-based applications, in object code form that are designed to run on PICO hardware devices. You are not authorized to pre-install or embed applications created using this SDK on third-party devices. You may not rent, lease or lend any of Your rights in the SDK or access to the Pico Services. You may reproduce the SDK, provided that You reproduce only complete copies, including without limitation all "read me" files, copyright notices, and other legal notices and terms that Pico has included in the SDK, and provided that You may not distribute any copy You make of the SDK. + +3. _Scope of License._ The SDK is licensed, not sold. This license only gives You some rights to use the SDK. Pico reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the SDK only as expressly permitted in this license. In doing so, You must comply with any technical limitations in the SDK that only allow You to use it in certain ways. You may not: + + 3.1. work around any technical limitations in the SDK; + + 3.2. reverse engineer, decompile or disassemble the SDK, except and only to the extent that applicable law expressly permits, despite this limitation; + + 3.3. make more copies of the SDK than specified in this license or allowed by, except and only to the extent applicable law expressly permits, despite this limitation; or + + 3.4. publish the SDK for others to copy. + +4. _Use of the services._ Your use of the Pico Services is governed by the then-current TOUs which can be found on: https://developer-global.pico-interactive.com/terms. If any SDK for which You are granted rights hereunder make use of the Pico Services (as governed by the applicable TOU), then those SDK rights are granted subject to your compliance with the applicable TOU. + +5. _EXPORT RESTRICTIONS._ THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGdlATIONS. YOU MUST COMPLY WITH ALL UNITED STATES, AND INTERNATIONAL EXPORT LAWS AND REGdlATIONS, WHICH INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. + +6. _Support._ Pico is not obligated to provide any technical or other support ("Support Services") for the SDK or Pico Services to You. However, if Pico chooses to provide any Support Services to You, Your use of such Support Services will be governed by then-current Pico policies. With respect to any technical or other information You provide to Pico in connection with the Support Services, You agree that Pico has an unrestricted right to use such information for its business purposes, including for product support and development. Pico will not use such information in a form that personally identifies You. + +7. _Fees._ Pico may choose in the future to charge for use of the SDK and/or Services. If Pico in its sole discretion chooses to establish fees and payment terms for such use, Pico will provide notice of such terms as provided in Section 10 below, and You may elect to stop using the SDK and/or Services rather than incurring fees. + +8. _Termination._ Pico reserves the right to discontinue offering the SDK and Pico Services or to modify the SDK and Pico Services at any time in its sole discretion. If You are dissatisfied with any aspect of the SDK or Pico Services at any time, Your sole and exclusive remedy is to cease using them. Notwithstanding anything contained in the license to the contrary, Pico may also, in its sole discretion, terminate or suspend access to the SDK and Pico Services to You or any end user at any time. You acknowledge that termination and/or monetary damages may not be a sufficient remedy if You breach this license and that Pico will be entitled, without waiving any other rights or remedies, to injunctive or equitable relief as may be deemed proper by a court of competent jurisdiction in the event of a breach. Sections 8, 9, 11, 13 and 14 will survive termination of this license or any discontinuation of the offering of the SDK or Pico Services, along with any other provisions that wodld reasonably be deemed to survive such events. + +9. _Reservation of Rights._ Except for the licenses expressly granted under this license, Pico and its suppliers retain all right, title and interest in and to the SDK, Pico Services, and all intellectual property rights therein. You are not authorized to alter, modify, copy, edit, format, create derivative works of or otherwise use any materials, content or technology provided under this license except as explicitly provided in this license or approved in advance in writing by Pico. + +10. _Modifications; Notices._ If we change this contract, then we will give you notice before the change is in force. If you do not agree to these changes, then you must cancel and stop using the SDK and Pico Services before the changes are in force. If you do not stop using the SDK or Pico Services, then your use of the SDK or Pico Services will continue under the changed contract. Pico may give notices to You, at Pico's option, by posting on any portion of https://developer-global.pico-interactive.com/console#/notification or by electronic mail to any e-mail address provided by You to Pico. + +11. _Governing Law._ If You acquired the SDK in the United States, California state law governs the interpretation of this license and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where You live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. If you acquired the SDK in any other country, the laws of that country apply. + +12. _Legal Effect._ This agreement describes certain legal rights. You may have other rights under the laws of Your country. This agreement does not change Your rights under the laws of Your country if the laws of Your country do not permit it to do so. + +13. _Disclaimer of Warranty._ The SDK is licensed "as-is." You bear the risk of using it. Pico gives no express or implied warranties, guarantees or conditions. You may have additional consumer rights under Your local laws which this agreement cannot change. To the extent permitted under Your local laws, Pico excludes the implied warranties of merchantability, fitness for a particdlar purpose and non-infringement. + +14. _Limitation and Exclusion of Remedies and Damages._ You can recover from Pico and its suppliers only direct damages up to U.S. $100.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages. This limitation applies to + + 14.1. anything related to the SDK, Pico Services, content (including code) on third party Internet sites, or third party programs; and + + 14.2. claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. + +15. _Eyetracking._ If you are going to develop the contents regarding eye tracking, you should follow + + 15.1. before get and transfer the eye tracking data, you should make sure that you get the approval of end users. + + 15.2. offer manual to end users to clarify the purpose to store and transfer eye tracking data, and declare that these data won’t be used for another purposes. + + 15.3. inform the end users the time when your applications start to store and transfer eye tracking date. + + 15.4. inform end users why they need to approve the storage and transfer of eye tracking data, and what you will obtain after the usage and analysis of the data. + +It applies even if Pico knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to You because Your country may not allow the exclusion or limitation of incidental, consequential or other damages. diff --git a/mirror-godot-app/addons/godotopenxrvendors/pico/plugin.gdextension b/mirror-godot-app/addons/godotopenxrvendors/pico/plugin.gdextension new file mode 100644 index 00000000..4d5117b0 --- /dev/null +++ b/mirror-godot-app/addons/godotopenxrvendors/pico/plugin.gdextension @@ -0,0 +1,16 @@ +[configuration] + +entry_symbol = "plugin_library_init" +compatibility_minimum = "4.2" +android_aar_plugin = true + +[libraries] + +android.debug.arm64 = "res://addons/godotopenxrvendors/pico/.bin/debug/arm64-v8a/libgodotopenxrpico.so" +android.release.arm64 = "res://addons/godotopenxrvendors/pico/.bin/release/arm64-v8a/libgodotopenxrpico.so" +macos.debug = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_debug.framework" +macos.release = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_debug.x86_64.dll" +windows.release.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_release.x86_64.dll" +linux.debug.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_debug.x86_64.so" +linux.release.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_release.x86_64.so" diff --git a/mirror-godot-app/addons/gut/gui/editor_globals.gd b/mirror-godot-app/addons/gut/gui/editor_globals.gd index 43903685..33d8200a 100644 --- a/mirror-godot-app/addons/gut/gui/editor_globals.gd +++ b/mirror-godot-app/addons/gut/gui/editor_globals.gd @@ -44,4 +44,3 @@ static var user_prefs = _user_prefs : static func create_temp_directory(): DirAccess.make_dir_recursive_absolute(temp_directory) - diff --git a/mirror-godot-app/android/.build_version b/mirror-godot-app/android/.build_version new file mode 100644 index 00000000..8aae8661 --- /dev/null +++ b/mirror-godot-app/android/.build_version @@ -0,0 +1 @@ +/Users/gordon/Projects/the-mirror/godot-engine/bin/android_source.zip [661a885ab35bb1ba0985e45d2fb86e8d] diff --git a/mirror-godot-app/creator/asset_inventory/asset_detail_window/asset_detail_window.gd b/mirror-godot-app/creator/asset_inventory/asset_detail_window/asset_detail_window.gd index 7375e57f..4f54ccb9 100644 --- a/mirror-godot-app/creator/asset_inventory/asset_detail_window/asset_detail_window.gd +++ b/mirror-godot-app/creator/asset_inventory/asset_detail_window/asset_detail_window.gd @@ -292,7 +292,7 @@ func _on_delete_dialog_confirmed(): Notify.error("Asset Delete Error", promise.get_error_message()) else: Notify.info("Asset Deleted", "Asset deleted succesfully.") - GameUI.creator_ui.asset_browser.on_asset_deleted(true) + GameUI.instance.creator_ui.asset_browser.on_asset_deleted(true) hide() diff --git a/mirror-godot-app/creator/asset_inventory/browser/asset_browser.gd b/mirror-godot-app/creator/asset_inventory/browser/asset_browser.gd index d2479250..86193a78 100644 --- a/mirror-godot-app/creator/asset_inventory/browser/asset_browser.gd +++ b/mirror-godot-app/creator/asset_inventory/browser/asset_browser.gd @@ -16,10 +16,10 @@ var _auto_deselect_on_drag_end: bool = false var _is_setup: bool = false var _last_upload_directory: String = "" -@onready var _viewport: Viewport = get_viewport() +@onready var _viewport: Viewport = Zone.get_viewport() @onready var _file_search: FileDialog: get: - return GameUI.file_search + return GameUI.instance.file_search @onready var _sections := $VBoxContainer/Sections @onready var _recents := _sections.get_node(^"Recents") diff --git a/mirror-godot-app/creator/asset_inventory/browser/page_selector.gd b/mirror-godot-app/creator/asset_inventory/browser/page_selector.gd index ef6600c2..40c2afb9 100644 --- a/mirror-godot-app/creator/asset_inventory/browser/page_selector.gd +++ b/mirror-godot-app/creator/asset_inventory/browser/page_selector.gd @@ -49,8 +49,8 @@ func _on_next_page_pressed(): func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/creator/asset_inventory/browser/recent/recents_browser_section.gd b/mirror-godot-app/creator/asset_inventory/browser/recent/recents_browser_section.gd index 260ddab5..c9c86366 100644 --- a/mirror-godot-app/creator/asset_inventory/browser/recent/recents_browser_section.gd +++ b/mirror-godot-app/creator/asset_inventory/browser/recent/recents_browser_section.gd @@ -17,8 +17,8 @@ var _id_to_slot_map: Dictionary = {} func _ready() -> void: super() - await GameUI.ready - GameUI.login_ui.login_succeeded.connect(Net.asset_client.get_recent_assets) + await GameUI.instance.ready + GameUI.instance.login_ui.login_succeeded.connect(Net.asset_client.get_recent_assets) Net.asset_client.asset_received.connect(_on_net_asset_received) Net.asset_client.recent_assets_received.connect(_on_net_recent_assets_received) Zone.client.disconnected.connect(_on_zone_disconnected) @@ -152,7 +152,8 @@ func _generate_new_slot(recent_asset: Dictionary) -> BaseAssetSlot: slot.slot_activated.connect(_asset_browser.asset_slot_activated) slot.slot_special_action.connect(_asset_browser.use_slot_asset) _id_to_slot_map[recent_asset["id"]] = slot - _slots_flow_container.add_child(slot) + if slot.get_parent() != _slots_flow_container: + _slots_flow_container.add_child(slot) return slot diff --git a/mirror-godot-app/creator/asset_inventory/browser/recent/space_script_entity_slot.gd b/mirror-godot-app/creator/asset_inventory/browser/recent/space_script_entity_slot.gd index e99b2bfc..f2c8c558 100644 --- a/mirror-godot-app/creator/asset_inventory/browser/recent/space_script_entity_slot.gd +++ b/mirror-godot-app/creator/asset_inventory/browser/recent/space_script_entity_slot.gd @@ -59,4 +59,4 @@ func _slot_primary_action() -> void: func _on_asset_slot_mouse_entered() -> void: super() - GameUI.set_hover_tooltip_text(recent_script["name"], "Space Script") + GameUI.instance.set_hover_tooltip_text(recent_script["name"], "Space Script") diff --git a/mirror-godot-app/creator/asset_inventory/browser/search_field.gd b/mirror-godot-app/creator/asset_inventory/browser/search_field.gd index 763b85c3..c12a29a6 100644 --- a/mirror-godot-app/creator/asset_inventory/browser/search_field.gd +++ b/mirror-godot-app/creator/asset_inventory/browser/search_field.gd @@ -67,11 +67,11 @@ func _on_line_edit_text_submitted(new_text: String) -> void: func _on_focus_entered(): - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited(): - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func focus(): diff --git a/mirror-godot-app/creator/common/asset_slot.gd b/mirror-godot-app/creator/common/asset_slot.gd index 88afe32b..4dd65b9d 100644 --- a/mirror-godot-app/creator/common/asset_slot.gd +++ b/mirror-godot-app/creator/common/asset_slot.gd @@ -178,4 +178,4 @@ func _on_asset_slot_mouse_entered() -> void: return var hover_uri = asset_data.thirdparty_source_home_page_url hover_uri = hover_uri.trim_prefix("https://").trim_prefix("http://") - GameUI.set_hover_tooltip_text(asset_data.asset_name, hover_uri) + GameUI.instance.set_hover_tooltip_text(asset_data.asset_name, hover_uri) diff --git a/mirror-godot-app/creator/common/base_asset_slot.gd b/mirror-godot-app/creator/common/base_asset_slot.gd index 2f977f61..e45f9aba 100644 --- a/mirror-godot-app/creator/common/base_asset_slot.gd +++ b/mirror-godot-app/creator/common/base_asset_slot.gd @@ -86,7 +86,7 @@ func _on_asset_slot_gui_input(input_event: InputEvent) -> void: elif input_event.is_action_released(&"primary_action"): slot_activated.emit(self, false) elif input_event.is_action_released(&"secondary_action"): - GameUI.creator_ui.open_context_menu(self) + GameUI.instance.creator_ui.open_context_menu(self) func _on_asset_slot_mouse_entered() -> void: @@ -97,4 +97,4 @@ func _on_asset_slot_mouse_entered() -> void: func _on_asset_slot_mouse_exited() -> void: if not _is_selected: _hover_state.hide() - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/creator/creator_ui.gd b/mirror-godot-app/creator/creator_ui.gd index 7f90c038..74862b57 100644 --- a/mirror-godot-app/creator/creator_ui.gd +++ b/mirror-godot-app/creator/creator_ui.gd @@ -150,7 +150,7 @@ func _selection_copy_paste_input(input_event: InputEvent) -> bool: elif input_event.is_action_pressed(&"action_copy"): object_selection.copy_selected_nodes() elif input_event.is_action_pressed(&"action_paste")\ - and not GameUI.is_mouse_hovering_any_control(): + and not GameUI.instance.is_mouse_hovering_any_control(): object_selection.paste_copied_nodes() else: return false @@ -159,7 +159,7 @@ func _selection_copy_paste_input(input_event: InputEvent) -> bool: func _build_mode_camera_movement_input(input_event: InputEvent) -> bool: _mouse_in_motion = input_event is InputEventMouseMotion and input_event.relative.length() > 0 - if Input.is_action_pressed(&"build_mode_camera_movement") or GameUI.is_cinematic_mode_enabled(): + if Input.is_action_pressed(&"build_mode_camera_movement") or GameUI.instance.is_cinematic_mode_enabled(): if _mouse_in_motion: _mouse_used_for_build_mode_camera_movement = true else: @@ -337,7 +337,7 @@ func select_object(object: Node3D) -> void: func raycast_hit_object(hit: Node3D) -> void: - if GameUI.is_cinematic_mode_enabled() or _current_game_mode == GameMode.Mode.NORMAL: + if GameUI.instance.is_cinematic_mode_enabled() or _current_game_mode == GameMode.Mode.NORMAL: return object_selection.raycast_hit_object(hit) diff --git a/mirror-godot-app/creator/selection/add_script/add_script_dialog.gd b/mirror-godot-app/creator/selection/add_script/add_script_dialog.gd index 4fbcd426..af6f0c7c 100644 --- a/mirror-godot-app/creator/selection/add_script/add_script_dialog.gd +++ b/mirror-godot-app/creator/selection/add_script/add_script_dialog.gd @@ -24,7 +24,7 @@ func popup_dialog(target_node: Node) -> void: _add_script_menu.hide_add_script_filter_menu() size = Vector2.ZERO popup_centered() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) if GameplaySettings.script_quick_attach_existing: title = "Create or Attach Script" _add_script_menu.focus_add_script_filter_menu() diff --git a/mirror-godot-app/creator/selection/gizmo/gizmo.gd b/mirror-godot-app/creator/selection/gizmo/gizmo.gd index 09ac2043..6a11ffd0 100644 --- a/mirror-godot-app/creator/selection/gizmo/gizmo.gd +++ b/mirror-godot-app/creator/selection/gizmo/gizmo.gd @@ -86,7 +86,7 @@ func update_gizmo_visibility() -> void: target.is_selection_empty() or target.is_space_object_asset_type(Enums.ASSET_TYPE.MAP) or target.is_any_object_not_allowed_to_edit() - or not GameUI.creator_ui.is_edit_mode(Enums.EDIT_MODE.Asset) + or not GameUI.instance.creator_ui.is_edit_mode(Enums.EDIT_MODE.Asset) or PlayerData.game_mode.get_current_mode() == PlayerData.game_mode.Mode.NORMAL ): _hide_all_gizmos() diff --git a/mirror-godot-app/creator/selection/inspector/categories/inspector_category_toggle_button.gd b/mirror-godot-app/creator/selection/inspector/categories/inspector_category_toggle_button.gd index b2ebc55c..d0a17182 100644 --- a/mirror-godot-app/creator/selection/inspector/categories/inspector_category_toggle_button.gd +++ b/mirror-godot-app/creator/selection/inspector/categories/inspector_category_toggle_button.gd @@ -64,12 +64,12 @@ func _on_toggle_button_pressed(): func _on_hoverable_button_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_button_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() func _on_hoverable_button_pressed() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/creator/selection/inspector/categories/inspector_object.gd b/mirror-godot-app/creator/selection/inspector/categories/inspector_object.gd index a8de0e22..82316f4d 100644 --- a/mirror-godot-app/creator/selection/inspector/categories/inspector_object.gd +++ b/mirror-godot-app/creator/selection/inspector/categories/inspector_object.gd @@ -60,7 +60,7 @@ func _on_locked_value_changed(new_value: bool) -> void: func _on_asset_asset_clicked(asset_data): - GameUI.creator_ui.asset_detail_window.request_info_popup(asset_data) + GameUI.instance.creator_ui.asset_detail_window.request_info_popup(asset_data) func _on_description_value_changed(new_value): diff --git a/mirror-godot-app/creator/selection/inspector/categories/inspector_spawn_point.gd b/mirror-godot-app/creator/selection/inspector/categories/inspector_spawn_point.gd index ebe2de1b..535c73eb 100644 --- a/mirror-godot-app/creator/selection/inspector/categories/inspector_spawn_point.gd +++ b/mirror-godot-app/creator/selection/inspector/categories/inspector_spawn_point.gd @@ -55,4 +55,4 @@ func _select_new_team(value): func _edit_teams_button_pressed(): - GameUI.teams_handler.toggle_teams_editor() + GameUI.instance.teams_handler.toggle_teams_editor() diff --git a/mirror-godot-app/creator/selection/inspector/inspector.gd b/mirror-godot-app/creator/selection/inspector/inspector.gd index 0e1b2bcc..45de2032 100644 --- a/mirror-godot-app/creator/selection/inspector/inspector.gd +++ b/mirror-godot-app/creator/selection/inspector/inspector.gd @@ -131,7 +131,7 @@ func _refresh_material_tabs(selected_nodes: Array[Node]): idx = _surfaces_item_list.add_item(surface_name, _tab_materials_icon) _surfaces_item_list.set_item_metadata(idx, [mi, x, space_obj]) space_obj_cnt += 1 - if not is_instance_valid(GameUI.creator_ui): + if not is_instance_valid(GameUI.instance.creator_ui): return if idx > -1: if previously_selected_idx != -1 and previously_selected_idx < idx: @@ -141,7 +141,7 @@ func _refresh_material_tabs(selected_nodes: Array[Node]): _surfaces_item_list.select(idx, true) _surfaces_item_list.ensure_current_is_visible() _on_surfaces_item_list_item_selected(idx, false) - var material_creator = GameUI.creator_ui.material_creator_window.material_creator + var material_creator = GameUI.instance.creator_ui.material_creator_window.material_creator Util.safe_signal_connect(material_creator.on_surface_material_updated, _on_surface_material_updated) Util.safe_signal_connect(_material_inspector.material_created, _on_material_created) @@ -514,11 +514,11 @@ func _on_add_script_button_pressed() -> void: func _on_material_creator_button_pressed() -> void: var selected_surface = _surfaces_item_list.get_selected_items() if selected_surface.size() != 1: - #GameUI.creator_ui.material_creator_window.edit_material_for_mesh() + #GameUI.instance.creator_ui.material_creator_window.edit_material_for_mesh() return var data = _surfaces_item_list.get_item_metadata(selected_surface[0]) # data contains [MeshInstance, surface_id, SpaceObject] - GameUI.creator_ui.material_creator_window.edit_material_for_mesh(data[2], data[0], data[1]) + GameUI.instance.creator_ui.material_creator_window.edit_material_for_mesh(data[2], data[0], data[1]) func _on_surface_picked(data) -> void: diff --git a/mirror-godot-app/creator/selection/inspector/nodes/inspector_extra_node.gd b/mirror-godot-app/creator/selection/inspector/nodes/inspector_extra_node.gd index 36e67298..327a695a 100644 --- a/mirror-godot-app/creator/selection/inspector/nodes/inspector_extra_node.gd +++ b/mirror-godot-app/creator/selection/inspector/nodes/inspector_extra_node.gd @@ -131,17 +131,17 @@ func _process_physics_shape_outlines() -> void: var shape_size: Vector3 = _get_shape_size_vector_from_ext() var shape_transform: Transform3D = target_node.scaled_model.global_transform.scaled_local(shape_size) if shape_type == "box": - GameUI.object_outlines.draw_wireframe_box_transform(shape_transform, _OUTLINE_COLOR) + GameUI.instance.object_outlines.draw_wireframe_box_transform(shape_transform, _OUTLINE_COLOR) elif shape_type == "sphere": - GameUI.object_outlines.draw_wireframe_sphere(shape_transform, _OUTLINE_COLOR) + GameUI.instance.object_outlines.draw_wireframe_sphere(shape_transform, _OUTLINE_COLOR) else: shape_transform = shape_transform.scaled_local(Vector3(1.0, shape_size.x / shape_size.y, 1.0)) if shape_type == "capsule": var half_mid_height: float = (shape_size.y - shape_size.x) * 0.5 - GameUI.object_outlines.draw_wireframe_capsule(shape_transform, half_mid_height, _OUTLINE_COLOR) + GameUI.instance.object_outlines.draw_wireframe_capsule(shape_transform, half_mid_height, _OUTLINE_COLOR) if shape_type == "cylinder": var half_height: float = shape_size.y * 0.5 - GameUI.object_outlines.draw_wireframe_cylinder(shape_transform, half_height, _OUTLINE_COLOR) + GameUI.instance.object_outlines.draw_wireframe_cylinder(shape_transform, half_height, _OUTLINE_COLOR) func _refresh_already_setup_inspectors() -> void: diff --git a/mirror-godot-app/creator/selection/inspector/nodes/model_scene_tree.gd b/mirror-godot-app/creator/selection/inspector/nodes/model_scene_tree.gd index 62a2542c..5e918e84 100644 --- a/mirror-godot-app/creator/selection/inspector/nodes/model_scene_tree.gd +++ b/mirror-godot-app/creator/selection/inspector/nodes/model_scene_tree.gd @@ -15,7 +15,7 @@ func _gui_input(input_event: InputEvent) -> void: return tree_item.select(0) selected_node_name = tree_item.get_text(0) - GameUI.creator_ui.open_context_menu(self) + GameUI.instance.creator_ui.open_context_menu(self) else: super(input_event) diff --git a/mirror-godot-app/creator/selection/inspector/nodes/visual_editor/seat/seat_editor.gd b/mirror-godot-app/creator/selection/inspector/nodes/visual_editor/seat/seat_editor.gd index a7c364bb..01d1b316 100644 --- a/mirror-godot-app/creator/selection/inspector/nodes/visual_editor/seat/seat_editor.gd +++ b/mirror-godot-app/creator/selection/inspector/nodes/visual_editor/seat/seat_editor.gd @@ -58,7 +58,7 @@ func _draw_lines() -> void: _last_knee_position, _last_foot_position, ] - var mi: MeshInstance3D = GameUI.object_outlines.draw_lines(lines, Color.SADDLE_BROWN) + var mi: MeshInstance3D = GameUI.instance.object_outlines.draw_lines(lines, Color.SADDLE_BROWN) mi.transform = global_transform diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_deletable_base.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_deletable_base.gd index 4f623b6f..984d3f5d 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_deletable_base.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_deletable_base.gd @@ -20,8 +20,8 @@ func cleanup_and_delete() -> void: func _on_hoverable_inspector_item_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_inspector_item_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_line_edit_field.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_line_edit_field.gd index 9b7981bb..e3b1f29a 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_line_edit_field.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_line_edit_field.gd @@ -41,11 +41,11 @@ func _on_focus_entered() -> void: await get_tree().process_frame # This is done declaratively by LineEdit.select_all_on_focus = true # _line_edit_node.select_all() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_reset_button_pressed() -> void: diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_local_texture.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_local_texture.gd index a2b1954b..4ea3a557 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_local_texture.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_local_texture.gd @@ -122,7 +122,7 @@ func _on_file_dialog_file_selected(path): func _upload_as_texture(path: String, param: String) -> void: _loading_spinner.show() - var promise: Promise = await GameUI.creator_ui.asset_browser.create_asset_from_url( + var promise: Promise = await GameUI.instance.creator_ui.asset_browser.create_asset_from_url( path, Enums.ASSET_TYPE.TEXTURE, {"textureImagePropertyAppliesTo": param} diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_material.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_material.gd index 9ff8922b..5e75a61e 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_material.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_material.gd @@ -88,7 +88,7 @@ func _on_reset_button_pressed() -> void: func _on_material_selected(): - var selected_slot = GameUI.creator_ui.material_window.material_browser.get_selected_slot() + var selected_slot = GameUI.instance.creator_ui.material_window.material_browser.get_selected_slot() if selected_slot: var is_instance = selected_slot is MaterialInstanceSlot var material_type = Enums.MATERIAL_TYPE.INSTANCE if is_instance else Enums.MATERIAL_TYPE.ASSET @@ -97,8 +97,8 @@ func _on_material_selected(): func _on_button_pressed(): - GameUI.creator_ui.material_window.popup_centered() - GameUI.creator_ui.material_window.material_browser.selected_material_slot_changed.connect(_on_material_selected) + GameUI.instance.creator_ui.material_window.popup_centered() + GameUI.instance.creator_ui.material_window.material_browser.selected_material_slot_changed.connect(_on_material_selected) func _clear() -> void: diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_field.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_field.gd index 0ae3255b..88486bc1 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_field.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_field.gd @@ -72,7 +72,7 @@ func _on_spin_box_text_changed(new_text: String) -> void: func _on_focus_entered() -> void: _spin_box_node.value_changed.connect(_on_spin_box_value_changed, CONNECT_ONE_SHOT) - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) await get_tree().process_frame _line_edit_node.select_all() @@ -80,7 +80,7 @@ func _on_focus_entered() -> void: func _on_focus_exited(): assert(not is_queued_for_deletion()) refresh_full() - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_reset_button_pressed() -> void: diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_slider.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_slider.gd index 2d9e8ec8..2a97b79d 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_slider.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_number_slider.gd @@ -88,12 +88,12 @@ func set_enabled(in_is_enabled: bool): func _on_focus_entered(): - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited(): refresh() - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_reset_button_pressed() -> void: diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_submittable_base.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_submittable_base.gd index 5ae2748b..58509553 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_submittable_base.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_submittable_base.gd @@ -6,14 +6,14 @@ signal value_submitted() func emit_value_submitted(_new_text = null) -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) value_submitted.emit() func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: if not get_viewport() is AcceptDialog: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_vector_number.gd b/mirror-godot-app/creator/selection/inspector/primitive/inspector_vector_number.gd index fbe204d8..1956a4fb 100644 --- a/mirror-godot-app/creator/selection/inspector/primitive/inspector_vector_number.gd +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_vector_number.gd @@ -78,14 +78,14 @@ func _on_spin_box_text_changed(new_text: String) -> void: func _on_key_focus_entered() -> void: if not _spin_box_node.value_changed.is_connected(_on_spin_box_value_changed): _spin_box_node.value_changed.connect(_on_spin_box_value_changed, CONNECT_ONE_SHOT) - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) await get_tree().process_frame _line_edit_node.select_all() func _on_focus_exited(): refresh_full() - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_gui_input(event: InputEvent): @@ -103,7 +103,7 @@ func _on_gui_input(event: InputEvent): else: if _grabbing_spinner_attempt: if _grabbing_spinner: - GameUI.creator_ui.ui_request_captured = false + GameUI.instance.creator_ui.ui_request_captured = false # This is needed to avoid process frame issues race conditions # free_camera.gd will try to handle CAPTURED before input # handlin of mouse_capture.gd @@ -124,7 +124,7 @@ func _on_gui_input(event: InputEvent): diff_x *= 0.1 _grabbing_spinner_dist_cache += diff_x if not _grabbing_spinner and absf(_grabbing_spinner_dist_cache) > 4 * GameplaySettings.ui_scale: - GameUI.creator_ui.ui_request_captured = true + GameUI.instance.creator_ui.ui_request_captured = true _grabbing_spinner = true if _grabbing_spinner: # Don't make the user scroll all the way back to 'in range' if they went off the end. diff --git a/mirror-godot-app/creator/selection/inspector/script/add_input_button.gd b/mirror-godot-app/creator/selection/inspector/script/add_input_button.gd index 5916f4ac..9dd1127a 100644 --- a/mirror-godot-app/creator/selection/inspector/script/add_input_button.gd +++ b/mirror-godot-app/creator/selection/inspector/script/add_input_button.gd @@ -10,7 +10,7 @@ signal create_parameter(parameter_port_array: Array) func _on_pressed() -> void: _variable_creation_menu.clear_fields() _add_input_dialog.popup_centered() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) _variable_creation_menu.focus_variable_editor_name_field() @@ -24,8 +24,8 @@ func emit_create_parameter() -> void: func _on_add_input_dialog_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_add_input_dialog_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/creator/selection/model/model_builder.gd b/mirror-godot-app/creator/selection/model/model_builder.gd index 3481e9ee..809a5c20 100644 --- a/mirror-godot-app/creator/selection/model/model_builder.gd +++ b/mirror-godot-app/creator/selection/model/model_builder.gd @@ -253,13 +253,13 @@ func _draw_outlines() -> void: match _state: State.EXTRUDE: _ghost_color = Color.BLUE_VIOLET - GameUI.object_outlines.draw_line(_end - _plane.normal * 100, _end + _plane.normal * 100, Color.RED) + GameUI.instance.object_outlines.draw_line(_end - _plane.normal * 100, _end + _plane.normal * 100, Color.RED) State.SLIDE: _ghost_color = Color.VIOLET - GameUI.object_outlines.draw_line(_end - _slide_axis * 100, _end + _slide_axis * 100, Color.RED) + GameUI.instance.object_outlines.draw_line(_end - _slide_axis * 100, _end + _slide_axis * 100, Color.RED) _: _ghost_color = Color.BLUE - GameUI.object_outlines.draw_wireframe_box_aabb(_bounds.grow(OUTLINE_MARGIN), _ghost_color) + GameUI.instance.object_outlines.draw_wireframe_box_aabb(_bounds.grow(OUTLINE_MARGIN), _ghost_color) func _draw_text() -> void: diff --git a/mirror-godot-app/creator/selection/model/model_tool.gd b/mirror-godot-app/creator/selection/model/model_tool.gd index c432c650..b8db1db3 100644 --- a/mirror-godot-app/creator/selection/model/model_tool.gd +++ b/mirror-godot-app/creator/selection/model/model_tool.gd @@ -44,7 +44,7 @@ func save_local_model() -> void: return var file_path_glb: String = current_model_root.save_to_gltf_file() # Upload as an asset. - var asset_browser: AssetBrowser = GameUI.creator_ui.asset_browser + var asset_browser: AssetBrowser = GameUI.instance.creator_ui.asset_browser var promise = await asset_browser.create_asset_from_url(file_path_glb) if promise.is_error(): print("Failed to save a local model: %s" % promise.get_error_message()) diff --git a/mirror-godot-app/creator/selection/scene_hierarchy/scene_hierarchy_tree.gd b/mirror-godot-app/creator/selection/scene_hierarchy/scene_hierarchy_tree.gd index a5591d15..15798a72 100644 --- a/mirror-godot-app/creator/selection/scene_hierarchy/scene_hierarchy_tree.gd +++ b/mirror-godot-app/creator/selection/scene_hierarchy/scene_hierarchy_tree.gd @@ -539,7 +539,7 @@ func _on_tree_script_instances_changed(tree_item: TreeItem) -> void: func _on_item_mouse_selected(_position: Vector2, mouse_button: int) -> void: if mouse_button == MOUSE_BUTTON_RIGHT and not Input.is_action_pressed(&"object_multi_select"): var node = _get_instance_node_from_tree_item(get_next_selected(null)) - GameUI.creator_ui.open_context_menu(node) + GameUI.instance.creator_ui.open_context_menu(node) func _on_tree_item_selected(ui_only_tree_item: TreeItem, _selected_column: int, ui_only_is_selected: bool) -> void: diff --git a/mirror-godot-app/creator/selection/selection_outlines.gd b/mirror-godot-app/creator/selection/selection_outlines.gd index 4b01b58f..87837bf1 100644 --- a/mirror-godot-app/creator/selection/selection_outlines.gd +++ b/mirror-godot-app/creator/selection/selection_outlines.gd @@ -22,7 +22,7 @@ func _can_draw_outlines() -> bool: or _creator_ui.is_edit_mode(Enums.EDIT_MODE.Terrain) or _creator_ui.is_edit_mode(Enums.EDIT_MODE.Model) or PlayerData.game_mode.get_current_mode() == GameMode.Mode.NORMAL and not _creator_ui.object_creation.is_browser_expanded - or GameUI.creator_ui.ui_request_captured + or GameUI.instance.creator_ui.ui_request_captured ) @@ -31,12 +31,12 @@ func _process(_delta) -> void: set_process(false) return _draw_remote_selection_outlines() - if not _can_draw_outlines() or GameUI.is_cinematic_mode_enabled(): + if not _can_draw_outlines() or GameUI.instance.is_cinematic_mode_enabled(): return _draw_highlight_outlines() _draw_selection_outlines() # TODO Make hightlight only be shown when we are hovering the world instead of UI: -# if not GameUI.is_mouse_hovering_ui(): +# if not GameUI.instance.is_mouse_hovering_ui(): func _draw_selection_outlines() -> void: @@ -49,7 +49,7 @@ func _draw_selection_outlines() -> void: var color: Color = selection_color if selected_node is SpaceObject and selected_node.locked: color = Color.ORANGE - GameUI.object_outlines.draw_wireframe_box_object(selected_node, color) + GameUI.instance.object_outlines.draw_wireframe_box_object(selected_node, color) func _draw_remote_selection_outlines() -> void: @@ -60,7 +60,7 @@ func _draw_remote_selection_outlines() -> void: if not is_instance_valid(remotely_selected_node) or selected_nodes.has(remotely_selected_node) or remotely_selected_node.selected_by_peers.has(get_tree().get_multiplayer().get_unique_id()): # This is a locally selected node as well; so nothing to do. continue - GameUI.object_outlines.draw_wireframe_box_object(remotely_selected_node, remote_selection_color) + GameUI.instance.object_outlines.draw_wireframe_box_object(remotely_selected_node, remote_selection_color) func _draw_highlight_outlines() -> void: @@ -84,6 +84,6 @@ func _draw_highlight_outlines() -> void: var color: Color = highlight_color if object.locked: color = locked_color - GameUI.object_outlines.draw_wireframe_box_object(object, color) + GameUI.instance.object_outlines.draw_wireframe_box_object(object, color) elif object is ModelPrimitive: - GameUI.object_outlines.draw_wireframe_box_object(object, highlight_color) + GameUI.instance.object_outlines.draw_wireframe_box_object(object, highlight_color) diff --git a/mirror-godot-app/creator/tools/build_bar/build_bar.gd b/mirror-godot-app/creator/tools/build_bar/build_bar.gd index 4ed2c170..90a2a7a4 100644 --- a/mirror-godot-app/creator/tools/build_bar/build_bar.gd +++ b/mirror-godot-app/creator/tools/build_bar/build_bar.gd @@ -74,7 +74,7 @@ func _on_server_joined(): func _on_user_present_filter_menu_item_selected(_title, metadata): if metadata is Player: - GameUI.creator_ui.open_context_menu(metadata) + GameUI.instance.creator_ui.open_context_menu(metadata) func _on_game_mode_changed(new_mode: GameMode.Mode, _previous_mode: GameMode.Mode) -> void: @@ -133,7 +133,7 @@ func _on_primitive_model_builder_pressed() -> void: func _on_help_pressed() -> void: - GameUI.user_tutorial.show_tutorial_type(UserTutorial.Tutorial_Type.SPACE) + GameUI.instance.user_tutorial.show_tutorial_type(UserTutorial.Tutorial_Type.SPACE) func _on_teleport_pressed() -> void: @@ -215,7 +215,7 @@ func _on_save_space_pressed(): var gltf_doc = GLTFDocument.new() var gltf_state = GLTFState.new() var objects = Zone.instance_manager.get_all_instances() - var object_filtered := objects.filter(func(object): + var object_filtered = objects.filter(func(object): return object is SpaceObject and object.asset_type == Enums.ASSET_TYPE.MESH ) var err = OK diff --git a/mirror-godot-app/creator/tools/material_browser/material_window.gd b/mirror-godot-app/creator/tools/material_browser/material_window.gd index 99747539..9dd571d3 100644 --- a/mirror-godot-app/creator/tools/material_browser/material_window.gd +++ b/mirror-godot-app/creator/tools/material_browser/material_window.gd @@ -10,9 +10,9 @@ func _ready() -> void: func _on_visibility_changed() -> void: if self.visible: - GameUI.add_visible_window(self) + GameUI.instance.add_visible_window(self) else: - GameUI.remove_visible_window(self) + GameUI.instance.remove_visible_window(self) func sub_windows_visible(node: Node) -> bool: diff --git a/mirror-godot-app/creator/tools/material_creator/material_creator_window.gd b/mirror-godot-app/creator/tools/material_creator/material_creator_window.gd index 10e866ed..838193f0 100644 --- a/mirror-godot-app/creator/tools/material_creator/material_creator_window.gd +++ b/mirror-godot-app/creator/tools/material_creator/material_creator_window.gd @@ -10,9 +10,9 @@ func _ready() -> void: func _on_visibility_changed() -> void: if self.visible: - GameUI.add_visible_window(self) + GameUI.instance.add_visible_window(self) else: - GameUI.remove_visible_window(self) + GameUI.instance.remove_visible_window(self) func _sub_windows_visible(node: Node) -> bool: diff --git a/mirror-godot-app/creator/tools/material_creator/shader_code_editor.gd b/mirror-godot-app/creator/tools/material_creator/shader_code_editor.gd index e750edfc..082d757e 100644 --- a/mirror-godot-app/creator/tools/material_creator/shader_code_editor.gd +++ b/mirror-godot-app/creator/tools/material_creator/shader_code_editor.gd @@ -77,11 +77,11 @@ func _ready() -> void: func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: - GameUI.release_input_lock(false) + GameUI.instance.release_input_lock(false) func _on_visibility_changed() -> void: diff --git a/mirror-godot-app/creator/tools/normal/normal_mode_hotkeys.gd b/mirror-godot-app/creator/tools/normal/normal_mode_hotkeys.gd index 3362c650..86ed5d97 100644 --- a/mirror-godot-app/creator/tools/normal/normal_mode_hotkeys.gd +++ b/mirror-godot-app/creator/tools/normal/normal_mode_hotkeys.gd @@ -17,8 +17,8 @@ func _ready() -> void: func set_build_mode_ui_hint_state(state: bool) -> void: - var scoreboard_shortcut_enabled: bool = GameUI.scoreboard_window.is_scoreboard_shortcut_enabled() - var team_shortcut_enabled: bool = GameUI.teams_handler.is_teams_shortcut_enabled() + var scoreboard_shortcut_enabled: bool = GameUI.instance.scoreboard_window.is_scoreboard_shortcut_enabled() + var team_shortcut_enabled: bool = GameUI.instance.teams_handler.is_teams_shortcut_enabled() var build_shortcuts_enabled: bool = ProjectSettings.get_setting("feature_flags/enable_build_shortcuts", true) $TeamSelection.visible = team_shortcut_enabled $Scoreboard.visible = scoreboard_shortcut_enabled diff --git a/mirror-godot-app/creator/tools/statistics/statistics.gd b/mirror-godot-app/creator/tools/statistics/statistics.gd index f7912b64..bb98cac3 100644 --- a/mirror-godot-app/creator/tools/statistics/statistics.gd +++ b/mirror-godot-app/creator/tools/statistics/statistics.gd @@ -59,8 +59,8 @@ func _large_integer_to_friendly_string(number: int) -> String: func _on_hoverable_button_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_button_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/creator/tools/tool_options/map_options/map_options.gd b/mirror-godot-app/creator/tools/tool_options/map_options/map_options.gd index 0499193a..2447b7fd 100644 --- a/mirror-godot-app/creator/tools/tool_options/map_options/map_options.gd +++ b/mirror-godot-app/creator/tools/tool_options/map_options/map_options.gd @@ -256,13 +256,13 @@ func _on_object_selection_changed(selected_nodes: Array[Node]) -> void: Util.safe_signal_connect(map.map_loaded, _populate_panel_data) _no_map_selected.visible = false _tab_container.visible = true - if not GameUI.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map): + if not GameUI.instance.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map): emit_map_mode_toggle() return _no_map_selected.visible = true _tab_container.visible = false # This will exit map edit mode - if GameUI.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map): + if GameUI.instance.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map): emit_map_mode_toggle() _enable_panels(false, false) diff --git a/mirror-godot-app/creator/tools/toolbar_gizmo_options.gd b/mirror-godot-app/creator/tools/toolbar_gizmo_options.gd index 134a1ff0..8c57f20b 100644 --- a/mirror-godot-app/creator/tools/toolbar_gizmo_options.gd +++ b/mirror-godot-app/creator/tools/toolbar_gizmo_options.gd @@ -107,8 +107,8 @@ func _on_scale_button_pressed() -> void: func _on_snap_amount_focus_entered(): - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_snap_amount_focus_exited(): - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/export_presets.cfg b/mirror-godot-app/export_presets.cfg index 9a8f0a16..a59c4dc4 100644 --- a/mirror-godot-app/export_presets.cfg +++ b/mirror-godot-app/export_presets.cfg @@ -8,18 +8,18 @@ dedicated_server=false custom_features="" export_filter="all_resources" include_filter="package.json,override.cfg,avatars.cfg,local_assets_data.cfg" -exclude_filter="res://art/pcks/*, res://art/icons/GT/*" -export_path="" +exclude_filter="res://art/pcks/*, res://art/icons/GT/*, res://addons/godotopenxrvendors/*" +export_path="./The Mirror Latest.exe" encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.0.options] -custom_template/debug="" -custom_template/release="" +custom_template/debug="C:/Users/Gordon/Desktop/windows_release_x86_64.exe/windows_release_x86_64.exe" +custom_template/release="C:/Users/Gordon/Desktop/windows_release_x86_64.exe/windows_release_x86_64.exe" debug/export_console_wrapper=1 binary_format/embed_pck=false texture_format/s3tc_bptc=true @@ -42,9 +42,9 @@ application/product_name="The Mirror" application/file_description="" application/copyright="© The Mirror 2021-2024" application/trademarks="" -application/export_angle=0 -application/export_d3d12=0 -application/d3d12_agility_sdk_multiarch=true +application/export_angle=2 +application/export_d3d12=2 +application/d3d12_agility_sdk_multiarch=false ssh_remote_deploy/enabled=false ssh_remote_deploy/host="" ssh_remote_deploy/port="" @@ -68,13 +68,13 @@ dedicated_server=false custom_features="" export_filter="all_resources" include_filter="package.json,override.cfg,avatars.cfg,local_assets_data.cfg" -exclude_filter="res://art/pcks/*, res://art/icons/GT/*" +exclude_filter="res://art/pcks/*, res://art/icons/GT/*, res://addons/godotopenxrvendors/*" export_path="" encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.1.options] @@ -113,13 +113,13 @@ dedicated_server=false custom_features="game_server" export_filter="all_resources" include_filter="package.json,override.cfg,avatars.cfg,local_assets_data.cfg" -exclude_filter="res://art/pcks/*" +exclude_filter="res://art/pcks/*, res://addons/godotopenxrvendors/*" export_path="" encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.2.options] @@ -164,7 +164,7 @@ encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.3.options] @@ -245,6 +245,148 @@ privacy/network_volumes_usage_description="" privacy/network_volumes_usage_description_localized={} privacy/removable_volumes_usage_description="" privacy/removable_volumes_usage_description_localized={} +privacy/tracking_enabled=false +privacy/tracking_domains=PackedStringArray() +privacy/collected_data/name/collected=false +privacy/collected_data/name/linked_to_user=false +privacy/collected_data/name/used_for_tracking=false +privacy/collected_data/name/collection_purposes=0 +privacy/collected_data/email_address/collected=false +privacy/collected_data/email_address/linked_to_user=false +privacy/collected_data/email_address/used_for_tracking=false +privacy/collected_data/email_address/collection_purposes=0 +privacy/collected_data/phone_number/collected=false +privacy/collected_data/phone_number/linked_to_user=false +privacy/collected_data/phone_number/used_for_tracking=false +privacy/collected_data/phone_number/collection_purposes=0 +privacy/collected_data/physical_address/collected=false +privacy/collected_data/physical_address/linked_to_user=false +privacy/collected_data/physical_address/used_for_tracking=false +privacy/collected_data/physical_address/collection_purposes=0 +privacy/collected_data/other_contact_info/collected=false +privacy/collected_data/other_contact_info/linked_to_user=false +privacy/collected_data/other_contact_info/used_for_tracking=false +privacy/collected_data/other_contact_info/collection_purposes=0 +privacy/collected_data/health/collected=false +privacy/collected_data/health/linked_to_user=false +privacy/collected_data/health/used_for_tracking=false +privacy/collected_data/health/collection_purposes=0 +privacy/collected_data/fitness/collected=false +privacy/collected_data/fitness/linked_to_user=false +privacy/collected_data/fitness/used_for_tracking=false +privacy/collected_data/fitness/collection_purposes=0 +privacy/collected_data/payment_info/collected=false +privacy/collected_data/payment_info/linked_to_user=false +privacy/collected_data/payment_info/used_for_tracking=false +privacy/collected_data/payment_info/collection_purposes=0 +privacy/collected_data/credit_info/collected=false +privacy/collected_data/credit_info/linked_to_user=false +privacy/collected_data/credit_info/used_for_tracking=false +privacy/collected_data/credit_info/collection_purposes=0 +privacy/collected_data/other_financial_info/collected=false +privacy/collected_data/other_financial_info/linked_to_user=false +privacy/collected_data/other_financial_info/used_for_tracking=false +privacy/collected_data/other_financial_info/collection_purposes=0 +privacy/collected_data/precise_location/collected=false +privacy/collected_data/precise_location/linked_to_user=false +privacy/collected_data/precise_location/used_for_tracking=false +privacy/collected_data/precise_location/collection_purposes=0 +privacy/collected_data/coarse_location/collected=false +privacy/collected_data/coarse_location/linked_to_user=false +privacy/collected_data/coarse_location/used_for_tracking=false +privacy/collected_data/coarse_location/collection_purposes=0 +privacy/collected_data/sensitive_info/collected=false +privacy/collected_data/sensitive_info/linked_to_user=false +privacy/collected_data/sensitive_info/used_for_tracking=false +privacy/collected_data/sensitive_info/collection_purposes=0 +privacy/collected_data/contacts/collected=false +privacy/collected_data/contacts/linked_to_user=false +privacy/collected_data/contacts/used_for_tracking=false +privacy/collected_data/contacts/collection_purposes=0 +privacy/collected_data/emails_or_text_messages/collected=false +privacy/collected_data/emails_or_text_messages/linked_to_user=false +privacy/collected_data/emails_or_text_messages/used_for_tracking=false +privacy/collected_data/emails_or_text_messages/collection_purposes=0 +privacy/collected_data/photos_or_videos/collected=false +privacy/collected_data/photos_or_videos/linked_to_user=false +privacy/collected_data/photos_or_videos/used_for_tracking=false +privacy/collected_data/photos_or_videos/collection_purposes=0 +privacy/collected_data/audio_data/collected=false +privacy/collected_data/audio_data/linked_to_user=false +privacy/collected_data/audio_data/used_for_tracking=false +privacy/collected_data/audio_data/collection_purposes=0 +privacy/collected_data/gameplay_content/collected=false +privacy/collected_data/gameplay_content/linked_to_user=false +privacy/collected_data/gameplay_content/used_for_tracking=false +privacy/collected_data/gameplay_content/collection_purposes=0 +privacy/collected_data/customer_support/collected=false +privacy/collected_data/customer_support/linked_to_user=false +privacy/collected_data/customer_support/used_for_tracking=false +privacy/collected_data/customer_support/collection_purposes=0 +privacy/collected_data/other_user_content/collected=false +privacy/collected_data/other_user_content/linked_to_user=false +privacy/collected_data/other_user_content/used_for_tracking=false +privacy/collected_data/other_user_content/collection_purposes=0 +privacy/collected_data/browsing_history/collected=false +privacy/collected_data/browsing_history/linked_to_user=false +privacy/collected_data/browsing_history/used_for_tracking=false +privacy/collected_data/browsing_history/collection_purposes=0 +privacy/collected_data/search_hhistory/collected=false +privacy/collected_data/search_hhistory/linked_to_user=false +privacy/collected_data/search_hhistory/used_for_tracking=false +privacy/collected_data/search_hhistory/collection_purposes=0 +privacy/collected_data/user_id/collected=false +privacy/collected_data/user_id/linked_to_user=false +privacy/collected_data/user_id/used_for_tracking=false +privacy/collected_data/user_id/collection_purposes=0 +privacy/collected_data/device_id/collected=false +privacy/collected_data/device_id/linked_to_user=false +privacy/collected_data/device_id/used_for_tracking=false +privacy/collected_data/device_id/collection_purposes=0 +privacy/collected_data/purchase_history/collected=false +privacy/collected_data/purchase_history/linked_to_user=false +privacy/collected_data/purchase_history/used_for_tracking=false +privacy/collected_data/purchase_history/collection_purposes=0 +privacy/collected_data/product_interaction/collected=false +privacy/collected_data/product_interaction/linked_to_user=false +privacy/collected_data/product_interaction/used_for_tracking=false +privacy/collected_data/product_interaction/collection_purposes=0 +privacy/collected_data/advertising_data/collected=false +privacy/collected_data/advertising_data/linked_to_user=false +privacy/collected_data/advertising_data/used_for_tracking=false +privacy/collected_data/advertising_data/collection_purposes=0 +privacy/collected_data/other_usage_data/collected=false +privacy/collected_data/other_usage_data/linked_to_user=false +privacy/collected_data/other_usage_data/used_for_tracking=false +privacy/collected_data/other_usage_data/collection_purposes=0 +privacy/collected_data/crash_data/collected=false +privacy/collected_data/crash_data/linked_to_user=false +privacy/collected_data/crash_data/used_for_tracking=false +privacy/collected_data/crash_data/collection_purposes=0 +privacy/collected_data/performance_data/collected=false +privacy/collected_data/performance_data/linked_to_user=false +privacy/collected_data/performance_data/used_for_tracking=false +privacy/collected_data/performance_data/collection_purposes=0 +privacy/collected_data/other_diagnostic_data/collected=false +privacy/collected_data/other_diagnostic_data/linked_to_user=false +privacy/collected_data/other_diagnostic_data/used_for_tracking=false +privacy/collected_data/other_diagnostic_data/collection_purposes=0 +privacy/collected_data/environment_scanning/collected=false +privacy/collected_data/environment_scanning/linked_to_user=false +privacy/collected_data/environment_scanning/used_for_tracking=false +privacy/collected_data/environment_scanning/collection_purposes=0 +privacy/collected_data/hands/collected=false +privacy/collected_data/hands/linked_to_user=false +privacy/collected_data/hands/used_for_tracking=false +privacy/collected_data/hands/collection_purposes=0 +privacy/collected_data/head/collected=false +privacy/collected_data/head/linked_to_user=false +privacy/collected_data/head/used_for_tracking=false +privacy/collected_data/head/collection_purposes=0 +privacy/collected_data/other_data_types/collected=false +privacy/collected_data/other_data_types/linked_to_user=false +privacy/collected_data/other_data_types/used_for_tracking=false +privacy/collected_data/other_data_types/collection_purposes=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -274,7 +416,7 @@ encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.4.options] @@ -355,6 +497,148 @@ privacy/network_volumes_usage_description="" privacy/network_volumes_usage_description_localized={} privacy/removable_volumes_usage_description="" privacy/removable_volumes_usage_description_localized={} +privacy/tracking_enabled=false +privacy/tracking_domains=PackedStringArray() +privacy/collected_data/name/collected=false +privacy/collected_data/name/linked_to_user=false +privacy/collected_data/name/used_for_tracking=false +privacy/collected_data/name/collection_purposes=0 +privacy/collected_data/email_address/collected=false +privacy/collected_data/email_address/linked_to_user=false +privacy/collected_data/email_address/used_for_tracking=false +privacy/collected_data/email_address/collection_purposes=0 +privacy/collected_data/phone_number/collected=false +privacy/collected_data/phone_number/linked_to_user=false +privacy/collected_data/phone_number/used_for_tracking=false +privacy/collected_data/phone_number/collection_purposes=0 +privacy/collected_data/physical_address/collected=false +privacy/collected_data/physical_address/linked_to_user=false +privacy/collected_data/physical_address/used_for_tracking=false +privacy/collected_data/physical_address/collection_purposes=0 +privacy/collected_data/other_contact_info/collected=false +privacy/collected_data/other_contact_info/linked_to_user=false +privacy/collected_data/other_contact_info/used_for_tracking=false +privacy/collected_data/other_contact_info/collection_purposes=0 +privacy/collected_data/health/collected=false +privacy/collected_data/health/linked_to_user=false +privacy/collected_data/health/used_for_tracking=false +privacy/collected_data/health/collection_purposes=0 +privacy/collected_data/fitness/collected=false +privacy/collected_data/fitness/linked_to_user=false +privacy/collected_data/fitness/used_for_tracking=false +privacy/collected_data/fitness/collection_purposes=0 +privacy/collected_data/payment_info/collected=false +privacy/collected_data/payment_info/linked_to_user=false +privacy/collected_data/payment_info/used_for_tracking=false +privacy/collected_data/payment_info/collection_purposes=0 +privacy/collected_data/credit_info/collected=false +privacy/collected_data/credit_info/linked_to_user=false +privacy/collected_data/credit_info/used_for_tracking=false +privacy/collected_data/credit_info/collection_purposes=0 +privacy/collected_data/other_financial_info/collected=false +privacy/collected_data/other_financial_info/linked_to_user=false +privacy/collected_data/other_financial_info/used_for_tracking=false +privacy/collected_data/other_financial_info/collection_purposes=0 +privacy/collected_data/precise_location/collected=false +privacy/collected_data/precise_location/linked_to_user=false +privacy/collected_data/precise_location/used_for_tracking=false +privacy/collected_data/precise_location/collection_purposes=0 +privacy/collected_data/coarse_location/collected=false +privacy/collected_data/coarse_location/linked_to_user=false +privacy/collected_data/coarse_location/used_for_tracking=false +privacy/collected_data/coarse_location/collection_purposes=0 +privacy/collected_data/sensitive_info/collected=false +privacy/collected_data/sensitive_info/linked_to_user=false +privacy/collected_data/sensitive_info/used_for_tracking=false +privacy/collected_data/sensitive_info/collection_purposes=0 +privacy/collected_data/contacts/collected=false +privacy/collected_data/contacts/linked_to_user=false +privacy/collected_data/contacts/used_for_tracking=false +privacy/collected_data/contacts/collection_purposes=0 +privacy/collected_data/emails_or_text_messages/collected=false +privacy/collected_data/emails_or_text_messages/linked_to_user=false +privacy/collected_data/emails_or_text_messages/used_for_tracking=false +privacy/collected_data/emails_or_text_messages/collection_purposes=0 +privacy/collected_data/photos_or_videos/collected=false +privacy/collected_data/photos_or_videos/linked_to_user=false +privacy/collected_data/photos_or_videos/used_for_tracking=false +privacy/collected_data/photos_or_videos/collection_purposes=0 +privacy/collected_data/audio_data/collected=false +privacy/collected_data/audio_data/linked_to_user=false +privacy/collected_data/audio_data/used_for_tracking=false +privacy/collected_data/audio_data/collection_purposes=0 +privacy/collected_data/gameplay_content/collected=false +privacy/collected_data/gameplay_content/linked_to_user=false +privacy/collected_data/gameplay_content/used_for_tracking=false +privacy/collected_data/gameplay_content/collection_purposes=0 +privacy/collected_data/customer_support/collected=false +privacy/collected_data/customer_support/linked_to_user=false +privacy/collected_data/customer_support/used_for_tracking=false +privacy/collected_data/customer_support/collection_purposes=0 +privacy/collected_data/other_user_content/collected=false +privacy/collected_data/other_user_content/linked_to_user=false +privacy/collected_data/other_user_content/used_for_tracking=false +privacy/collected_data/other_user_content/collection_purposes=0 +privacy/collected_data/browsing_history/collected=false +privacy/collected_data/browsing_history/linked_to_user=false +privacy/collected_data/browsing_history/used_for_tracking=false +privacy/collected_data/browsing_history/collection_purposes=0 +privacy/collected_data/search_hhistory/collected=false +privacy/collected_data/search_hhistory/linked_to_user=false +privacy/collected_data/search_hhistory/used_for_tracking=false +privacy/collected_data/search_hhistory/collection_purposes=0 +privacy/collected_data/user_id/collected=false +privacy/collected_data/user_id/linked_to_user=false +privacy/collected_data/user_id/used_for_tracking=false +privacy/collected_data/user_id/collection_purposes=0 +privacy/collected_data/device_id/collected=false +privacy/collected_data/device_id/linked_to_user=false +privacy/collected_data/device_id/used_for_tracking=false +privacy/collected_data/device_id/collection_purposes=0 +privacy/collected_data/purchase_history/collected=false +privacy/collected_data/purchase_history/linked_to_user=false +privacy/collected_data/purchase_history/used_for_tracking=false +privacy/collected_data/purchase_history/collection_purposes=0 +privacy/collected_data/product_interaction/collected=false +privacy/collected_data/product_interaction/linked_to_user=false +privacy/collected_data/product_interaction/used_for_tracking=false +privacy/collected_data/product_interaction/collection_purposes=0 +privacy/collected_data/advertising_data/collected=false +privacy/collected_data/advertising_data/linked_to_user=false +privacy/collected_data/advertising_data/used_for_tracking=false +privacy/collected_data/advertising_data/collection_purposes=0 +privacy/collected_data/other_usage_data/collected=false +privacy/collected_data/other_usage_data/linked_to_user=false +privacy/collected_data/other_usage_data/used_for_tracking=false +privacy/collected_data/other_usage_data/collection_purposes=0 +privacy/collected_data/crash_data/collected=false +privacy/collected_data/crash_data/linked_to_user=false +privacy/collected_data/crash_data/used_for_tracking=false +privacy/collected_data/crash_data/collection_purposes=0 +privacy/collected_data/performance_data/collected=false +privacy/collected_data/performance_data/linked_to_user=false +privacy/collected_data/performance_data/used_for_tracking=false +privacy/collected_data/performance_data/collection_purposes=0 +privacy/collected_data/other_diagnostic_data/collected=false +privacy/collected_data/other_diagnostic_data/linked_to_user=false +privacy/collected_data/other_diagnostic_data/used_for_tracking=false +privacy/collected_data/other_diagnostic_data/collection_purposes=0 +privacy/collected_data/environment_scanning/collected=false +privacy/collected_data/environment_scanning/linked_to_user=false +privacy/collected_data/environment_scanning/used_for_tracking=false +privacy/collected_data/environment_scanning/collection_purposes=0 +privacy/collected_data/hands/collected=false +privacy/collected_data/hands/linked_to_user=false +privacy/collected_data/hands/used_for_tracking=false +privacy/collected_data/hands/collection_purposes=0 +privacy/collected_data/head/collected=false +privacy/collected_data/head/linked_to_user=false +privacy/collected_data/head/used_for_tracking=false +privacy/collected_data/head/collection_purposes=0 +privacy/collected_data/other_data_types/collected=false +privacy/collected_data/other_data_types/linked_to_user=false +privacy/collected_data/other_data_types/used_for_tracking=false +privacy/collected_data/other_data_types/collection_purposes=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -384,7 +668,7 @@ encryption_include_filters="*.tscn, *.scn, *.cfg, *.gd, *.tres, *.gdshader" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=true -script_export_mode=2 +script_export_mode=0 [preset.5.options] @@ -465,6 +749,148 @@ privacy/network_volumes_usage_description="Network drives" privacy/network_volumes_usage_description_localized={} privacy/removable_volumes_usage_description="USB drives" privacy/removable_volumes_usage_description_localized={} +privacy/tracking_enabled=false +privacy/tracking_domains=PackedStringArray() +privacy/collected_data/name/collected=false +privacy/collected_data/name/linked_to_user=false +privacy/collected_data/name/used_for_tracking=false +privacy/collected_data/name/collection_purposes=0 +privacy/collected_data/email_address/collected=false +privacy/collected_data/email_address/linked_to_user=false +privacy/collected_data/email_address/used_for_tracking=false +privacy/collected_data/email_address/collection_purposes=0 +privacy/collected_data/phone_number/collected=false +privacy/collected_data/phone_number/linked_to_user=false +privacy/collected_data/phone_number/used_for_tracking=false +privacy/collected_data/phone_number/collection_purposes=0 +privacy/collected_data/physical_address/collected=false +privacy/collected_data/physical_address/linked_to_user=false +privacy/collected_data/physical_address/used_for_tracking=false +privacy/collected_data/physical_address/collection_purposes=0 +privacy/collected_data/other_contact_info/collected=false +privacy/collected_data/other_contact_info/linked_to_user=false +privacy/collected_data/other_contact_info/used_for_tracking=false +privacy/collected_data/other_contact_info/collection_purposes=0 +privacy/collected_data/health/collected=false +privacy/collected_data/health/linked_to_user=false +privacy/collected_data/health/used_for_tracking=false +privacy/collected_data/health/collection_purposes=0 +privacy/collected_data/fitness/collected=false +privacy/collected_data/fitness/linked_to_user=false +privacy/collected_data/fitness/used_for_tracking=false +privacy/collected_data/fitness/collection_purposes=0 +privacy/collected_data/payment_info/collected=false +privacy/collected_data/payment_info/linked_to_user=false +privacy/collected_data/payment_info/used_for_tracking=false +privacy/collected_data/payment_info/collection_purposes=0 +privacy/collected_data/credit_info/collected=false +privacy/collected_data/credit_info/linked_to_user=false +privacy/collected_data/credit_info/used_for_tracking=false +privacy/collected_data/credit_info/collection_purposes=0 +privacy/collected_data/other_financial_info/collected=false +privacy/collected_data/other_financial_info/linked_to_user=false +privacy/collected_data/other_financial_info/used_for_tracking=false +privacy/collected_data/other_financial_info/collection_purposes=0 +privacy/collected_data/precise_location/collected=false +privacy/collected_data/precise_location/linked_to_user=false +privacy/collected_data/precise_location/used_for_tracking=false +privacy/collected_data/precise_location/collection_purposes=0 +privacy/collected_data/coarse_location/collected=false +privacy/collected_data/coarse_location/linked_to_user=false +privacy/collected_data/coarse_location/used_for_tracking=false +privacy/collected_data/coarse_location/collection_purposes=0 +privacy/collected_data/sensitive_info/collected=false +privacy/collected_data/sensitive_info/linked_to_user=false +privacy/collected_data/sensitive_info/used_for_tracking=false +privacy/collected_data/sensitive_info/collection_purposes=0 +privacy/collected_data/contacts/collected=false +privacy/collected_data/contacts/linked_to_user=false +privacy/collected_data/contacts/used_for_tracking=false +privacy/collected_data/contacts/collection_purposes=0 +privacy/collected_data/emails_or_text_messages/collected=false +privacy/collected_data/emails_or_text_messages/linked_to_user=false +privacy/collected_data/emails_or_text_messages/used_for_tracking=false +privacy/collected_data/emails_or_text_messages/collection_purposes=0 +privacy/collected_data/photos_or_videos/collected=false +privacy/collected_data/photos_or_videos/linked_to_user=false +privacy/collected_data/photos_or_videos/used_for_tracking=false +privacy/collected_data/photos_or_videos/collection_purposes=0 +privacy/collected_data/audio_data/collected=false +privacy/collected_data/audio_data/linked_to_user=false +privacy/collected_data/audio_data/used_for_tracking=false +privacy/collected_data/audio_data/collection_purposes=0 +privacy/collected_data/gameplay_content/collected=false +privacy/collected_data/gameplay_content/linked_to_user=false +privacy/collected_data/gameplay_content/used_for_tracking=false +privacy/collected_data/gameplay_content/collection_purposes=0 +privacy/collected_data/customer_support/collected=false +privacy/collected_data/customer_support/linked_to_user=false +privacy/collected_data/customer_support/used_for_tracking=false +privacy/collected_data/customer_support/collection_purposes=0 +privacy/collected_data/other_user_content/collected=false +privacy/collected_data/other_user_content/linked_to_user=false +privacy/collected_data/other_user_content/used_for_tracking=false +privacy/collected_data/other_user_content/collection_purposes=0 +privacy/collected_data/browsing_history/collected=false +privacy/collected_data/browsing_history/linked_to_user=false +privacy/collected_data/browsing_history/used_for_tracking=false +privacy/collected_data/browsing_history/collection_purposes=0 +privacy/collected_data/search_hhistory/collected=false +privacy/collected_data/search_hhistory/linked_to_user=false +privacy/collected_data/search_hhistory/used_for_tracking=false +privacy/collected_data/search_hhistory/collection_purposes=0 +privacy/collected_data/user_id/collected=false +privacy/collected_data/user_id/linked_to_user=false +privacy/collected_data/user_id/used_for_tracking=false +privacy/collected_data/user_id/collection_purposes=0 +privacy/collected_data/device_id/collected=false +privacy/collected_data/device_id/linked_to_user=false +privacy/collected_data/device_id/used_for_tracking=false +privacy/collected_data/device_id/collection_purposes=0 +privacy/collected_data/purchase_history/collected=false +privacy/collected_data/purchase_history/linked_to_user=false +privacy/collected_data/purchase_history/used_for_tracking=false +privacy/collected_data/purchase_history/collection_purposes=0 +privacy/collected_data/product_interaction/collected=false +privacy/collected_data/product_interaction/linked_to_user=false +privacy/collected_data/product_interaction/used_for_tracking=false +privacy/collected_data/product_interaction/collection_purposes=0 +privacy/collected_data/advertising_data/collected=false +privacy/collected_data/advertising_data/linked_to_user=false +privacy/collected_data/advertising_data/used_for_tracking=false +privacy/collected_data/advertising_data/collection_purposes=0 +privacy/collected_data/other_usage_data/collected=false +privacy/collected_data/other_usage_data/linked_to_user=false +privacy/collected_data/other_usage_data/used_for_tracking=false +privacy/collected_data/other_usage_data/collection_purposes=0 +privacy/collected_data/crash_data/collected=false +privacy/collected_data/crash_data/linked_to_user=false +privacy/collected_data/crash_data/used_for_tracking=false +privacy/collected_data/crash_data/collection_purposes=0 +privacy/collected_data/performance_data/collected=false +privacy/collected_data/performance_data/linked_to_user=false +privacy/collected_data/performance_data/used_for_tracking=false +privacy/collected_data/performance_data/collection_purposes=0 +privacy/collected_data/other_diagnostic_data/collected=false +privacy/collected_data/other_diagnostic_data/linked_to_user=false +privacy/collected_data/other_diagnostic_data/used_for_tracking=false +privacy/collected_data/other_diagnostic_data/collection_purposes=0 +privacy/collected_data/environment_scanning/collected=false +privacy/collected_data/environment_scanning/linked_to_user=false +privacy/collected_data/environment_scanning/used_for_tracking=false +privacy/collected_data/environment_scanning/collection_purposes=0 +privacy/collected_data/hands/collected=false +privacy/collected_data/hands/linked_to_user=false +privacy/collected_data/hands/used_for_tracking=false +privacy/collected_data/hands/collection_purposes=0 +privacy/collected_data/head/collected=false +privacy/collected_data/head/linked_to_user=false +privacy/collected_data/head/used_for_tracking=false +privacy/collected_data/head/collection_purposes=0 +privacy/collected_data/other_data_types/collected=false +privacy/collected_data/other_data_types/linked_to_user=false +privacy/collected_data/other_data_types/used_for_tracking=false +privacy/collected_data/other_data_types/collection_purposes=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -477,3 +903,225 @@ ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" debug/export_console_script=1 + +[preset.6] + +name="Android" +platform="Android" +runnable=true +advanced_options=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="package.json,override.cfg,avatars.cfg,local_assets_data.cfg" +exclude_filter="res://art/pcks/*" +export_path="../The Mirror Latest.apk" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=0 + +[preset.6.options] + +custom_template/debug="/Users/gordon/Projects/the-mirror/godot-engine/bin/android_release.apk" +custom_template/release="/Users/gordon/Projects/the-mirror/godot-engine/bin/android_release.apk" +gradle_build/use_gradle_build=true +gradle_build/gradle_build_directory="" +gradle_build/android_source_template="C:/Users/Gordon/Desktop/android-template-20-06-24/android-template/bin/android_source.zip" +gradle_build/compress_native_libraries=false +gradle_build/export_format=0 +gradle_build/min_sdk="31" +gradle_build/target_sdk="34" +architectures/armeabi-v7a=false +architectures/arm64-v8a=true +architectures/x86=false +architectures/x86_64=false +version/code=1 +version/name="1.0.1" +package/unique_name="com.themirrorgdp.themirrorgdp" +package/name="themirrorgdp" +package/signed=true +package/app_category=2 +package/retain_data_on_uninstall=false +package/exclude_from_recents=false +package/show_in_android_tv=false +package/show_in_app_library=true +package/show_as_launcher_app=false +launcher_icons/main_192x192="" +launcher_icons/adaptive_foreground_432x432="" +launcher_icons/adaptive_background_432x432="" +graphics/opengl_debug=false +xr_features/xr_mode=1 +screen/immersive_mode=true +screen/support_small=true +screen/support_normal=true +screen/support_large=true +screen/support_xlarge=true +user_data_backup/allow=false +command_line/extra_args="" +apk_expansion/enable=false +apk_expansion/SALT="" +apk_expansion/public_key="" +permissions/custom_permissions=PackedStringArray() +permissions/access_checkin_properties=false +permissions/access_coarse_location=false +permissions/access_fine_location=false +permissions/access_location_extra_commands=false +permissions/access_mock_location=false +permissions/access_network_state=true +permissions/access_surface_flinger=false +permissions/access_wifi_state=true +permissions/account_manager=true +permissions/add_voicemail=false +permissions/authenticate_accounts=false +permissions/battery_stats=false +permissions/bind_accessibility_service=false +permissions/bind_appwidget=false +permissions/bind_device_admin=false +permissions/bind_input_method=false +permissions/bind_nfc_service=false +permissions/bind_notification_listener_service=false +permissions/bind_print_service=false +permissions/bind_remoteviews=false +permissions/bind_text_service=false +permissions/bind_vpn_service=false +permissions/bind_wallpaper=false +permissions/bluetooth=false +permissions/bluetooth_admin=false +permissions/bluetooth_privileged=false +permissions/brick=false +permissions/broadcast_package_removed=false +permissions/broadcast_sms=false +permissions/broadcast_sticky=false +permissions/broadcast_wap_push=false +permissions/call_phone=false +permissions/call_privileged=false +permissions/camera=false +permissions/capture_audio_output=false +permissions/capture_secure_video_output=false +permissions/capture_video_output=false +permissions/change_component_enabled_state=false +permissions/change_configuration=false +permissions/change_network_state=true +permissions/change_wifi_multicast_state=false +permissions/change_wifi_state=true +permissions/clear_app_cache=true +permissions/clear_app_user_data=true +permissions/control_location_updates=false +permissions/delete_cache_files=true +permissions/delete_packages=false +permissions/device_power=false +permissions/diagnostic=true +permissions/disable_keyguard=false +permissions/dump=false +permissions/expand_status_bar=false +permissions/factory_test=false +permissions/flashlight=false +permissions/force_back=false +permissions/get_accounts=true +permissions/get_package_size=true +permissions/get_tasks=false +permissions/get_top_activity_info=false +permissions/global_search=false +permissions/hardware_test=false +permissions/inject_events=false +permissions/install_location_provider=false +permissions/install_packages=false +permissions/install_shortcut=false +permissions/internal_system_window=false +permissions/internet=true +permissions/kill_background_processes=true +permissions/location_hardware=false +permissions/manage_accounts=false +permissions/manage_app_tokens=false +permissions/manage_documents=false +permissions/manage_external_storage=false +permissions/master_clear=false +permissions/media_content_control=false +permissions/modify_audio_settings=false +permissions/modify_phone_state=true +permissions/mount_format_filesystems=false +permissions/mount_unmount_filesystems=false +permissions/nfc=false +permissions/persistent_activity=false +permissions/post_notifications=false +permissions/process_outgoing_calls=false +permissions/read_calendar=false +permissions/read_call_log=false +permissions/read_contacts=false +permissions/read_external_storage=true +permissions/read_frame_buffer=true +permissions/read_history_bookmarks=false +permissions/read_input_state=false +permissions/read_logs=true +permissions/read_phone_state=false +permissions/read_profile=false +permissions/read_sms=false +permissions/read_social_stream=false +permissions/read_sync_settings=false +permissions/read_sync_stats=false +permissions/read_user_dictionary=false +permissions/reboot=false +permissions/receive_boot_completed=false +permissions/receive_mms=false +permissions/receive_sms=false +permissions/receive_wap_push=false +permissions/record_audio=false +permissions/reorder_tasks=false +permissions/restart_packages=false +permissions/send_respond_via_message=false +permissions/send_sms=false +permissions/set_activity_watcher=false +permissions/set_alarm=false +permissions/set_always_finish=false +permissions/set_animation_scale=false +permissions/set_debug_app=true +permissions/set_orientation=false +permissions/set_pointer_speed=false +permissions/set_preferred_applications=false +permissions/set_process_limit=false +permissions/set_time=false +permissions/set_time_zone=false +permissions/set_wallpaper=false +permissions/set_wallpaper_hints=false +permissions/signal_persistent_processes=false +permissions/status_bar=false +permissions/subscribed_feeds_read=false +permissions/subscribed_feeds_write=false +permissions/system_alert_window=false +permissions/transmit_ir=false +permissions/uninstall_shortcut=false +permissions/update_device_stats=false +permissions/use_credentials=false +permissions/use_sip=false +permissions/vibrate=false +permissions/wake_lock=false +permissions/write_apn_settings=false +permissions/write_calendar=false +permissions/write_call_log=false +permissions/write_contacts=false +permissions/write_external_storage=true +permissions/write_gservices=true +permissions/write_history_bookmarks=true +permissions/write_profile=true +permissions/write_secure_settings=true +permissions/write_settings=true +permissions/write_sms=true +permissions/write_social_stream=true +permissions/write_sync_settings=true +permissions/write_user_dictionary=true +xr_features/enable_khronos_plugin=false +xr_features/enable_lynx_plugin=false +xr_features/enable_meta_plugin=true +meta_xr_features/eye_tracking=0 +meta_xr_features/hand_tracking=1 +meta_xr_features/hand_tracking_frequency=0 +meta_xr_features/passthrough=1 +meta_xr_features/use_anchor_api=false +meta_xr_features/use_scene_api=false +meta_xr_features/quest_1_support=false +meta_xr_features/quest_2_support=true +meta_xr_features/quest_3_support=true +meta_xr_features/quest_pro_support=true +xr_features/enable_pico_plugin=false diff --git a/mirror-godot-app/gameplay/space_object/space_object.gd b/mirror-godot-app/gameplay/space_object/space_object.gd index 09c72161..21ca3238 100644 --- a/mirror-godot-app/gameplay/space_object/space_object.gd +++ b/mirror-godot-app/gameplay/space_object/space_object.gd @@ -463,7 +463,7 @@ func _configure_spawn_points(): #print("is server: ", "yes" if Zone.is_host() else "no") for target_node in spawn_points.keys(): var spawn_point = spawn_points[target_node] - if spawn_point.has("team"): + if spawn_point.has("team") and has_node(NodePath(target_node)): var spawn_point_node = get_node(NodePath(target_node)) if not spawn_point_node: #print("invalid path or bug with node: ", target_node) diff --git a/mirror-godot-app/player/cameras/camera_manager.gd b/mirror-godot-app/player/cameras/camera_manager.gd index 55f68cf5..96edd348 100644 --- a/mirror-godot-app/player/cameras/camera_manager.gd +++ b/mirror-godot-app/player/cameras/camera_manager.gd @@ -32,7 +32,7 @@ func _process(delta: float) -> void: func enable_for_player(player: TMCharacter3D): - var gizmo: Gizmo = GameUI.get_node(^"CreatorUI/ObjectSelection/Gizmo") + var gizmo: Gizmo = GameUI.instance.get_node(^"CreatorUI/ObjectSelection/Gizmo") _player_head_camera_holder.setup(player, self, gizmo) _free_camera_holder.setup(player, self, gizmo) _placement_preview.setup(self) @@ -153,8 +153,8 @@ func _unhandled_input(input_event: InputEvent) -> void: var dict = get_camera_raycast_dict() if not dict.has("collider") or not dict.has("position"): return - GameUI.creator_ui.open_context_menu(dict.collider, dict.position) - if GameUI.is_mouse_needed_for_ui(): + GameUI.instance.creator_ui.open_context_menu(dict.collider, dict.position) + if GameUI.instance.is_mouse_needed_for_ui(): if input_event.is_action_pressed("primary_action"): # Works to release focus from all SpinBox and text boxes _main_viewport.gui_release_focus() diff --git a/mirror-godot-app/player/cameras/camera_nodes/asset_placement_base.gd b/mirror-godot-app/player/cameras/camera_nodes/asset_placement_base.gd index 7cddfb45..b3946adc 100644 --- a/mirror-godot-app/player/cameras/camera_nodes/asset_placement_base.gd +++ b/mirror-godot-app/player/cameras/camera_nodes/asset_placement_base.gd @@ -32,8 +32,8 @@ func handle_asset_placement_input(input_event: InputEvent) -> void: if interact_raycast_layer(input_event, ["GIZMO"]): return if ( - not GameUI.creator_ui.is_edit_mode(Enums.EDIT_MODE.Asset) - and not GameUI.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map) + not GameUI.instance.creator_ui.is_edit_mode(Enums.EDIT_MODE.Asset) + and not GameUI.instance.creator_ui.is_edit_mode(Enums.EDIT_MODE.Map) ): return select_object() @@ -47,18 +47,18 @@ func select_object() -> void: var multi_select_pressed = Input.is_action_pressed(&"object_multi_select") if not is_instance_valid(object): if not multi_select_pressed: - GameUI.creator_ui.clear_selection() + GameUI.instance.creator_ui.clear_selection() return if object is ModelPrimitive: - GameUI.creator_ui.raycast_hit_object(object) + GameUI.instance.creator_ui.raycast_hit_object(object) return var space_object = Util.get_space_object(object) if space_object: if space_object.asset_type == Enums.ASSET_TYPE.MAP or space_object.locked: if not multi_select_pressed: - GameUI.creator_ui.clear_selection() + GameUI.instance.creator_ui.clear_selection() return - GameUI.creator_ui.raycast_hit_object(space_object) + GameUI.instance.creator_ui.raycast_hit_object(space_object) ## Places the currently selected asset in the world. @@ -93,7 +93,7 @@ func get_placement_transform_or_null(): # -> Transform3D? if abs(target.dot(back)) > 0.99: # Edge case handling: Don't allow these vectors to be colinear. back = global_transform.basis.y - if GameUI.creator_ui.is_gizmo_type(Enums.GIZMO_TYPE.GRAB): + if GameUI.instance.creator_ui.is_gizmo_type(Enums.GIZMO_TYPE.GRAB): placement_transform.basis = _basis_looking_at_y(target, back) # Calculate the position. If Gizmo snap is enabled, snap to the snap step. placement_transform = placement_transform.translated_local(_camera_manager.placement_offset) diff --git a/mirror-godot-app/player/cameras/camera_nodes/asset_placement_build_mode.gd b/mirror-godot-app/player/cameras/camera_nodes/asset_placement_build_mode.gd index ae3f2d55..43265c14 100644 --- a/mirror-godot-app/player/cameras/camera_nodes/asset_placement_build_mode.gd +++ b/mirror-godot-app/player/cameras/camera_nodes/asset_placement_build_mode.gd @@ -36,7 +36,7 @@ func handle_asset_placement_input(input_event: InputEvent) -> void: var zoom_in = input_event.is_action_pressed(&"build_mode_camera_zoom_in") if zoom_in or input_event.is_action_pressed(&"build_mode_camera_zoom_out"): if input_event is InputEventMouseButton: - if not GameUI.creator_ui.get_safe_area().has_point(input_event.position): + if not GameUI.instance.creator_ui.get_safe_area().has_point(input_event.position): return if zoom_in: target_zoom /= ZOOM_TARGET_MULTIPLIER diff --git a/mirror-godot-app/player/cameras/free/camera_speed_ui.gd b/mirror-godot-app/player/cameras/free/camera_speed_ui.gd index c1adf8a6..7ef2603d 100644 --- a/mirror-godot-app/player/cameras/free/camera_speed_ui.gd +++ b/mirror-godot-app/player/cameras/free/camera_speed_ui.gd @@ -5,8 +5,8 @@ extends Label func _process(delta: float) -> void: - visible = not GameUI.is_cinematic_mode_enabled() - var safe_area: Rect2 = GameUI.get_safe_area() + visible = not GameUI.instance.is_cinematic_mode_enabled() + var safe_area: Rect2 = GameUI.instance.get_safe_area() position = safe_area.position + Vector2(20.0, safe_area.size.y - 60.0) modulate.a -= delta * 0.5 if modulate.a < 0.0: diff --git a/mirror-godot-app/player/cameras/free/free_camera.gd b/mirror-godot-app/player/cameras/free/free_camera.gd index 98d8153c..7bebf0de 100644 --- a/mirror-godot-app/player/cameras/free/free_camera.gd +++ b/mirror-godot-app/player/cameras/free/free_camera.gd @@ -78,7 +78,7 @@ func update(delta): func process_movement(delta): - if GameUI.is_keyboard_needed_for_ui() or (not Input.is_action_pressed(&"build_mode_camera_orbit") and not GameUI.is_cinematic_mode_enabled()): + if GameUI.instance.is_keyboard_needed_for_ui() or (not Input.is_action_pressed(&"build_mode_camera_orbit") and not GameUI.instance.is_cinematic_mode_enabled()): return var desired_movement_speed = _free_movement_speed if Input.is_action_pressed(&"player_sprint"): @@ -123,6 +123,6 @@ func _adjust_scroll_speed(zoom_in: bool) -> void: func _add_stationary_zoom(value: float) -> void: - if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED or not GameUI.drag_detector.hovering_game_view: + if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED or not GameUI.instance.drag_detector.hovering_game_view: return position += transform.basis.z * value diff --git a/mirror-godot-app/player/cameras/head/player_head_camera.gd b/mirror-godot-app/player/cameras/head/player_head_camera.gd index df2271aa..b66a1fb1 100644 --- a/mirror-godot-app/player/cameras/head/player_head_camera.gd +++ b/mirror-godot-app/player/cameras/head/player_head_camera.gd @@ -121,7 +121,7 @@ func _set_camera_based_on_perspective() -> void: func _refresh_camera() -> void: - if not GameUI.creator_ui.is_game_mode(GameMode.Mode.NORMAL) and not Zone.is_in_play_mode(): + if not GameUI.instance.creator_ui.is_game_mode(GameMode.Mode.NORMAL) and not Zone.is_in_play_mode(): return if _perspective_locked: _set_camera_based_on_perspective() diff --git a/mirror-godot-app/player/controller/input_controller.gd b/mirror-godot-app/player/controller/input_controller.gd index c0c0a371..fa2d25c4 100644 --- a/mirror-godot-app/player/controller/input_controller.gd +++ b/mirror-godot-app/player/controller/input_controller.gd @@ -37,14 +37,14 @@ func _process(delta: float) -> void: func _notification(what: int) -> void: if what == MainLoop.NOTIFICATION_APPLICATION_FOCUS_IN: - if GameUI.creator_ui.is_game_mode(GameMode.Mode.NORMAL) or Zone.is_in_play_mode(): + if GameUI.instance.creator_ui.is_game_mode(GameMode.Mode.NORMAL) or Zone.is_in_play_mode(): does_game_mode_accept_input = true elif what == MainLoop.NOTIFICATION_APPLICATION_FOCUS_OUT: does_game_mode_accept_input = false func is_avatar_input_enabled() -> bool: - if GameUI.is_keyboard_needed_for_ui() or GameUI.is_mouse_needed_for_ui(): + if GameUI.instance.is_keyboard_needed_for_ui() or GameUI.instance.is_mouse_needed_for_ui(): return false return is_player_input_allowed and does_game_mode_accept_input diff --git a/mirror-godot-app/player/controller/mouse_capture.gd b/mirror-godot-app/player/controller/mouse_capture.gd index 402dc327..215c6a15 100644 --- a/mirror-godot-app/player/controller/mouse_capture.gd +++ b/mirror-godot-app/player/controller/mouse_capture.gd @@ -31,7 +31,7 @@ func _notification(what): func _process(_delta: float) -> void: var was_mouse_captured_last_frame: bool = (Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED) - var is_mouse_needed_by_ui: bool = GameUI.is_mouse_needed_for_ui() + var is_mouse_needed_by_ui: bool = GameUI.instance.is_mouse_needed_for_ui() var new_mouse_mode: Input.MouseMode = Input.MOUSE_MODE_VISIBLE if not is_mouse_needed_by_ui: if is_app_focused: diff --git a/mirror-godot-app/player/equipable/equipable_controller.gd b/mirror-godot-app/player/equipable/equipable_controller.gd index 69b3d9f6..d8206f9e 100644 --- a/mirror-godot-app/player/equipable/equipable_controller.gd +++ b/mirror-godot-app/player/equipable/equipable_controller.gd @@ -18,7 +18,7 @@ func setup(player_owner: Player) -> void: player = player_owner if not Zone.is_host() and player.is_local_player(): player.get_equipable_view_model().setup(self) - GameUI.hotbar.hotbar_asset_selected.connect(set_selected_equipable_asset_id) + GameUI.instance.hotbar.hotbar_asset_selected.connect(set_selected_equipable_asset_id) player.get_equipable_world_model().setup(self) Zone.social_manager.player_connected.connect(_on_player_connected) @@ -31,7 +31,7 @@ func _on_player_connected(_spawned_player: Player) -> void: func _process(_delta: float) -> void: var is_in_free_cam_mode = ( Zone.is_in_edit_mode() and - not GameUI.creator_ui.is_game_mode(GameMode.Mode.NORMAL) + not GameUI.instance.creator_ui.is_game_mode(GameMode.Mode.NORMAL) ) # TODO MAYBE Simplify that huge if guard, @@ -45,7 +45,7 @@ func _process(_delta: float) -> void: or is_in_free_cam_mode or player.is_dead() # Not in main_menu or other - or GameUI.is_mouse_needed_for_ui() + or GameUI.instance.is_mouse_needed_for_ui() ): return if Input.is_action_pressed(&"primary_action"): diff --git a/mirror-godot-app/player/equipable/equipable_view_model.gd b/mirror-godot-app/player/equipable/equipable_view_model.gd index c575ad83..831c4f71 100644 --- a/mirror-godot-app/player/equipable/equipable_view_model.gd +++ b/mirror-godot-app/player/equipable/equipable_view_model.gd @@ -25,7 +25,7 @@ func _process(delta) -> void: var target_transform := Transform3D.IDENTITY var player_velocity: Vector3 = _player.get_local_movement_velocity() var mouse_sway: Vector2 = _player.get_intended_camera_rotation_change() - if _equipable_controller.is_current_equipable_aiming() and not GameUI.is_mouse_needed_for_ui(): + if _equipable_controller.is_current_equipable_aiming() and not GameUI.instance.is_mouse_needed_for_ui(): target_transform.origin = Vector3(-0.025, 0.02, 0.0) target_transform.origin += Vector3(mouse_sway.y, mouse_sway.x, 0.0) * _sway_amplitude target_transform.basis *= Basis.from_euler(Vector3(0.0, 0.0, (player_velocity.x * -0.3) + -mouse_sway.y)) diff --git a/mirror-godot-app/player/equipable/gun/firearm/firearm.gd b/mirror-godot-app/player/equipable/gun/firearm/firearm.gd index 50c3fee6..a56b9ceb 100644 --- a/mirror-godot-app/player/equipable/gun/firearm/firearm.gd +++ b/mirror-godot-app/player/equipable/gun/firearm/firearm.gd @@ -114,7 +114,7 @@ func shoot() -> void: hit_object.damage(bullet_damage, _equipable_controller.player.get_user_id()) if hit_object is Player: create_blood_particles(hit_object, hit_position) - GameUI.crosshair.show_hitmarker() + GameUI.instance.crosshair.show_hitmarker() return if hit_object.has_method("server_add_impulse_at_position"): if hit_object.is_dynamic(): diff --git a/mirror-godot-app/player/player.gd b/mirror-godot-app/player/player.gd index f3ca5441..c4ba1641 100644 --- a/mirror-godot-app/player/player.gd +++ b/mirror-godot-app/player/player.gd @@ -535,7 +535,7 @@ func _respawn_player_network(spawn_point_path: NodePath, spawn_transform: Transf if spawn_point_node: spawn_point_node.emit_signal("player_spawned_here", self) Zone.social_manager.player_spawned.emit(self) - GameUI.health_display.play_respawn_sound() + GameUI.instance.health_display.play_respawn_sound() func _calculate_spawn_transform(spawn_point_path: NodePath) -> Transform3D: @@ -655,7 +655,7 @@ func add_equipable(asset_id: String) -> void: if Zone.is_host(): add_equipable.rpc_id(_peer_id, asset_id) if not Zone.is_host() and is_local_player(): - GameUI.hotbar.add_equipable(asset_id) + GameUI.instance.hotbar.add_equipable(asset_id) @rpc("call_remote", "any_peer", "reliable") @@ -663,7 +663,7 @@ func clear_equipables() -> void: if Zone.is_host(): clear_equipables.rpc_id(_peer_id) elif is_local_player(): - GameUI.hotbar.clear_equipables() + GameUI.instance.hotbar.clear_equipables() @rpc("call_remote", "any_peer", "reliable") @@ -676,7 +676,7 @@ func load_equipables() -> void: if Zone.is_host(): load_equipables.rpc_id(_peer_id) if not Zone.is_host() and is_local_player(): - GameUI.hotbar.load_equipables() + GameUI.instance.hotbar.load_equipables() func refresh_player_scale() -> void: @@ -1017,11 +1017,11 @@ func draw_interaction_outline(target: Node3D) -> void: var transf: Transform3D = target.global_transform transf = transf.translated_local(aabb.position) transf.basis *= Basis.from_scale(aabb.size) - GameUI.object_outlines.draw_wireframe_box_transform(transf, _INTERACT_COLOR) + GameUI.instance.object_outlines.draw_wireframe_box_transform(transf, _INTERACT_COLOR) if GameplaySettings.show_floating_control_hints: var screen_pos: Vector2 = camera_unproject_position_to_screen( transf * Vector3(0.5, 0.5, 0.5)) - GameUI.floating_text.draw_text_at_screen_position("Interact (E)", screen_pos) + GameUI.instance.floating_text.draw_text_at_screen_position("Interact (E)", screen_pos) # TODO: make this network synced @@ -1124,14 +1124,14 @@ func _on_damage_handler_health_changed(_target_object: Node, new_health: float, return data_store.set_value("health", new_health) if new_health < old_health: - GameUI.health_display.show_damage_screen() + GameUI.instance.health_display.show_damage_screen() if Zone.has_player(event_origin): var killer: Player = Zone.get_player(event_origin) if killer != self: - GameUI.health_display.add_damage_indicator(killer.global_position) - GameUI.health_display.set_health(ceili(new_health)) + GameUI.instance.health_display.add_damage_indicator(killer.global_position) + GameUI.instance.health_display.set_health(ceili(new_health)) if new_health <= 0.0: - GameUI.health_display.play_death_sound() + GameUI.instance.health_display.play_death_sound() # Important: this is server-side only! @@ -1296,4 +1296,4 @@ func _on_player_model_avatar_changed() -> void: func create_emoji(emoji: String) -> void: social_ui.create_emoji(emoji) if not Zone.is_host() and is_local_player(): - GameUI.chat_ui.send_chat_message_server.rpc_id(Zone.SERVER_PEER_ID, emoji) + GameUI.instance.chat_ui.send_chat_message_server.rpc_id(Zone.SERVER_PEER_ID, emoji) diff --git a/mirror-godot-app/player/ui/social/social_ui.gd b/mirror-godot-app/player/ui/social/social_ui.gd index cf32aa9f..c073675a 100644 --- a/mirror-godot-app/player/ui/social/social_ui.gd +++ b/mirror-godot-app/player/ui/social/social_ui.gd @@ -18,7 +18,7 @@ func setup(player: Player) -> void: func _ready() -> void: - GameUI.chat_ui.chat_message_sent.connect(_on_chat_message_sent) + GameUI.instance.chat_ui.chat_message_sent.connect(_on_chat_message_sent) _use_large_text_size = ProjectSettings.get_setting("feature_flags/large_text_size", false) if _use_large_text_size: name_label.label_settings.font_size = _large_text_size diff --git a/mirror-godot-app/player/vr/main_menu_set_layer_viewport.gd b/mirror-godot-app/player/vr/main_menu_set_layer_viewport.gd new file mode 100644 index 00000000..06941edc --- /dev/null +++ b/mirror-godot-app/player/vr/main_menu_set_layer_viewport.gd @@ -0,0 +1,73 @@ +extends OpenXRCompositionLayerQuad + +const NO_INTERSECTION = Vector2(-1.0, -1.0) + +@onready var controller : XRController3D = $"../LeftHand" +@onready var pointer = $"../Pointer" +@export var button_action : String = "trigger_click" + +var was_pressed : bool = false +var was_intersect : Vector2 = NO_INTERSECTION + +func _intersect_to_global_pos(intersect : Vector2) -> Vector3: + if intersect != NO_INTERSECTION: + var local_pos : Vector2 = (intersect - Vector2(0.5, 0.5)) * quad_size + return global_transform * Vector3(local_pos.x, -local_pos.y, 0.0) + else: + return Vector3() + + +func _intersect_to_viewport_pos(intersect : Vector2) -> Vector2i: + if layer_viewport and intersect != NO_INTERSECTION: + var pos : Vector2 = intersect * Vector2(layer_viewport.size) + return Vector2i(pos) + else: + return Vector2i(-1, -1) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(_delta): + # Hide our pointer, we'll make it visible if we're interacting with the viewport. + pointer.visible = false + + if controller and layer_viewport: + var controller_t : Transform3D = controller.global_transform + var intersect : Vector2 = intersects_ray(controller_t.origin, -controller_t.basis.z) + if intersect != NO_INTERSECTION: + # DisplayServer.virtual_keyboard_show("test") + var is_pressed : bool = controller.is_button_pressed(button_action) + # Place our pointer where we're pointing + var pos : Vector3 = _intersect_to_global_pos(intersect) + pointer.visible = true + pointer.global_position = pos + if was_intersect != NO_INTERSECTION and intersect != was_intersect: + # Pointer moved + var event : InputEventMouseMotion = InputEventMouseMotion.new() + var from : Vector2 = _intersect_to_viewport_pos(was_intersect) + var to : Vector2 = _intersect_to_viewport_pos(intersect) + if was_pressed: + event.button_mask = MOUSE_BUTTON_MASK_LEFT + event.relative = to - from + event.position = to + layer_viewport.push_input(event) + if not is_pressed and was_pressed: + # Button was let go? + var event : InputEventMouseButton = InputEventMouseButton.new() + event.button_index = 1 + event.pressed = false + event.position = _intersect_to_viewport_pos(intersect) + layer_viewport.push_input(event) + elif is_pressed and not was_pressed: + # Button was pressed? + var event : InputEventMouseButton = InputEventMouseButton.new() + event.button_index = 1 + event.button_mask = MOUSE_BUTTON_MASK_LEFT + event.pressed = true + event.position = _intersect_to_viewport_pos(intersect) + layer_viewport.push_input(event) + + else: + was_pressed = false + was_intersect = NO_INTERSECTION + was_pressed = is_pressed + was_intersect = intersect diff --git a/mirror-godot-app/player/vr/vr_controller_menu.gd b/mirror-godot-app/player/vr/vr_controller_menu.gd new file mode 100644 index 00000000..b844d6d2 --- /dev/null +++ b/mirror-godot-app/player/vr/vr_controller_menu.gd @@ -0,0 +1,144 @@ +class_name VRControllerMenu +extends Node + +signal vr_started +signal vr_ended + +const _ROTATION_SPEED: float = 4.0 + +@onready var _root: Node3D = $Root +@onready var _origin: XROrigin3D = $Root/XROrigin3D +@onready var _camera: XRCamera3D = $Root/XROrigin3D/XRCamera3D +@onready var _camera_neck: Node3D = $Root/XROrigin3D/XRCamera3D/Neck +@onready var _left_hand: XRController3D = $Root/XROrigin3D/LeftHand +@onready var _left_hand_laser: Node3D = $Root/XROrigin3D/LeftHand/Laser +@onready var _right_hand: XRController3D = $Root/XROrigin3D/RightHand +@onready var _right_hand_laser: Node3D = $Root/XROrigin3D/RightHand/Laser + +var _movement_direction := Vector3.ZERO +var _camera_rotation_change := Vector2.ZERO +var _running: bool = false +var _jumping: bool = false + +var _left_hand_interacting: bool = false +var _right_hand_interacting: bool = false + + +func setup() -> void: + VRManager.vr_started.connect(_on_vr_enter) + VRManager.vr_ended.connect(_on_vr_exit) + # If the player is already wearing VR, we just activate the VR camera. + if VRManager.vr_is_active: + _on_vr_enter() + + +func _process(_delta: float) -> void: + # TODO: ? + # _root.global_position = _local_player.model.global_position + pass + +func _on_vr_enter() -> void: + vr_started.emit() + + +func _on_vr_exit() -> void: + vr_ended.emit() + + +func get_camera() -> XRCamera3D: + return _camera + + +func camera_get_look_target() -> Vector3: + var head = _camera.get_global_transform() + return head.origin + head.basis.z * 10 + + +func get_camera_rotation() -> Vector3: + if is_instance_valid(_camera): + return _camera.global_rotation + return Vector3.ZERO + + +func get_body_position() -> Vector3: + return _origin.transform * _camera.transform * _camera_neck.position + + +func get_intended_movement_direction() -> Vector3: + return _movement_direction + + +func get_intended_camera_rotation_change() -> Vector2: + return _camera_rotation_change + + +func is_intent_to_run() -> bool: + return _running + + +func is_intent_to_jump() -> bool: + if _jumping: + _jumping = false + return true + return false + + +func is_left_hand_intent_to_interact() -> bool: + if _left_hand_interacting: + _left_hand_interacting = false + return true + return false + + +func is_right_hand_intent_to_interact() -> bool: + if _right_hand_interacting: + _right_hand_interacting = false + return true + return false + + +func origin_set_rotation_y(rotation: float) -> void: + _origin.global_rotation.y = rotation - _camera.rotation.y + + +func _get_ray_cast(hand: Node3D) -> Dictionary: + var ray_layers: Array = [ + &"STATIC", + &"KINEMATIC", + &"CHARACTER", + &"DYNAMIC", + ] + return Util.get_raycast(_camera, hand.global_position, hand.global_position - hand.global_transform.basis.z * 100, ray_layers) + + +func _on_left_hand_input_vector_2_changed(_action: String, value: Vector2): + _movement_direction = Vector3(value.x, 0, -value.y) if value.length() > 0.1 else Vector3.ZERO + + +func _on_left_hand_button_pressed(action: String): + if action == "primary_click": + _running = true + + +func _on_left_hand_button_released(action: String): + if action == "primary_click": + _running = false + elif action == "trigger_click" and not _left_hand_interacting: + _left_hand_interacting = true + + +func _on_right_hand_button_pressed(action: String): + if action == "primary_click" and not _jumping: + _jumping = true + elif action == "trigger_click" and not _right_hand_interacting: + _right_hand_interacting = true + + +func _on_right_hand_input_vector_2_changed(_action: String, value: Vector2): + # Rotate the XROrigin around a pivot, which is the player. + var amount: float = deg_to_rad(-value.x * _ROTATION_SPEED) + var pivot_point: Vector3 = Vector3() # TODO: player global pos + var offset: Vector3 = _origin.global_position - pivot_point + var rotated_offset: Vector3 = offset.rotated(Vector3.UP, amount) + _origin.global_position = pivot_point + rotated_offset + _origin.rotate(Vector3.UP, amount) diff --git a/mirror-godot-app/player/vr/vr_controller_menu.tscn b/mirror-godot-app/player/vr/vr_controller_menu.tscn new file mode 100644 index 00000000..d5494e0b --- /dev/null +++ b/mirror-godot-app/player/vr/vr_controller_menu.tscn @@ -0,0 +1,95 @@ +[gd_scene load_steps=9 format=3 uid="uid://dmk74a73ew62s"] + +[ext_resource type="Script" path="res://player/vr/vr_controller_menu.gd" id="1_6wet2"] +[ext_resource type="PackedScene" uid="uid://d20edduhwu64b" path="res://player/vr/hand_l.glb" id="2_ks3ua"] +[ext_resource type="Material" uid="uid://by1x2mq3jq2nf" path="res://player/vr/hand.tres" id="3_nfms1"] +[ext_resource type="Material" uid="uid://nv2lyirekar0" path="res://player/vr/laser.tres" id="4_a1c83"] +[ext_resource type="PackedScene" uid="uid://bjp8bqvo22y2y" path="res://player/vr/hand_r.glb" id="5_le75e"] +[ext_resource type="Script" path="res://player/vr/main_menu_set_layer_viewport.gd" id="6_u3erp"] + +[sub_resource type="BoxMesh" id="BoxMesh_g0e3b"] +material = ExtResource("4_a1c83") +size = Vector3(0.005, 0.005, 2) + +[sub_resource type="BoxMesh" id="BoxMesh_r4gol"] +size = Vector3(0.1, 0.1, 0.1) + +[node name="VRControllerMenu" type="Node"] +script = ExtResource("1_6wet2") + +[node name="Root" type="Node3D" parent="."] + +[node name="XROrigin3D" type="XROrigin3D" parent="Root"] +current = true + +[node name="XRCamera3D" type="XRCamera3D" parent="Root/XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.7, 0) +cull_mask = 524287 +current = true +fov = 80.0 + +[node name="Neck" type="Node3D" parent="Root/XROrigin3D/XRCamera3D"] + +[node name="LeftHand" type="XRController3D" parent="Root/XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1.7, -1) +tracker = &"left_hand" + +[node name="hand_l" parent="Root/XROrigin3D/LeftHand" instance=ExtResource("2_ks3ua")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.01, 0.07) + +[node name="mesh_Hand_L" parent="Root/XROrigin3D/LeftHand/hand_l/Armature/Skeleton3D" index="0"] +transform = Transform3D(1.00335, 0, 0, 0, 1.00335, 0, 0, 0, 1.00335, 0, 0, 0) +surface_material_override/0 = ExtResource("3_nfms1") + +[node name="Laser" type="Node3D" parent="Root/XROrigin3D/LeftHand"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.01, 0, 0, -0.2) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Root/XROrigin3D/LeftHand/Laser"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1) +mesh = SubResource("BoxMesh_g0e3b") +skeleton = NodePath("../../../RightHand") + +[node name="RightHand" type="XRController3D" parent="Root/XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1.7, -1) +tracker = &"right_hand" + +[node name="hand_r" parent="Root/XROrigin3D/RightHand" instance=ExtResource("5_le75e")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.01, 0.07) + +[node name="mesh_Hand_R" parent="Root/XROrigin3D/RightHand/hand_r/Armature/Skeleton3D" index="0"] +surface_material_override/0 = ExtResource("3_nfms1") + +[node name="Laser" type="Node3D" parent="Root/XROrigin3D/RightHand"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.01, 0, 0, -0.2) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Root/XROrigin3D/RightHand/Laser"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.999992) +mesh = SubResource("BoxMesh_g0e3b") +skeleton = NodePath("../..") + +[node name="OpenXRCompositionLayerQuad" type="OpenXRCompositionLayerQuad" parent="Root/XROrigin3D" node_paths=PackedStringArray("layer_viewport")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.715, -1.40846) +layer_viewport = NodePath("../../../SubViewportSettingsExample") +sort_order = -1 +enable_hole_punch = true +quad_size = Vector2(2.7, 1.5) +script = ExtResource("6_u3erp") + +[node name="Pointer" type="MeshInstance3D" parent="Root/XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 0) +mesh = SubResource("BoxMesh_r4gol") +skeleton = NodePath("../..") + +[node name="SubViewportSettingsExample" type="SubViewport" parent="."] +disable_3d = true +size = Vector2i(1650, 1080) +render_target_update_mode = 4 + +[connection signal="button_pressed" from="Root/XROrigin3D/LeftHand" to="." method="_on_left_hand_button_pressed"] +[connection signal="button_released" from="Root/XROrigin3D/LeftHand" to="." method="_on_left_hand_button_released"] +[connection signal="input_vector2_changed" from="Root/XROrigin3D/LeftHand" to="." method="_on_left_hand_input_vector_2_changed"] +[connection signal="button_pressed" from="Root/XROrigin3D/RightHand" to="." method="_on_right_hand_button_pressed"] +[connection signal="input_vector2_changed" from="Root/XROrigin3D/RightHand" to="." method="_on_right_hand_input_vector_2_changed"] + +[editable path="Root/XROrigin3D/LeftHand/hand_l"] +[editable path="Root/XROrigin3D/RightHand/hand_r"] diff --git a/mirror-godot-app/prefabs/autoload/gameplay_settings/gameplay_settings.gd b/mirror-godot-app/prefabs/autoload/gameplay_settings/gameplay_settings.gd index db62400a..72e43ac2 100644 --- a/mirror-godot-app/prefabs/autoload/gameplay_settings/gameplay_settings.gd +++ b/mirror-godot-app/prefabs/autoload/gameplay_settings/gameplay_settings.gd @@ -155,6 +155,7 @@ var render_profile := RenderProfile.new() func _ready() -> void: + await GameUI.ui_ready() _load_config_file() get_viewport().size_changed.connect(_window_size_changed) render_profile.load_viewport_settings() @@ -304,14 +305,14 @@ func _apply_show_framerate_enabled(is_show_framerate_enabled: bool): if show_framerate_enabled != is_show_framerate_enabled: show_framerate_enabled = is_show_framerate_enabled _save_config_file() - GameUI.fps_label.visible = show_framerate_enabled + GameUI.instance.fps_label.visible = show_framerate_enabled func _apply_crosshair_color(new_crosshair_color: Color) -> void: if crosshair_color != new_crosshair_color: crosshair_color = new_crosshair_color _save_config_file() - GameUI.crosshair.set_color(new_crosshair_color) + GameUI.instance.crosshair.set_color(new_crosshair_color) # Controls @@ -341,8 +342,8 @@ func _apply_menu_ambience_volume_db(new_ambience_volume: float): if Zone.is_host(): # Server does not play any audio. return - GameUI.menu_ambience.volume_db = menu_ambience_volume_db - 10.0 - GameUI.menu_ambience.check_update_stream() + GameUI.instance.menu_ambience.volume_db = menu_ambience_volume_db - 10.0 + GameUI.instance.menu_ambience.check_update_stream() func _apply_is_microphone_enabled(new_is_microphone_enabled: bool) -> void: diff --git a/mirror-godot-app/prefabs/space/voxel_ghost_preview/voxel_ghost_preview.gd b/mirror-godot-app/prefabs/space/voxel_ghost_preview/voxel_ghost_preview.gd index 5fe56f5b..69783865 100644 --- a/mirror-godot-app/prefabs/space/voxel_ghost_preview/voxel_ghost_preview.gd +++ b/mirror-godot-app/prefabs/space/voxel_ghost_preview/voxel_ghost_preview.gd @@ -7,7 +7,7 @@ extends Area3D func _ready(): - GameUI.creator_ui.terrain_tool.terrain_tool_settings_changed.connect(update_ghost_preview) + GameUI.instance.creator_ui.terrain_tool.terrain_tool_settings_changed.connect(update_ghost_preview) update_ghost_preview() @@ -24,7 +24,7 @@ func set_enabled(is_enabled: bool) -> void: func update_ghost_preview() -> void: - var terrain_tool = GameUI.creator_ui.terrain_tool + var terrain_tool = GameUI.instance.creator_ui.terrain_tool var tween = create_tween() tween.tween_property(self, "scale", (terrain_tool.brush_size + 0.1) * Vector3.ONE, 0.1) diff --git a/mirror-godot-app/prefabs/ui/undo_redo_system.gd b/mirror-godot-app/prefabs/ui/undo_redo_system.gd index 3cfa053f..f0ac0367 100644 --- a/mirror-godot-app/prefabs/ui/undo_redo_system.gd +++ b/mirror-godot-app/prefabs/ui/undo_redo_system.gd @@ -51,7 +51,7 @@ func _get_selected_space_objects(selection: Array) -> Array[SpaceObject]: func _unhandled_input(input_event: InputEvent) -> void: # Prevent undoing/redoing from the main_menu and other windows - if GameUI.is_any_full_screen_or_modal_ui_visible(): + if GameUI.instance.is_any_full_screen_or_modal_ui_visible(): return if input_event.is_action_pressed(&"ui_redo"): redo() diff --git a/mirror-godot-app/project.godot b/mirror-godot-app/project.godot index 26392bec..a0a3df23 100644 --- a/mirror-godot-app/project.godot +++ b/mirror-godot-app/project.godot @@ -96,6 +96,7 @@ driver/enable_input=true [autoload] +VRManager="*res://scripts/autoload/vr_manager.gd" Analytics="*res://scripts/autoload/analytics/analytics.gd" AnalyticsV2="*res://scripts/autoload/analytics/analytics_v2.gd" Zone="*res://prefabs/autoload/zone/zone.tscn" @@ -108,7 +109,6 @@ AutoUpdate="*res://scripts/autoload/auto_update.gd" Constants="*res://scripts/autoload/constants.gd" Debug="*res://scripts/debug/debug.gd" PlayerData="*res://scripts/autoload/player_data.gd" -GameUI="*res://ui/game/game_ui.tscn" Notify="*res://ui/notifications/notify.gd" GameplaySettings="*res://prefabs/autoload/gameplay_settings/gameplay_settings.gd" AnalyticsSession="*res://scripts/autoload/analytics/analytics_session.gd" @@ -117,7 +117,6 @@ AppState="*res://scripts/autoload/analytics/app_state.gd" GameplayTools="*res://prefabs/autoload/gameplay_tools/gameplay_tools.tscn" DebugGeometry="*res://addons/debug_geometry.gd" MirrorScriptServer="*res://script/mirror_script_server.gd" -VRManager="*res://scripts/autoload/vr_manager.gd" Util="*res://scripts/autoload/util_funcs.gd" [debug] diff --git a/mirror-godot-app/script/editor/entry_creation/entry_create_dialog.gd b/mirror-godot-app/script/editor/entry_creation/entry_create_dialog.gd index 3c78cc9c..8eebb093 100644 --- a/mirror-godot-app/script/editor/entry_creation/entry_create_dialog.gd +++ b/mirror-godot-app/script/editor/entry_creation/entry_create_dialog.gd @@ -14,7 +14,7 @@ func _ready() -> void: func populate_and_show(target_node: Node) -> void: title = "Create Script Entry" _entry_creation_menu.populate_selection_tree(target_node, false) - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) popup_centered() _entry_creation_menu.focus_search_bar() @@ -22,7 +22,7 @@ func populate_and_show(target_node: Node) -> void: func populate_and_show_for_custom(target_node: Node) -> void: _entry_creation_menu.populate_selection_tree(target_node, true) _show_custom_entry_menu() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) _entry_creation_menu.focus_search_bar() diff --git a/mirror-godot-app/script/editor/entry_creation/parameter_add_button.gd b/mirror-godot-app/script/editor/entry_creation/parameter_add_button.gd index cb311d5b..0cbe95d3 100644 --- a/mirror-godot-app/script/editor/entry_creation/parameter_add_button.gd +++ b/mirror-godot-app/script/editor/entry_creation/parameter_add_button.gd @@ -19,7 +19,7 @@ func erase_type_from_option_button(data_type: int) -> void: func _on_pressed() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) _parameter_creation_dialog.popup_centered() @@ -34,8 +34,8 @@ func _on_parameter_creation_dialog_confirmed() -> void: func _on_focus_entered(): - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited(): - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/script/editor/script_editor.gd b/mirror-godot-app/script/editor/script_editor.gd index bbf30ebf..022a8edc 100644 --- a/mirror-godot-app/script/editor/script_editor.gd +++ b/mirror-godot-app/script/editor/script_editor.gd @@ -249,11 +249,11 @@ func _on_request_save_script_as_asset(script_instance: ScriptInstance) -> void: func _on_dialog_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_dialog_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_request_track_recently_used_space_script(script_instance: ScriptInstance) -> void: diff --git a/mirror-godot-app/script/editor/usage/script_usage.gd b/mirror-godot-app/script/editor/usage/script_usage.gd index 4344e240..d2a62f91 100644 --- a/mirror-godot-app/script/editor/usage/script_usage.gd +++ b/mirror-godot-app/script/editor/usage/script_usage.gd @@ -27,7 +27,7 @@ func set_script_toolbar_editable(is_editable: bool) -> void: func _on_view_script_users_pressed() -> void: - GameUI.creator_ui.search_node_tree("script_id=" + _script_instance.script_id) + GameUI.instance.creator_ui.search_node_tree("script_id=" + _script_instance.script_id) func _on_clone_script_pressed() -> void: diff --git a/mirror-godot-app/script/editor/variable/variable_creation_dialog.gd b/mirror-godot-app/script/editor/variable/variable_creation_dialog.gd index d64ef7d1..885e500c 100644 --- a/mirror-godot-app/script/editor/variable/variable_creation_dialog.gd +++ b/mirror-godot-app/script/editor/variable/variable_creation_dialog.gd @@ -17,7 +17,7 @@ func open_creation_dialog(node_path: NodePath = ^""): title = tr("Create Variable on '%s'" % node_path) _variable_node_path = ^"" popup_centered() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_confirmed() -> void: diff --git a/mirror-godot-app/script/editor/variable/variable_creation_menu.gd b/mirror-godot-app/script/editor/variable/variable_creation_menu.gd index 87a07ed6..bd7d8e33 100644 --- a/mirror-godot-app/script/editor/variable/variable_creation_menu.gd +++ b/mirror-godot-app/script/editor/variable/variable_creation_menu.gd @@ -78,4 +78,4 @@ func _on_data_type_selected(data_type_index: int) -> void: func _on_name_line_edit_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) diff --git a/mirror-godot-app/script/editor/variable/variable_editor.gd b/mirror-godot-app/script/editor/variable/variable_editor.gd index bf99b4fa..5f80a85c 100644 --- a/mirror-godot-app/script/editor/variable/variable_editor.gd +++ b/mirror-godot-app/script/editor/variable/variable_editor.gd @@ -179,7 +179,7 @@ func toggle_variable_editor() -> void: hide() else: show() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) _search.grab_focus() _search.select_all() diff --git a/mirror-godot-app/script/editor/variable/variable_type_editor_dialog.gd b/mirror-godot-app/script/editor/variable/variable_type_editor_dialog.gd index 3d6b9839..d8ffaf30 100644 --- a/mirror-godot-app/script/editor/variable/variable_type_editor_dialog.gd +++ b/mirror-godot-app/script/editor/variable/variable_type_editor_dialog.gd @@ -19,7 +19,7 @@ func edit_variable_type(variable_name: String, current_value: Variant, node_path var index: int = _type_selection_button.get_item_index(variable_type) _type_selection_button.select(index) popup_centered() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_confirmed() -> void: diff --git a/mirror-godot-app/script/gd/mirror_singleton.gd b/mirror-godot-app/script/gd/mirror_singleton.gd index 03c4ae19..5cc54100 100644 --- a/mirror-godot-app/script/gd/mirror_singleton.gd +++ b/mirror-godot-app/script/gd/mirror_singleton.gd @@ -21,7 +21,7 @@ static func get_friendly_name(value: Variant) -> String: static func print_in_chat(attached_object: Object, message: String, range_radius: float = INF) -> void: - GameUI.chat_ui.send_message_from_object(attached_object, message, range_radius) + GameUI.instance.chat_ui.send_message_from_object(attached_object, message, range_radius) # Global variables. diff --git a/mirror-godot-app/script/network_sync.gd b/mirror-godot-app/script/network_sync.gd index 627b3b7d..15bdbd2e 100644 --- a/mirror-godot-app/script/network_sync.gd +++ b/mirror-godot-app/script/network_sync.gd @@ -845,8 +845,8 @@ func _handle_tmusergdscript_runtime_error_server_to_clients(target_node_path: No func _handle_tmusergdscript_runtime_error_on_clients(script_instance: ScriptInstance, error_message: String, line_number: int) -> void: - if GameUI.creator_ui: - if GameUI.creator_ui.show_error_in_gd_script_editor_if_open(script_instance, line_number, error_message): + if GameUI.instance.creator_ui: + if GameUI.instance.creator_ui.show_error_in_gd_script_editor_if_open(script_instance, line_number, error_message): return # If the script editor is not open, display a notification with a link to open. var obj_name_error: String = error_message @@ -854,7 +854,7 @@ func _handle_tmusergdscript_runtime_error_on_clients(script_instance: ScriptInst obj_name_error = script_instance.target_node.get_space_object_name() + ": " + error_message elif script_instance.target_node is SpaceGlobalScripts: obj_name_error = "Global script: " + error_message - Notify.error("GDScript Error", obj_name_error, GameUI.creator_ui.show_error_in_gd_script_editor_if_open.bind(script_instance, line_number, error_message)) + Notify.error("GDScript Error", obj_name_error, GameUI.instance.creator_ui.show_error_in_gd_script_editor_if_open.bind(script_instance, line_number, error_message)) # Physics. diff --git a/mirror-godot-app/script/visual/blocks/match/hide_scoreboard.gd b/mirror-godot-app/script/visual/blocks/match/hide_scoreboard.gd index 78d17d37..93b59dff 100644 --- a/mirror-godot-app/script/visual/blocks/match/hide_scoreboard.gd +++ b/mirror-godot-app/script/visual/blocks/match/hide_scoreboard.gd @@ -6,14 +6,14 @@ func _execute_callback(_stack_count: int) -> Error: if Zone.is_host(): if target_player is Player: var player_peer_id = target_player.get_peer_id() - GameUI.scoreboard_window.set_scoreboard_shown_network.rpc_id(player_peer_id, false, false, false) + GameUI.instance.scoreboard_window.set_scoreboard_shown_network.rpc_id(player_peer_id, false, false, false) else: - GameUI.scoreboard_window.set_scoreboard_shown(false, false, false) + GameUI.instance.scoreboard_window.set_scoreboard_shown(false, false, false) else: if target_player is Player and target_player != PlayerData.get_local_player(): log_error.emit("Cannot hide the scoreboard on " + target_player.get_player_name() + " from a client-side script.") # On client-side scripts, only hide locally. - GameUI.scoreboard_window.set_scoreboard_shown_network(false, false, false) + GameUI.instance.scoreboard_window.set_scoreboard_shown_network(false, false, false) return OK diff --git a/mirror-godot-app/script/visual/blocks/match/set_scoreboard_title.gd b/mirror-godot-app/script/visual/blocks/match/set_scoreboard_title.gd index 7790cc98..4c66fb54 100644 --- a/mirror-godot-app/script/visual/blocks/match/set_scoreboard_title.gd +++ b/mirror-godot-app/script/visual/blocks/match/set_scoreboard_title.gd @@ -4,9 +4,9 @@ extends ScriptBlockSequenced func _execute_callback(_stack_count: int) -> Error: var new_title: String = inputs[0].value if Zone.is_host(): - GameUI.scoreboard_window.set_scoreboard_title_text(new_title) + GameUI.instance.scoreboard_window.set_scoreboard_title_text(new_title) else: - GameUI.scoreboard_window.set_scoreboard_title_text_network(new_title) + GameUI.instance.scoreboard_window.set_scoreboard_title_text_network(new_title) return OK diff --git a/mirror-godot-app/script/visual/blocks/match/show_scoreboard.gd b/mirror-godot-app/script/visual/blocks/match/show_scoreboard.gd index c3a75a61..c10466cf 100644 --- a/mirror-godot-app/script/visual/blocks/match/show_scoreboard.gd +++ b/mirror-godot-app/script/visual/blocks/match/show_scoreboard.gd @@ -15,14 +15,14 @@ func _execute_callback(_stack_count: int) -> Error: if Zone.is_host(): if target_player is Player: var player_peer_id = target_player.get_peer_id() - GameUI.scoreboard_window.set_scoreboard_shown_network.rpc_id(player_peer_id, true, allow_close, allow_new_match) + GameUI.instance.scoreboard_window.set_scoreboard_shown_network.rpc_id(player_peer_id, true, allow_close, allow_new_match) else: - GameUI.scoreboard_window.set_scoreboard_shown(true, allow_close, allow_new_match) + GameUI.instance.scoreboard_window.set_scoreboard_shown(true, allow_close, allow_new_match) else: if target_player is Player and target_player != PlayerData.get_local_player(): log_error.emit("Cannot show the scoreboard on " + target_player.get_player_name() + " from a client-side script.") # On client-side scripts, only show locally. - GameUI.scoreboard_window.set_scoreboard_shown_network(true, allow_close, allow_new_match) + GameUI.instance.scoreboard_window.set_scoreboard_shown_network(true, allow_close, allow_new_match) return OK diff --git a/mirror-godot-app/script/visual/blocks/misc/print_chat.gd b/mirror-godot-app/script/visual/blocks/misc/print_chat.gd index 77cde9d2..4675766c 100644 --- a/mirror-godot-app/script/visual/blocks/misc/print_chat.gd +++ b/mirror-godot-app/script/visual/blocks/misc/print_chat.gd @@ -14,7 +14,7 @@ func _execute_callback(_stack_count: int) -> Error: var range_radius: float = inputs[1].value if range_radius <= 0.0: range_radius = INF - GameUI.chat_ui.send_message_from_object(attached_object, message, range_radius) + GameUI.instance.chat_ui.send_message_from_object(attached_object, message, range_radius) return OK diff --git a/mirror-godot-app/script/visual/editor/gdscript_code_editor.gd b/mirror-godot-app/script/visual/editor/gdscript_code_editor.gd index 427a2c01..8854d948 100644 --- a/mirror-godot-app/script/visual/editor/gdscript_code_editor.gd +++ b/mirror-godot-app/script/visual/editor/gdscript_code_editor.gd @@ -14,9 +14,9 @@ func _ready() -> void: func _on_visibility_changed() -> void: if self.visible: - GameUI.add_visible_window(self) + GameUI.instance.add_visible_window(self) else: - GameUI.remove_visible_window(self) + GameUI.instance.remove_visible_window(self) func _process(delta: float) -> void: @@ -53,8 +53,8 @@ func _on_code_edit_text_changed(): func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/script/visual/editor/graph/script_block_graph_node.gd b/mirror-godot-app/script/visual/editor/graph/script_block_graph_node.gd index 07db43fb..5ff56ac4 100644 --- a/mirror-godot-app/script/visual/editor/graph/script_block_graph_node.gd +++ b/mirror-godot-app/script/visual/editor/graph/script_block_graph_node.gd @@ -355,8 +355,8 @@ func _get_color_of_type(port_type: int) -> Color: func _on_hoverable_script_block_mouse_entered() -> void: - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_script_block_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/script/visual/editor/graph/script_block_graph_slot.gd b/mirror-godot-app/script/visual/editor/graph/script_block_graph_slot.gd index e5d4c39b..7adabaa2 100644 --- a/mirror-godot-app/script/visual/editor/graph/script_block_graph_slot.gd +++ b/mirror-godot-app/script/visual/editor/graph/script_block_graph_slot.gd @@ -119,12 +119,12 @@ func _get_port_type_icon(port_type: ScriptBlock.PortType) -> Texture2D: func _on_left_value_mouse_entered() -> void: - GameUI.set_hover_tooltip_text("Click here to edit the " + _left_label.text + " input.") + GameUI.instance.set_hover_tooltip_text("Click here to edit the " + _left_label.text + " input.") func _on_left_sequence_run_icon_mouse_entered() -> void: - GameUI.set_hover_tooltip_text("Click here to run this block. This is useful for testing pieces of your script.") + GameUI.instance.set_hover_tooltip_text("Click here to run this block. This is useful for testing pieces of your script.") func _on_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/script/visual/editor/graph/script_block_input_enum_menu.gd b/mirror-godot-app/script/visual/editor/graph/script_block_input_enum_menu.gd index 21fe59ee..4ae7144f 100644 --- a/mirror-godot-app/script/visual/editor/graph/script_block_input_enum_menu.gd +++ b/mirror-godot-app/script/visual/editor/graph/script_block_input_enum_menu.gd @@ -19,7 +19,7 @@ func edit_input_value(graph_node: ScriptBlockGraphNode, input_port: ScriptBlock. for value in enum_values: add_filter_menu_item(value, value) show_menu_at_mouse_position() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func show_menu_at_mouse_position() -> void: @@ -48,7 +48,7 @@ func _fit_rect_in_size(child_rect: Rect2, parent_size: Vector2) -> Vector2: func _on_enum_value_selected(title: String, _metadata: Variant) -> void: hide() - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) if not is_instance_valid(_edited_input_port): return _edited_input_port.value = title diff --git a/mirror-godot-app/script/visual/editor/script_comment_color_picker_popup.gd b/mirror-godot-app/script/visual/editor/script_comment_color_picker_popup.gd index 9e194ce2..aa416929 100644 --- a/mirror-godot-app/script/visual/editor/script_comment_color_picker_popup.gd +++ b/mirror-godot-app/script/visual/editor/script_comment_color_picker_popup.gd @@ -2,8 +2,8 @@ extends PopupPanel func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/script/visual/visual_script_instance.gd b/mirror-godot-app/script/visual/visual_script_instance.gd index 09c4cac7..e436d0dd 100644 --- a/mirror-godot-app/script/visual/visual_script_instance.gd +++ b/mirror-godot-app/script/visual/visual_script_instance.gd @@ -179,10 +179,10 @@ func _on_block_message(script_block: ScriptBlock, title: String, message: String func _load_self_in_script_editor(script_block: ScriptBlock = null, error_text: String = "") -> void: - # It's unfortunate for ScriptEvent to depend on GameUI, but there isn't + # It's unfortunate for ScriptEvent to depend on GameUI.instance, but there isn't # really a better way. At least we will check if it exists first. - if GameUI.creator_ui: - GameUI.creator_ui.open_visual_script_editor(self, script_block, error_text) + if GameUI.instance.creator_ui: + GameUI.instance.creator_ui.open_visual_script_editor(self, script_block, error_text) func serialize_script_entity_data() -> Dictionary: diff --git a/mirror-godot-app/scripts/assets/asset_data.gd b/mirror-godot-app/scripts/assets/asset_data.gd index 8202aba1..f7ab0c48 100644 --- a/mirror-godot-app/scripts/assets/asset_data.gd +++ b/mirror-godot-app/scripts/assets/asset_data.gd @@ -135,7 +135,7 @@ func _generate_mesh_preview(node: Node, path: String) -> void: # duplicate node so it is not freed from memory after preview is generated. _preview_node = node.duplicate() _asset_preview = _ASSET_PREVIEW_TSCN.instantiate() - GameUI.add_child(_asset_preview) + GameUI.instance.add_child(_asset_preview) # set an offset so it is not on screen. _asset_preview.position.x = -1000 _asset_preview.position.y = -1000 @@ -171,7 +171,7 @@ func _free_previews() -> void: _preview_node.queue_free() _preview_node = null if is_instance_valid(_asset_preview): - GameUI.remove_child(_asset_preview) + GameUI.instance.remove_child(_asset_preview) _asset_preview.queue_free() _asset_preview = null diff --git a/mirror-godot-app/scripts/assets/asset_data_map.gd b/mirror-godot-app/scripts/assets/asset_data_map.gd index 58160d2c..7d8bbdcc 100644 --- a/mirror-godot-app/scripts/assets/asset_data_map.gd +++ b/mirror-godot-app/scripts/assets/asset_data_map.gd @@ -46,7 +46,7 @@ func _generate_mesh_preview(node: Node, path: String) -> void: # duplicate node so it is not freed from memory after preview is generated. _preview_node = node _asset_preview = _ASSET_PREVIEW_TSCN.instantiate() - GameUI.add_child(_asset_preview) + GameUI.instance.add_child(_asset_preview) # set an offset so it is not on screen. diff --git a/mirror-godot-app/scripts/autoload/analytics/app_state.gd b/mirror-godot-app/scripts/autoload/analytics/app_state.gd index b96d75c8..3270b402 100644 --- a/mirror-godot-app/scripts/autoload/analytics/app_state.gd +++ b/mirror-godot-app/scripts/autoload/analytics/app_state.gd @@ -17,13 +17,14 @@ var _current_app_mode: Dictionary = { mode = "MENU", sub_mode = "LOGIN" }: func _ready() -> void: + await GameUI.ui_ready() Zone.client.join_server_start.connect(_on_joining_server) Zone.client.join_server_complete.connect(_on_server_joined) Zone.mode_changed.connect(_on_zone_mode_changed) - if GameUI.main_menu_ui: - GameUI.main_menu_ui.visibility_changed.connect(_on_main_menu_ui_visibility_changed) - GameUI.main_menu_ui.page_changed.connect(main_menu_ui_analytics_update_current_page) - GameUI.login_ui.visibility_changed.connect(_on_login_ui_visibility_changed) + if GameUI.instance.main_menu_ui: + GameUI.instance.main_menu_ui.visibility_changed.connect(_on_main_menu_ui_visibility_changed) + GameUI.instance.main_menu_ui.page_changed.connect(main_menu_ui_analytics_update_current_page) + GameUI.instance.login_ui.visibility_changed.connect(_on_login_ui_visibility_changed) @@ -61,7 +62,7 @@ func join_server_stop() -> void: main_menu_ui_analytics_update_current_page() -func main_menu_ui_analytics_update_current_page(page_name: String = GameUI.main_menu_ui._current_page.name) -> void: +func main_menu_ui_analytics_update_current_page(page_name: String = GameUI.instance.main_menu_ui._current_page.name) -> void: set_app_mode("MENU", page_name.to_upper()) @@ -80,16 +81,16 @@ func _on_zone_mode_changed(new_mode: ZoneClass.ZONE_MODE) -> void: # 1. It correctly says that we are in the main menu always, # not only when we automatically change page to Home # 2. When we close it, it correctly puts us back in the correct SPACE_* AppMode -# TODO MAYBE: listen on a signal on GameUI for when it switches which UI is on top/visible -# Something like : GameUI.main_ui_changed ====> "LOGIN", "MAIN_MENU", etc +# TODO MAYBE: listen on a signal on GameUI.instance for when it switches which UI is on top/visible +# Something like : GameUI.instance.main_ui_changed ====> "LOGIN", "MAIN_MENU", etc func _on_main_menu_ui_visibility_changed() -> void: - if GameUI.main_menu_ui.visible: + if GameUI.instance.main_menu_ui.visible: main_menu_ui_analytics_update_current_page() # If in a space: TODO, find a better check than UI visibility of player label container. - elif GameUI.chat_ui.visible: + elif GameUI.instance.chat_ui.visible: change_app_mode_to_space_mode(Zone.current_mode) func _on_login_ui_visibility_changed() -> void: - if GameUI.login_ui.visible: + if GameUI.instance.login_ui.visible: set_app_mode("MENU", "LOGIN") diff --git a/mirror-godot-app/scripts/autoload/bootup.gd b/mirror-godot-app/scripts/autoload/bootup.gd index 5387952c..1ce3c737 100644 --- a/mirror-godot-app/scripts/autoload/bootup.gd +++ b/mirror-godot-app/scripts/autoload/bootup.gd @@ -5,14 +5,18 @@ extends Node static var popups = [] +func _init(): + GameUI._root_node = get_node("/root/") + func _start_client(): DisplayServer.window_set_title(ProjectSettings.get_setting("application/config/window_name", "The Mirror")) Cursors.setup() if ProjectSettings.get_setting("feature_flags/disable_login", false): LoginService.setup_deeplink_login(get_tree()) else: - GameUI.login_ui.start_login_ui() - GameUI.login_ui.show() + await GameUI.ui_ready() + GameUI.instance.login_ui.start_login_ui() + GameUI.instance.login_ui.show() Deeplinking.setup() await Zone.wait_till_notifications_ready() await Zone.wait_till_deeplink_ready() diff --git a/mirror-godot-app/scripts/autoload/deeplinking.gd b/mirror-godot-app/scripts/autoload/deeplinking.gd index 65ef9847..5a879f99 100644 --- a/mirror-godot-app/scripts/autoload/deeplinking.gd +++ b/mirror-godot-app/scripts/autoload/deeplinking.gd @@ -39,7 +39,7 @@ func _process(_delta: float) -> void: var args: Array = url_data.args if not Net.is_logged_in() and command != _JOIN_AUTHED_SPACE_CMD: Notify.warning("Sign In", "You must sign in to use the link provided, once you sign in I will open the link.") - GameUI.login_ui.login_succeeded.connect(func(): _handle_deeplink_url(url), CONNECT_ONE_SHOT) + GameUI.instance.login_ui.login_succeeded.connect(func(): _handle_deeplink_url(url), CONNECT_ONE_SHOT) print("Processing login...") else: print("Processing deeplink: ", url) diff --git a/mirror-godot-app/scripts/autoload/login.gd b/mirror-godot-app/scripts/autoload/login.gd index b56053bc..eef4292f 100644 --- a/mirror-godot-app/scripts/autoload/login.gd +++ b/mirror-godot-app/scripts/autoload/login.gd @@ -30,13 +30,13 @@ static func get_latest_mirror_profile_or_create_it() -> Dictionary: static func wait_till_login(scene_tree: SceneTree): # it is possible you use the code in this UI in a place where it may not be fully loaded # we ensure we have all the autoloads, and instances configured - if not Firebase or not Firebase.Auth or not GameUI.login_ui: + if not Firebase or not Firebase.Auth or not GameUI.instance.login_ui: await scene_tree.process_frame # now we check are we fully logged into the app if Net.is_fully_logged_in() and Firebase.Auth.is_logged_in(): return # we wait until this is the case since we weren't logged in - await GameUI.login_ui.login_succeeded + await GameUI.instance.login_ui.login_succeeded static func login_as_user_deeplink( diff --git a/mirror-godot-app/scripts/autoload/vr_manager.gd b/mirror-godot-app/scripts/autoload/vr_manager.gd index e7004114..51f073cd 100644 --- a/mirror-godot-app/scripts/autoload/vr_manager.gd +++ b/mirror-godot-app/scripts/autoload/vr_manager.gd @@ -8,16 +8,23 @@ signal vr_ended var vr_interface: XRInterface var vr_is_active: bool = false +# we can't have static signals so we must declare them here for the GameUI which is now static +signal vr_decision_made func _ready() -> void: vr_interface = XRServer.find_interface('OpenXR') + var vr_initialised = true if not vr_interface: - return + print_verbose("VR Is not being used or active") + vr_initialised = false if not vr_interface.is_initialized(): print("OpenXR: Initializing interface") if not vr_interface.initialize(): print("OpenXR: Failed to initialize") - return + vr_initialised = false + GameUI.setup_game_ui(get_parent(), vr_initialised) + if not vr_initialised: + return vr_interface.connect("session_focussed", _on_vr_enter) vr_interface.connect("session_visible", _on_vr_exit) DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED) diff --git a/mirror-godot-app/scripts/autoload/zone/client.gd b/mirror-godot-app/scripts/autoload/zone/client.gd index aa251009..0131d268 100644 --- a/mirror-godot-app/scripts/autoload/zone/client.gd +++ b/mirror-godot-app/scripts/autoload/zone/client.gd @@ -166,7 +166,7 @@ func _client_on_connected_to_server() -> void: Analytics.track_event_client(AnalyticsEvent.TYPE.SPACE_JOIN_ATTEMPT_SUCCESS, {"spaceId": _queued_space_id}) Zone.change_to_space_scene() # TODO: Instead of true, determine if the player has creator permissions for the space. - GameUI.on_enter_space(true) + GameUI.instance.on_enter_space(true) var client = Node.new() client.set_name("Client " + str(multiplayer.get_unique_id())) @@ -231,7 +231,7 @@ func access_denied(in_reason: int) -> void: return _disconnect_from_server() Zone.on_exit_space() - GameUI.loading_ui.hide() + GameUI.instance.loading_ui.hide() quit_to_main_menu() if in_reason == Zone.DENIED_REASON.CLIENT_VERSION_MISMATCH: Game.critical_error(JOINER_ERRORS.ACCESS_DENIED, "Server/Client Version Mismatch. Update your game using the itch.io launcher, or reinstall the app from itch.io") @@ -298,16 +298,16 @@ func _client_on_server_disconnected() -> void: func quit_to_main_menu() -> void: last_connection_address = "" last_connection_port = -1 - GameUI.loading_ui.hide() - GameUI.main_menu_ui.show() + GameUI.instance.loading_ui.hide() + GameUI.instance.main_menu_ui.show() _quit_space() ## call this when you need to show the loading screen and are already connecting func _quit_to_loading_screen() -> void: - GameUI.loading_ui.show() - if is_instance_valid(GameUI.main_menu_ui): - GameUI.main_menu_ui.hide() + GameUI.instance.loading_ui.show() + if is_instance_valid(GameUI.instance.main_menu_ui): + GameUI.instance.main_menu_ui.hide() _quit_space() diff --git a/mirror-godot-app/scripts/autoload/zone/match_round_system.gd b/mirror-godot-app/scripts/autoload/zone/match_round_system.gd index 6416a6c2..c8ce397f 100644 --- a/mirror-godot-app/scripts/autoload/zone/match_round_system.gd +++ b/mirror-godot-app/scripts/autoload/zone/match_round_system.gd @@ -63,11 +63,11 @@ func end_match(winning_team_name: String) -> void: if not _is_match_running: Zone.script_network_sync.server_script_print_notify("Match Not Running", "Tried to end the match, but no match was running.", Enums.NotifyStatus.WARNING) return - if GameUI and GameUI.scoreboard_window: + if GameUI.instance and GameUI.instance.scoreboard_window: # This is naive but it works for now. var win_plurality: String = " win!" if winning_team_name.ends_with("s") else " wins!" - GameUI.scoreboard_window.set_scoreboard_title_text(winning_team_name + win_plurality) - GameUI.scoreboard_window.set_scoreboard_shown(true, false, true) + GameUI.instance.scoreboard_window.set_scoreboard_title_text(winning_team_name + win_plurality) + GameUI.instance.scoreboard_window.set_scoreboard_shown(true, false, true) var all_players: Array = Zone.social_manager.get_all_players() for player in all_players: player.set_player_input_allowed(false) @@ -78,8 +78,8 @@ func end_match(winning_team_name: String) -> void: func terminate_match() -> void: _is_match_running = false _is_round_running = false - GameUI.scoreboard_window.set_scoreboard_title_text("Scoreboard") - GameUI.scoreboard_window.set_scoreboard_shown(false, false, false) + GameUI.instance.scoreboard_window.set_scoreboard_title_text("Scoreboard") + GameUI.instance.scoreboard_window.set_scoreboard_shown(false, false, false) var all_players: Array = Zone.social_manager.get_all_players() for player in all_players: player.set_player_input_allowed(true) diff --git a/mirror-godot-app/scripts/autoload/zone/zone.gd b/mirror-godot-app/scripts/autoload/zone/zone.gd index 643e8336..f608720e 100644 --- a/mirror-godot-app/scripts/autoload/zone/zone.gd +++ b/mirror-godot-app/scripts/autoload/zone/zone.gd @@ -266,7 +266,7 @@ func on_exit_space() -> void: social_manager.clear_children() instance_manager.clear_children() change_to_empty_scene() - GameUI.on_exit_space() + GameUI.instance.on_exit_space() print("exit space game ui ran") diff --git a/mirror-godot-app/scripts/game_mode/game_mode.gd b/mirror-godot-app/scripts/game_mode/game_mode.gd index 8915da7e..c1b60589 100644 --- a/mirror-godot-app/scripts/game_mode/game_mode.gd +++ b/mirror-godot-app/scripts/game_mode/game_mode.gd @@ -25,7 +25,7 @@ func _unhandled_input(input_event) -> void: return if input_event.is_pressed(): var should_toggle_build_tools = ( - not GameUI.is_keyboard_needed_for_ui() + not GameUI.instance.is_keyboard_needed_for_ui() and input_event.is_action(&"build_mode_toggle") ) if _current_game_mode == Mode.NORMAL: diff --git a/mirror-godot-app/scripts/space/instance_manager.gd b/mirror-godot-app/scripts/space/instance_manager.gd index 9365c49f..2f9a2a9f 100644 --- a/mirror-godot-app/scripts/space/instance_manager.gd +++ b/mirror-godot-app/scripts/space/instance_manager.gd @@ -299,7 +299,7 @@ func create_space_object(space_object_dictionary: Dictionary, receipt: Dictionar if created_by_local_user: var auto_select: bool = receipt.get("auto_select", false) if auto_select: - GameUI.creator_ui.select_object(instance) + GameUI.instance.creator_ui.select_object(instance) # This function is called by the client to load the space objects diff --git a/mirror-godot-app/scripts/ui/teams_window_container.gd b/mirror-godot-app/scripts/ui/teams_window_container.gd index dae7ef01..fc79d984 100644 --- a/mirror-godot-app/scripts/ui/teams_window_container.gd +++ b/mirror-godot-app/scripts/ui/teams_window_container.gd @@ -24,7 +24,7 @@ func _process(_delta) -> void: if not Zone.client or not Zone.client or not Zone.client.is_client_connected_to_server(): return if Input.is_action_just_pressed(&"team_menu_toggle"): - if GameUI.is_any_full_screen_or_modal_ui_visible([self]): + if GameUI.instance.is_any_full_screen_or_modal_ui_visible([self]): return if get_viewport().gui_get_focus_owner() != null: return diff --git a/mirror-godot-app/test/manual/gizmo/test_gizmo.gd b/mirror-godot-app/test/manual/gizmo/test_gizmo.gd index e54fc047..812e4211 100644 --- a/mirror-godot-app/test/manual/gizmo/test_gizmo.gd +++ b/mirror-godot-app/test/manual/gizmo/test_gizmo.gd @@ -7,10 +7,10 @@ extends Node func _enter_tree(): # TODO: Instead of just deleting this when running the test scene, - # we should make GameUI only instanced when needed on clients. + # we should make GameUI.instance only instanced when needed on clients. # TODO: Also, if this was free instead of queue_free, ToolManager # would currently break, we should make it a child of CreatorUI. - GameUI.queue_free() + GameUI.instance.queue_free() func _ready(): diff --git a/mirror-godot-app/test/manual/inspector/test_inspector.gd b/mirror-godot-app/test/manual/inspector/test_inspector.gd index 8189dfff..dcc0bb0e 100644 --- a/mirror-godot-app/test/manual/inspector/test_inspector.gd +++ b/mirror-godot-app/test/manual/inspector/test_inspector.gd @@ -8,10 +8,10 @@ var _selected_nodes: Array[Node] func _enter_tree(): # TODO: Instead of just deleting this when running the test scene, - # we should make GameUI only instanced when needed on clients. + # we should make GameUI.instance only instanced when needed on clients. # TODO: Also, if this was free instead of queue_free, ToolManager # would currently break, we should make it a child of CreatorUI. - GameUI.queue_free() + GameUI.instance.queue_free() func _ready(): diff --git a/mirror-godot-app/test/unit/test_autoloads.gd b/mirror-godot-app/test/unit/test_autoloads.gd index 1fbbe907..b93a7721 100644 --- a/mirror-godot-app/test/unit/test_autoloads.gd +++ b/mirror-godot-app/test/unit/test_autoloads.gd @@ -16,17 +16,17 @@ func test_autoload_references(): assert_not_null(Zone.social_manager) assert_not_null(Zone.instance_manager) - assert_not_null(GameUI) - assert_not_null(GameUI.creator_ui) - assert_not_null(GameUI.loading_ui) - assert_not_null(GameUI.main_menu_ui) - assert_not_null(GameUI.login_ui) - assert_not_null(GameUI.notifications_ui) + assert_not_null(GameUI.instance) + assert_not_null(GameUI.instance.creator_ui) + assert_not_null(GameUI.instance.loading_ui) + assert_not_null(GameUI.instance.main_menu_ui) + assert_not_null(GameUI.instance.login_ui) + assert_not_null(GameUI.instance.notifications_ui) ## ensures that the loading ui is in front of any of the other pertinent ui func test_loading_ui_order(): - var loading_ui_index = GameUI.loading_ui.get_index() - assert_true(loading_ui_index > GameUI.main_menu_ui.get_index()) - assert_true(loading_ui_index > GameUI.login_ui.get_index()) - assert_true(loading_ui_index > GameUI.creator_ui.get_index()) + var loading_ui_index = GameUI.instance.loading_ui.get_index() + assert_true(loading_ui_index > GameUI.instance.main_menu_ui.get_index()) + assert_true(loading_ui_index > GameUI.instance.login_ui.get_index()) + assert_true(loading_ui_index > GameUI.instance.creator_ui.get_index()) diff --git a/mirror-godot-app/test/unit/test_space_object_visibility.gd b/mirror-godot-app/test/unit/test_space_object_visibility.gd index d633f7ef..672d3fc4 100644 --- a/mirror-godot-app/test/unit/test_space_object_visibility.gd +++ b/mirror-godot-app/test/unit/test_space_object_visibility.gd @@ -83,7 +83,7 @@ func test_shift_d_duplicated_space_object(): return # TODO: fix engine crashes with double Zone.client = double(_CLIENT).new() stub(Zone.client, 'client_send_create_space_object').to_do_nothing() - var selection_helper = GameUI.creator_ui.selection_helper + var selection_helper = GameUI.instance.creator_ui.selection_helper var stubbed_so = _setup_space_object(_SPACE_OBJECT_DATA) selection_helper.select_nodes([stubbed_so]) @@ -113,7 +113,7 @@ func test_copy_space_object(): return # TODO: fix engine crashes with double Zone.client = double(_CLIENT).new() stub(Zone.client, 'client_send_create_space_object').to_do_nothing() - var selection_helper = GameUI.creator_ui.selection_helper + var selection_helper = GameUI.instance.creator_ui.selection_helper var stubbed_so = _setup_space_object(_SPACE_OBJECT_DATA) selection_helper.select_nodes([stubbed_so]) diff --git a/mirror-godot-app/ui/chat/chat_ui.gd b/mirror-godot-app/ui/chat/chat_ui.gd index c77df5e2..b9e15712 100644 --- a/mirror-godot-app/ui/chat/chat_ui.gd +++ b/mirror-godot-app/ui/chat/chat_ui.gd @@ -60,10 +60,10 @@ func _ready() -> void: func _process(delta: float) -> void: _time_since_last_opened += delta - var safe_area_for_gui: Rect2 = GameUI.get_safe_area() + var safe_area_for_gui: Rect2 = GameUI.instance.get_safe_area() var new_position: Vector2 = _initial_position + safe_area_for_gui.position _chat_box.position = new_position - if Input.is_action_just_pressed("player_open_chat", true) and not GameUI.is_any_full_screen_or_modal_ui_visible([self]) and get_viewport().gui_get_focus_owner() == null: + if Input.is_action_just_pressed("player_open_chat", true) and not GameUI.instance.is_any_full_screen_or_modal_ui_visible([self]) and get_viewport().gui_get_focus_owner() == null: _line_edit.grab_focus() if not is_typing_in_chat and _time_since_last_opened > _fade_delay: var visibility_loss_speed = delta * 0.5 @@ -171,7 +171,7 @@ func _handle_player_event_client(message: String) -> void: func _on_line_edit_focus_entered() -> void: is_typing_in_chat = true _reset_chat_transparency() - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_line_edit_focus_exited() -> void: @@ -179,7 +179,7 @@ func _on_line_edit_focus_exited() -> void: _reset_chat_transparency() _scroll_to_bottom() _emoji_menu.hide() - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) func _on_line_edit_text_submitted(text: String) -> void: diff --git a/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_confirmation_dialog.gd b/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_confirmation_dialog.gd index 901b56e3..bc7e7750 100644 --- a/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_confirmation_dialog.gd +++ b/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_confirmation_dialog.gd @@ -3,9 +3,9 @@ extends ConfirmationDialog func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: if not get_parent().get_viewport() is AcceptDialog: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_line_edit.gd b/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_line_edit.gd index a8131821..f581468c 100644 --- a/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_line_edit.gd +++ b/mirror-godot-app/ui/common/keyboard_grabbing/keyboard_grabbing_line_edit.gd @@ -3,9 +3,9 @@ extends LineEdit func _on_focus_entered() -> void: - GameUI.grab_input_lock(self) + GameUI.instance.grab_input_lock(self) func _on_focus_exited() -> void: if not get_viewport() is AcceptDialog: - GameUI.release_input_lock(self) + GameUI.instance.release_input_lock(self) diff --git a/mirror-godot-app/ui/game/GameUIStatic.gd b/mirror-godot-app/ui/game/GameUIStatic.gd new file mode 100644 index 00000000..fae2c760 --- /dev/null +++ b/mirror-godot-app/ui/game/GameUIStatic.gd @@ -0,0 +1,11 @@ +extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/mirror-godot-app/ui/game/crosshair/crosshair.gd b/mirror-godot-app/ui/game/crosshair/crosshair.gd index 8d7b61e0..e8dd0083 100644 --- a/mirror-godot-app/ui/game/crosshair/crosshair.gd +++ b/mirror-godot-app/ui/game/crosshair/crosshair.gd @@ -27,7 +27,7 @@ func _process(delta: float) -> void: if equipable and equipable.has_method("get_bullet_spread"): var crosshair_size: float = rad_to_deg(equipable.get_bullet_spread()) * _spread_multiplier crosshair_size = clampf(crosshair_size, _minimum_size, _maximum_size) - GameUI.crosshair.custom_minimum_size = lerp(GameUI.crosshair.custom_minimum_size, Vector2.ONE * crosshair_size, delta * _lerp_speed) + GameUI.instance.crosshair.custom_minimum_size = lerp(GameUI.instance.crosshair.custom_minimum_size, Vector2.ONE * crosshair_size, delta * _lerp_speed) _update_crosshair_colors() diff --git a/mirror-godot-app/ui/game/game_ui.tscn b/mirror-godot-app/ui/game/game_ui.tscn index bf1f197e..18749564 100644 --- a/mirror-godot-app/ui/game/game_ui.tscn +++ b/mirror-godot-app/ui/game/game_ui.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=28 format=3 uid="uid://bpn5kipaabot1"] -[ext_resource type="Script" path="res://ui/game/game_ui.gd" id="1_2ryxh"] +[ext_resource type="Script" path="res://ui/game/game_ui_instance.gd" id="1_2ryxh"] [ext_resource type="PackedScene" uid="uid://pdt3sfnghnqp" path="res://ui/login/login_ui.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://vep713eampf5" path="res://creator/drag_input/drag_detector.tscn" id="2_455td"] [ext_resource type="PackedScene" uid="uid://bompdcbpjbtli" path="res://ui/chat/chat_ui.tscn" id="2_a0jw6"] diff --git a/mirror-godot-app/ui/game/game_ui.gd b/mirror-godot-app/ui/game/game_ui_instance.gd similarity index 98% rename from mirror-godot-app/ui/game/game_ui.gd rename to mirror-godot-app/ui/game/game_ui_instance.gd index 5d4a449c..a464341a 100644 --- a/mirror-godot-app/ui/game/game_ui.gd +++ b/mirror-godot-app/ui/game/game_ui_instance.gd @@ -29,12 +29,18 @@ var should_display_space_listings = ProjectSettings.get_setting("feature_flags/e var visible_windows: Dictionary = {} +var _is_configured = false + +func get_ready(): + return _is_configured + func _ready() -> void: assert(teams_handler) main_menu_ui.setup(self) creator_ui.setup(drag_detector) hotbar.setup(creator_ui) cinematic_mode.setup(self) + _is_configured = true func _process(_delta) -> void: diff --git a/mirror-godot-app/ui/game/game_ui_static.gd b/mirror-godot-app/ui/game/game_ui_static.gd new file mode 100644 index 00000000..8380ba77 --- /dev/null +++ b/mirror-godot-app/ui/game/game_ui_static.gd @@ -0,0 +1,84 @@ +extends Node +class_name GameUI + +## Why does this class exist? Well you may have guessed that we have VR support. +## We need UI in the VR instance of the game. +## In VR we require the Node Layout to be: +## - SubViewport -> GameUI.instance +## In non VR mode we require the Node Layout to be: +## - GameUI.instance +## To clarify in short, this code sucks because it fixes an arch issue and bypasses it. + +## We don't always want every bit of UI in a Sub Viewport or all the VR nodes applied to the game when VR isn't needing to be active. +## So this file will dynamically allow you to configure under ANY node type so this allows VR/AR implementation to be clean +## While also allowing us to completely turn it off in the menu should we desire this. + +static var _readonly_singleton_instance = preload("res://ui/game/game_ui.tscn") +static var _readonly_vr_menu = preload("res://player/vr/vr_controller_menu.tscn") +static var _internal_instance = null # this is the actual data +static var _root_node = null +static var _vr_decided = false +static var _sub_viewport: SubViewport = null +static var instance: + get: + await ui_ready() + assert(_internal_instance != null) + assert(_internal_instance.get_parent() != null) + return _internal_instance + set(v): + push_error("You can't re-assign the Game UI singleton.") + + +static func get_sub_viewport() -> SubViewport: + await ui_ready() + return _sub_viewport + + +static func ui_ready() -> void: + print("Entering UI Ready") + while _internal_instance == null or _internal_instance.get_parent() == null or _root_node == null or not _internal_instance.get_ready(): + await _root_node.get_tree().create_timer(1).timeout + print("Waiting for correct UI settings") + if not _vr_decided: + await VRManager.vr_decision_made + print("VR Decided") + print("UI Ready Completed") + +## Called when booting the app when we know if the app is VR or non-VR +static func setup_game_ui(root_node: Node, is_vr: bool): + _root_node = root_node + if _internal_instance == null: + ## Again if you didn't read the comments further up, we need a SubViewport + ## We don't need it in non VR Mode. + ## If you need a 3D viewport use Zone.get_viewport() as I updated all code to do this + ## Read here on why we're doing this: https://docs.godotengine.org/en/latest/tutorials/xr/openxr_composition_layers.html#setting-up-the-subviewport + if is_vr: + ## Add the VR Dependencies for the app start. + var vr_player_for_menu: VRControllerMenu = _readonly_vr_menu.instantiate() + #root_node.add_child.call_deferred(vr_player_for_menu) + #_internal_instance = vr_player_for_menu.get_vr_game_ui() + #Zone.get_viewport().use_xr = true + + + ## Add the player controller for the menu + root_node.add_child.call_deferred(vr_player_for_menu) + ## Add the subviewport for the VR Headset's UI + _sub_viewport = SubViewport.new() + _sub_viewport.size = Vector2i(1650, 1080) + _sub_viewport.render_target_update_mode = SubViewport.UPDATE_ALWAYS + _sub_viewport.disable_3d = true + _sub_viewport.transparent_bg = true + # _sub_viewport.use_xr = true + Zone.get_viewport().use_xr = true + _sub_viewport.set_name("VRSubViewport") + _sub_viewport.add_child.call_deferred(_internal_instance) + root_node.add_child.call_deferred(_sub_viewport) + else: + # read the node, and add it to the root of the game + _internal_instance = _readonly_singleton_instance.instantiate() + root_node.add_child.call_deferred(_internal_instance) + while _internal_instance.get_parent() == null: + await root_node.get_tree().create_timer(0.1).timeout + VRManager.vr_decision_made.emit() + _vr_decided = true + print("CONFIGURED GAME UI") diff --git a/mirror-godot-app/ui/game/health/health_display.gd b/mirror-godot-app/ui/game/health/health_display.gd index 0404819d..0d2755ec 100644 --- a/mirror-godot-app/ui/game/health/health_display.gd +++ b/mirror-godot-app/ui/game/health/health_display.gd @@ -71,8 +71,8 @@ func update_visibility_by_space_var( func _space_var_updated(variable_name: String, variable_value: Variant) -> void: if variable_name in [player_damage_is_enabled]: var str_enableness = update_visibility_by_space_var(variable_value) - if GameUI and GameUI.chat_ui: - GameUI.chat_ui.add_message_clientside("Player damage is now [i]%s[/i] on this space" % str_enableness) + if GameUI.instance and GameUI.instance.chat_ui: + GameUI.instance.chat_ui.add_message_clientside("Player damage is now [i]%s[/i] on this space" % str_enableness) func try_hide() -> void: @@ -87,5 +87,5 @@ func try_show() -> void: if not are_variables_ready: await Zone.script_network_sync.variables_ready var str_enableness = self.update_visibility_by_space_var() - if GameUI and GameUI.chat_ui: - GameUI.chat_ui.add_message_clientside("Player damage is [i]%s[/i] on this space" % str_enableness) + if GameUI.instance and GameUI.instance.chat_ui: + GameUI.instance.chat_ui.add_message_clientside("Player damage is [i]%s[/i] on this space" % str_enableness) diff --git a/mirror-godot-app/ui/game/loading_ui.gd b/mirror-godot-app/ui/game/loading_ui.gd index bf05a91a..87690781 100644 --- a/mirror-godot-app/ui/game/loading_ui.gd +++ b/mirror-godot-app/ui/game/loading_ui.gd @@ -36,8 +36,8 @@ func set_loading_image(image: Texture2D) -> void: func _on_join_server_start() -> void: _progress_animation.play("Loading") - if GameUI.main_menu_ui: - GameUI.main_menu_ui.hide() + if GameUI.instance.main_menu_ui: + GameUI.instance.main_menu_ui.hide() show() func _on_join_server_complete() -> void: @@ -55,5 +55,5 @@ func _on_join_server_status_changed(text: String) -> void: func _on_cancel_button_pressed() -> void: Zone.client.cancel_join_request() - GameUI.main_menu_ui.show() + GameUI.instance.main_menu_ui.show() hide() diff --git a/mirror-godot-app/ui/hover_text/scripts/hoverable_button.gd b/mirror-godot-app/ui/hover_text/scripts/hoverable_button.gd index 23e511b9..8c02a74e 100644 --- a/mirror-godot-app/ui/hover_text/scripts/hoverable_button.gd +++ b/mirror-godot-app/ui/hover_text/scripts/hoverable_button.gd @@ -10,12 +10,12 @@ extends Button func _on_hoverable_button_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_button_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() func _on_hoverable_button_pressed() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/ui/hover_text/scripts/hoverable_checkbox.gd b/mirror-godot-app/ui/hover_text/scripts/hoverable_checkbox.gd index b95bbd1d..8218b11c 100644 --- a/mirror-godot-app/ui/hover_text/scripts/hoverable_checkbox.gd +++ b/mirror-godot-app/ui/hover_text/scripts/hoverable_checkbox.gd @@ -10,8 +10,8 @@ extends CheckBox func _on_hoverable_checkbox_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_checkbox_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/ui/hover_text/scripts/hoverable_label.gd b/mirror-godot-app/ui/hover_text/scripts/hoverable_label.gd index 0db32bd9..0cd93272 100644 --- a/mirror-godot-app/ui/hover_text/scripts/hoverable_label.gd +++ b/mirror-godot-app/ui/hover_text/scripts/hoverable_label.gd @@ -10,8 +10,8 @@ extends Label func _on_hoverable_label_mouse_entered() -> void: if hover_tooltip_text == "": return - GameUI.set_hover_tooltip_text(hover_tooltip_text) + GameUI.instance.set_hover_tooltip_text(hover_tooltip_text) func _on_hoverable_label_mouse_exited() -> void: - GameUI.hide_hover_tooltip_text() + GameUI.instance.hide_hover_tooltip_text() diff --git a/mirror-godot-app/ui/login/login_ui.gd b/mirror-godot-app/ui/login/login_ui.gd index fc7a2b6e..bffaa1bc 100644 --- a/mirror-godot-app/ui/login/login_ui.gd +++ b/mirror-godot-app/ui/login/login_ui.gd @@ -114,13 +114,13 @@ func _guest_signup_succeeded(acc: Dictionary) -> void: static func wait_till_login(scene_tree: SceneTree): # it is possible you use the code in this UI in a place where it may not be fully loaded # we ensure we have all the autoloads, and instances configured - if not Firebase or not Firebase.Auth or not GameUI.login_ui: + if not Firebase or not Firebase.Auth or not GameUI.instance.login_ui: await scene_tree.process_frame # now we check are we fully logged into the app if Net.is_fully_logged_in() and Firebase.Auth.is_logged_in(): return # we wait until this is the case since we weren't logged in - await GameUI.login_ui.login_succeeded + await GameUI.instance.login_ui.login_succeeded ## hide the login ui pane diff --git a/mirror-godot-app/ui/login/login_ui.tscn b/mirror-godot-app/ui/login/login_ui.tscn index f5469a94..b78a93b0 100644 --- a/mirror-godot-app/ui/login/login_ui.tscn +++ b/mirror-godot-app/ui/login/login_ui.tscn @@ -203,12 +203,14 @@ layout_mode = 2 [node name="Username" type="LineEdit" parent="VBoxContainer/SignInMenu/MarginContainer/LoginContainer"] custom_minimum_size = Vector2(0, 40) layout_mode = 2 +text = "gordon@themirror.space" placeholder_text = "Email" caret_blink = true [node name="Password" type="LineEdit" parent="VBoxContainer/SignInMenu/MarginContainer/LoginContainer"] custom_minimum_size = Vector2(0, 40) layout_mode = 2 +text = "testtest1" placeholder_text = "Password" caret_blink = true secret = true diff --git a/mirror-godot-app/ui/main_menu/common/space_panel.gd b/mirror-godot-app/ui/main_menu/common/space_panel.gd index e5187897..8d9aa8a5 100644 --- a/mirror-godot-app/ui/main_menu/common/space_panel.gd +++ b/mirror-godot-app/ui/main_menu/common/space_panel.gd @@ -7,8 +7,8 @@ signal space_pressed(space: Dictionary) @onready var _preview_image: UrlTextureRect = %Preview @onready var _title_label: Label = %TitleLabel @onready var _description_label: Label = %DescriptionLabel -@onready var _is_ready_zone: Control = %IsReadyZone -@onready var _present_users_in_build = %PresentUsersInBuild +#@onready var _is_ready_zone: Control = %IsReadyZone +#@onready var _present_users_in_build = %PresentUsersInBuild @onready var _present_users_in_play = %PresentUsersInPlay @onready var _decor_border = find_child("DecorBorder", true, true) @onready var _rating_label = find_child("RatingLabel", true, true) @@ -47,8 +47,7 @@ func get_space_id() -> String: func set_ready_status(status: bool) -> void: - if _is_ready_zone: - _is_ready_zone.visible = status + return func _set_present_users(present_users: Array, control: Control): @@ -59,8 +58,7 @@ func _set_present_users(present_users: Array, control: Control): func set_build_present_users(present_users: Array): - _users_in_build = present_users.size() - _set_present_users(present_users, _present_users_in_build) + return func set_play_present_users(present_users: Array): @@ -151,7 +149,7 @@ func _join_space(build_mode = false) -> void: Zone.client.start_join_zone_by_space_id(_id) else: Zone.client.start_join_play_space_by_space_id(_id) - GameUI.loading_ui.set_loading_image(_preview_image.texture) + GameUI.instance.loading_ui.set_loading_image(_preview_image.texture) ## receiver method for the button was pressed that triggers entering a space diff --git a/mirror-godot-app/ui/main_menu/end_preview_button.gd b/mirror-godot-app/ui/main_menu/end_preview_button.gd index 51b1900f..4cfecdbf 100644 --- a/mirror-godot-app/ui/main_menu/end_preview_button.gd +++ b/mirror-godot-app/ui/main_menu/end_preview_button.gd @@ -12,4 +12,4 @@ func _on_zone_mode_changed(new_zone_mode) -> void: func _on_end_preview_button_pressed() -> void: Zone.client_send_mode_change(Zone.ZONE_MODE.EDIT) - GameUI.main_menu_ui.hide() + GameUI.instance.main_menu_ui.hide() diff --git a/mirror-godot-app/ui/main_menu/main_menu_ui.gd b/mirror-godot-app/ui/main_menu/main_menu_ui.gd index 599a2eac..2518d522 100644 --- a/mirror-godot-app/ui/main_menu/main_menu_ui.gd +++ b/mirror-godot-app/ui/main_menu/main_menu_ui.gd @@ -109,7 +109,7 @@ func toggle_main_menu_open(show_space_settings: bool = false) -> void: change_page(&"Discover") change_subpage(&"ViewSpace", Zone.space) change_subpage(&"EditSpace", Zone.space) - elif GameUI.should_display_space_listings: + elif GameUI.instance.should_display_space_listings: change_page(&"Home") change_subpage(&"HomeSpaceSelect") show() @@ -130,14 +130,14 @@ func _setup_pages_and_subpages() -> void: for subpage in subpages.get_children(): subpage.hide() page_names.append(page.name) - if not GameUI.should_display_space_listings: + if not GameUI.instance.should_display_space_listings: whitelisted_page_names = ["Avatar", "Settings"] _header_menu.populate_page_buttons(page_names, whitelisted_page_names) # Setups up the default pages func _show_default_page() -> void: - if GameUI.should_display_space_listings: + if GameUI.instance.should_display_space_listings: _current_page = get_page_from_name("Home") else: _current_page = get_page_from_name("Avatar") @@ -261,7 +261,7 @@ func _on_close_window_pressed() -> void: func _on_help_button_pressed() -> void: - GameUI.user_tutorial.show_tutorial_type(UserTutorial.Tutorial_Type.HOME) + GameUI.instance.user_tutorial.show_tutorial_type(UserTutorial.Tutorial_Type.HOME) func _on_back_button_pressed() -> void: diff --git a/mirror-godot-app/ui/main_menu/pages/avatar/avatar.gd b/mirror-godot-app/ui/main_menu/pages/avatar/avatar.gd index 1a00ffa1..87caa3f3 100644 --- a/mirror-godot-app/ui/main_menu/pages/avatar/avatar.gd +++ b/mirror-godot-app/ui/main_menu/pages/avatar/avatar.gd @@ -168,7 +168,7 @@ func _on_continue_with_avatar_pressed() -> void: Notify.info(tr("Can't confirm changes\n to your avatar"), tr("Your avatar might have been successfully changed. Retry to make sure.")) elif user_profile["avatarUrl"] != old_profile.get("avatarUrl", ""): Notify.success(tr("Your avatar successfully changed"), tr("This change will be applied on your next connection to any server")) - if GameUI.should_display_space_listings: + if GameUI.instance.should_display_space_listings: request_change_page.emit(&"Home") else: Notify.info(tr("No changes to your avatar"), tr("Your avatar was already set to that same avatar")) diff --git a/mirror-godot-app/ui/main_menu/pages/edit_space/basic_settings.gd b/mirror-godot-app/ui/main_menu/pages/edit_space/basic_settings.gd index 611eb427..57ea6d33 100644 --- a/mirror-godot-app/ui/main_menu/pages/edit_space/basic_settings.gd +++ b/mirror-godot-app/ui/main_menu/pages/edit_space/basic_settings.gd @@ -110,8 +110,8 @@ func _on_delete_space_confirmation_dialog_confirmed(): if promise.is_error(): Notify.error(tr("Space Deletion Failed"), promise.get_error_message()) else: - GameUI.main_menu_ui.cleanup_history() - GameUI.main_menu_ui.show_default_subpage() + GameUI.instance.main_menu_ui.cleanup_history() + GameUI.instance.main_menu_ui.show_default_subpage() Notify.success(tr("Space Deleted"), tr("Space deleted successfully.")) @@ -184,7 +184,7 @@ func _on_space_image_updated(promise: Promise, image_index: int): func _on_cancel_button_pressed(): - GameUI.main_menu_ui.history_go_back() + GameUI.instance.main_menu_ui.history_go_back() func _on_publish_button_pressed(): diff --git a/mirror-godot-app/ui/main_menu/pages/edit_space/edit_space.gd b/mirror-godot-app/ui/main_menu/pages/edit_space/edit_space.gd index 6118d702..f0ebcdd5 100644 --- a/mirror-godot-app/ui/main_menu/pages/edit_space/edit_space.gd +++ b/mirror-godot-app/ui/main_menu/pages/edit_space/edit_space.gd @@ -29,7 +29,7 @@ func populate(space: Dictionary) -> void: func _on_back_button_pressed(): - GameUI.main_menu_ui.history_go_back() + GameUI.instance.main_menu_ui.history_go_back() func _on_tab_button_pressed(button: Button, switch_to_tab: Container): diff --git a/mirror-godot-app/ui/main_menu/pages/home_page.gd b/mirror-godot-app/ui/main_menu/pages/home_page.gd index b45d61b0..b824efcc 100644 --- a/mirror-godot-app/ui/main_menu/pages/home_page.gd +++ b/mirror-godot-app/ui/main_menu/pages/home_page.gd @@ -9,7 +9,7 @@ extends Control func _on_view_my_spaces_pressed(): - GameUI.main_menu_ui.change_page(&"My_Spaces") + GameUI.instance.main_menu_ui.change_page(&"My_Spaces") func _on_reload_pressed(): diff --git a/mirror-godot-app/ui/main_menu/pages/home_page_section.gd b/mirror-godot-app/ui/main_menu/pages/home_page_section.gd index 2f22d377..a4a023d0 100644 --- a/mirror-godot-app/ui/main_menu/pages/home_page_section.gd +++ b/mirror-godot-app/ui/main_menu/pages/home_page_section.gd @@ -91,7 +91,7 @@ func _fetch_data(_cnt_items_to_fetch: int) -> Array: ## per row in the same time so all are visible. It takes into account spacing func _calculate_max_per_row(forced_size = Vector2.ZERO) -> int: var window_size = DisplayServer.window_get_size()/DisplayServer.screen_get_scale() - window_size /= get_viewport().content_scale_factor + window_size /= Zone.get_viewport().content_scale_factor window_size.x = max(400, window_size.x - window_margin * 2) var parent_size = forced_size if forced_size != Vector2.ZERO else window_size var x_sep = _items_container.get_theme_constant("h_separation") @@ -154,13 +154,13 @@ func _populate_items(items_data: Array, max_items_number: int) -> void: func _on_create_pressed() -> void: - GameUI.main_menu_ui.change_page(&"My_Spaces") - GameUI.main_menu_ui.change_subpage(&"SelectTemplate") + GameUI.instance.main_menu_ui.change_page(&"My_Spaces") + GameUI.instance.main_menu_ui.change_subpage(&"SelectTemplate") _audio_stream_player_click.play() func _on_space_pressed(space: Dictionary) -> void: - GameUI.main_menu_ui.change_subpage(&"ViewSpace", space) + GameUI.instance.main_menu_ui.change_subpage(&"ViewSpace", space) _audio_stream_player_click.play() var _currently_populating = false diff --git a/mirror-godot-app/ui/main_menu/pages/my_spaces.gd b/mirror-godot-app/ui/main_menu/pages/my_spaces.gd index 8286689c..65b964d0 100644 --- a/mirror-godot-app/ui/main_menu/pages/my_spaces.gd +++ b/mirror-godot-app/ui/main_menu/pages/my_spaces.gd @@ -18,8 +18,8 @@ func _ready() -> void: func _on_template_selected(template: Dictionary) -> void: - GameUI.main_menu_ui.change_page(&"My_Spaces") - GameUI.main_menu_ui.change_subpage(&"CreateSpace", template) + GameUI.instance.main_menu_ui.change_page(&"My_Spaces") + GameUI.instance.main_menu_ui.change_subpage(&"CreateSpace", template) func _on_template_cancel_pressed() -> void: @@ -50,16 +50,16 @@ func _on_finalize_create_pressed(data: Dictionary) -> void: data["template_id"], {"name": data["name"]} ) - GameUI.main_menu_ui.hide() - GameUI.loading_ui.populate(data) - GameUI.loading_ui.populate_status("Creating space") - GameUI.loading_ui.show() + GameUI.instance.main_menu_ui.hide() + GameUI.instance.loading_ui.populate(data) + GameUI.instance.loading_ui.populate_status("Creating space") + GameUI.instance.loading_ui.show() var space_data = await promise.wait_till_fulfilled() if promise.is_error(): Notify.error(tr("Space Creation Failed"), promise.get_error_message()) - GameUI.loading_ui.hide() - GameUI.main_menu_ui.show() + GameUI.instance.loading_ui.hide() + GameUI.instance.main_menu_ui.show() return Zone.client.quit_to_main_menu() - GameUI.loading_ui.populate_status("Joining space") + GameUI.instance.loading_ui.populate_status("Joining space") Zone.client.start_join_zone_by_space_id(space_data["id"]) diff --git a/mirror-godot-app/ui/main_menu/pages/space_select.gd b/mirror-godot-app/ui/main_menu/pages/space_select.gd index 3a2d652b..e8481b62 100644 --- a/mirror-godot-app/ui/main_menu/pages/space_select.gd +++ b/mirror-godot-app/ui/main_menu/pages/space_select.gd @@ -171,13 +171,13 @@ func _on_space_item_added(panel: Control) -> void: func _on_create_pressed() -> void: - GameUI.main_menu_ui.change_page(&"My_Spaces") - GameUI.main_menu_ui.change_subpage(&"SelectTemplate") + GameUI.instance.main_menu_ui.change_page(&"My_Spaces") + GameUI.instance.main_menu_ui.change_subpage(&"SelectTemplate") _audio_stream_player.play() func _on_space_pressed(space: Dictionary) -> void: - GameUI.main_menu_ui.change_subpage("ViewSpace", space) + GameUI.instance.main_menu_ui.change_subpage("ViewSpace", space) _audio_stream_player.play() diff --git a/mirror-godot-app/ui/main_menu/pages/view_space.gd b/mirror-godot-app/ui/main_menu/pages/view_space.gd index 7a9e2582..e2cd8889 100644 --- a/mirror-godot-app/ui/main_menu/pages/view_space.gd +++ b/mirror-godot-app/ui/main_menu/pages/view_space.gd @@ -37,7 +37,7 @@ func _construct_space_url(space_id: String) -> String: func _on_cancel_pressed() -> void: - GameUI.main_menu_ui.history_go_back() + GameUI.instance.main_menu_ui.history_go_back() func _load_avg_space_rating() -> void: @@ -100,7 +100,7 @@ func _preprocess_description(desciption: String) -> String: func populate(space: Dictionary) -> void: - _back_button.visible = GameUI.should_display_space_listings + _back_button.visible = GameUI.instance.should_display_space_listings # cache space _space = Net.space_client.spaces.get(space.get("_id"), space) # always get newest data _entity_action_rating_id = "" @@ -168,7 +168,7 @@ func _on_build_button_pressed(): return Zone.client.quit_to_main_menu() Zone.client.start_join_zone_by_space_id(space_id) - GameUI.loading_ui.set_loading_image(_space_image.texture) + GameUI.instance.loading_ui.set_loading_image(_space_image.texture) # do not call this excessively, we only need to call it when a user publishes @@ -191,7 +191,7 @@ func _on_play_published_space() -> void: return Zone.client.quit_to_main_menu() Zone.client.start_join_play_space_by_space_id(space_id) - GameUI.loading_ui.set_loading_image(_space_image.texture) + GameUI.instance.loading_ui.set_loading_image(_space_image.texture) func _on_copy_url_button_pressed(): @@ -204,7 +204,7 @@ func _get_space_id(space) -> String: func _on_space_settings_button_pressed(): - GameUI.main_menu_ui.change_subpage("EditSpace", _space) + GameUI.instance.main_menu_ui.change_subpage("EditSpace", _space) func _on_star_rating_value_changed(value): @@ -246,8 +246,8 @@ func _on_create_play_server_play_server_created(play_server_id): func _on_description_label_meta_clicked(meta): - GameUI.main_menu_ui.change_page(&"Build") - GameUI.main_menu_ui.change_subpage(&"DiscoverSpaceSelect", meta) + GameUI.instance.main_menu_ui.change_page(&"Build") + GameUI.instance.main_menu_ui.change_subpage(&"DiscoverSpaceSelect", meta) func _on_publish_space_window_space_version_published(): diff --git a/mirror-godot-app/ui/notifications/notify.gd b/mirror-godot-app/ui/notifications/notify.gd index f9046d24..8f337984 100644 --- a/mirror-godot-app/ui/notifications/notify.gd +++ b/mirror-godot-app/ui/notifications/notify.gd @@ -1,4 +1,4 @@ -## Notify: Autoload singleton for notifications, not dependent on GameUI. +## Notify: Autoload singleton for notifications, not dependent on GameUI.instance. extends Node @@ -6,9 +6,10 @@ var _notifications_ui: NotificationsUI = null func _ready() -> void: + ## TODO: Fix this to use a signal to wait for the UI, this code is dumb await get_tree().process_frame - if Zone.is_client() and has_node(^"/root/GameUI"): - _notifications_ui = get_node(^"/root/GameUI").notifications_ui + if Zone.is_client() and has_node(^"/root/GameUI/instance"): + _notifications_ui = get_node(^"/root/GameUI/instance").notifications_ui Zone.notifications_ready = true Zone.notifications_started.emit() diff --git a/mirror-godot-app/ui/restore_space/restore_space_window.gd b/mirror-godot-app/ui/restore_space/restore_space_window.gd index fa3bf569..789ba27f 100644 --- a/mirror-godot-app/ui/restore_space/restore_space_window.gd +++ b/mirror-godot-app/ui/restore_space/restore_space_window.gd @@ -60,7 +60,7 @@ func _on_restore_button_pressed() -> void: _restore_button.disabled = false return _loading_spinner_button.visible = true - GameUI.creator_ui.clear_selection() + GameUI.instance.creator_ui.clear_selection() Zone.space_restore.restore_from_space_version.rpc_id(Zone.SERVER_PEER_ID, space_version_id) diff --git a/mirror-godot-app/ui/teams/scoreboard_window.gd b/mirror-godot-app/ui/teams/scoreboard_window.gd index 488a5e10..46a069ee 100644 --- a/mirror-godot-app/ui/teams/scoreboard_window.gd +++ b/mirror-godot-app/ui/teams/scoreboard_window.gd @@ -80,7 +80,7 @@ func _process(_delta: float) -> void: visible = false return visible = _force_shown or ( - not GameUI.is_keyboard_needed_for_ui() + not GameUI.instance.is_keyboard_needed_for_ui() and Input.is_action_pressed(&"scoreboard_visible") and is_scoreboard_shortcut_enabled() ) diff --git a/scripts/compile.sh b/scripts/compile.sh index 474b0e36..7853c76b 100755 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -1,3 +1,18 @@ -cd godot-engine # we enable a compile database so we can easily debug in vscode and or other tools -scons target=editor optimize=speed debug_symbols=no compiledb=yes production=true \ No newline at end of file +# scons target=editor optimize=speed debug_symbols=no compiledb=yes production=true + +# export ANDROID_HOME=/home/gordon/Android/Sdk +export ANDROID_HOME=/Users/gordon/Library/Android/sdk +#scons platform=android target=template_release arch=arm32 +#scons target=editor +cd godot-engine/modules/jolt/ +git clean -xdf +cd ../../ +scons platform=android ndk_platform=android-24 target=template_release arch=arm64 verbose=yes optimize=speed_trace +cd godot-engine/modules/jolt/ +git clean -xdf +cd ../../ +scons platform=android ndk_platform=android-24 target=template_debug debug_symbols=yes optimize=speed_trace arch=arm64 verbose=yes +cd platform/android/java +# On Linux and macOS +./gradlew generateGodotTemplates \ No newline at end of file diff --git a/scripts/setup-compiled-engine.sh b/scripts/setup-compiled-engine.sh index 3fdc651c..272728b0 100755 --- a/scripts/setup-compiled-engine.sh +++ b/scripts/setup-compiled-engine.sh @@ -1,6 +1,6 @@ # initialise all submodules -git submodule update --init --recursive +git submodule update --init --recursive --progress # ensure the latest version of all submodules are provided (legacy git support) # in some older versions of Git, if you use the --init option, already-initialized submodules may not be updated. In that case, you should also run the command without --init option. # reference: https://stackoverflow.com/questions/10168449/git-update-submodules-recursively -git submodule update --recursive \ No newline at end of file +git submodule update --recursive --progress