Commit graph

229 commits

Author SHA1 Message Date
Rémi Verschelde
7f0b3bc2a0 Add editor setting for AcceptDialog OK/Cancel buttons positioning
The position (left/right) of the Cancel and OK buttons in AcceptDialog
are DisplayServer specific, as Windows uses OK/Cancel and macOS uses Cancel/OK.

Linux/X11 currently uses the macOS convention which is also the GTK+/GNOME one,
though it's not consistent with Qt/KDE applications which follow the Windows
convention.

Since that can't satisfy everyone, it's best if it's configurable also for the
editor (it's already configurable for the project).

Fixes #59379.

(cherry picked from commit 9bb05de89f)
2022-12-01 09:50:51 +08:00
Rémi Verschelde
9a340a2868
Project Manager: Fix hacky code for project rename
Instantiating a new ProjectSettings is *not* the way to go.
ConfigFile works just fine to read/change a single value.

Fixes memory leaks as the instantiated ProjectSettings was never freed.
Forbid doing this to prevent such problems.

Fixes #25661.

(cherry picked from commit f21f75eb6f)
2022-11-30 15:34:27 +01:00
Fredia Huya-Kouadio
c875f23750 Disable logic that triggers automatic focus gain as the Godot Editor is loaded
For the Godot Android Editor, this is an inconvenience as it causes the soft keyboard to show and block half of the view
2022-09-05 22:13:03 -07:00
Pedro J. Estébanez
4dd3e95377 Overhaul CLI argument forwarding to processes started by the editor 2022-08-19 11:13:56 +02:00
Rémi Verschelde
875a0dba5a AssetLib: Only notify when unavailable in verbose mode
(cherry picked from commit dc86bce306)
2022-07-08 16:42:03 +02:00
Fabio Alessandrelli
ad5fdcc0f3 [AssetLib] Fix crash in Web editor.
Add EditorAssetLibrary::is_available which always returns false in the
Web editor and use it in EditorNode for detection.

(cherry picked from commit 0e504e4191)
2022-07-08 14:37:35 +02:00
python273
77a9f3d4d8 Make asset library's column count dynamic
(cherry picked from commit d65eb592b0)
2022-07-03 03:26:12 +02:00
Rémi Verschelde
3000d8d140
Merge pull request #59576 from techiepriyansh/fix-multiple-instances-3.x 2022-07-03 00:22:15 +02:00
Haoyu Qiu
03e84abfa5 Fix empty space after project sort options 2022-06-04 00:20:09 +08:00
Rémi Verschelde
78c54043ce HTML5: Always disable Asset Library
GitHub doesn't allow CORS so we can't download assets from it.

There'd also be more work needed for the Asset Library plugin to be
usable in the Web editor even if that was supported.

(cherry picked from commit 42b48496de)
2022-05-25 14:51:43 +02:00
Rémi Verschelde
1b297eb047 Project Manager: Fix crash on resize with assetlib disabled
Follow-up to #61215.

(cherry picked from commit 6f5be1f1f0)
2022-05-25 14:07:33 +02:00
Hugo Locurcio
13284f3a7b
Swap the filter and order fields in the project manager
This matches 4.0 project manager presentation, with filter appearing
on the left and order on the right.
2022-05-21 09:50:06 +02:00
Hugo Locurcio
bc91b89203
Fix project manager display at small window sizes
- Don't use minimum size for project order/filter controls.
  This also allows the filter field to become longer at large
  window sizes.
- Hide the loading label instead of changing its opacity.
  This causes a reflow during loading, but this is preferable to having
  the UI overflow.
- Hide the language dropdown on Android as it doesn't work correctly.

This allows the project manager to be displayed correctly at much
lower window sizes than previously.
2022-05-20 16:55:02 +02:00
Aaron Franke
08a397c4b7
Tweaks to improve the Project Manager display at small sizes 2022-05-20 16:51:06 +02:00
Hugo Locurcio
c3da5228a3
Fix project manager window position when editor scale is above 100%
This backports a fix from `master` to `3.x` (with simplified code).
2022-04-15 18:05:32 +02:00
Hugo Locurcio
053b54b67c
Add missing newlines to the generated default_env.tres in new projects
This prevents unnecessary whitespace changes in VCS diffs when saving
a scene for the first time in a new project.
2022-04-02 18:41:15 +02:00
Priyansh Rathi
f23663bb59
fix same project opening mutliple times from project manager 2022-03-27 16:06:09 +05:30
Haoyu Qiu
177c60fc52 Improves editor property name extraction 2022-03-18 17:53:28 +08:00
Pedro J. Estébanez
3d7821bf1f Drop mouse focus and over when gui input is globally disabled
Since some porjects may be relying on the former behavior, this is opt-in via a new project setting, disabled by default, but enabled for new projects, since it's the new standard behavior (and the only one in 4.0).
2022-03-14 11:06:26 +01:00
Rémi Verschelde
f50c7f7415
Core: Move generated VERSION_HASH to a .cpp file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.

(cherry picked from commit 90162851a7)
2022-02-10 13:06:56 +01:00
Rémi Verschelde
c938104a88
Merge pull request #56630 from Pineapple/replace-find-last 2022-01-18 16:36:52 +01:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Bartłomiej T. Listwon
22750b1c03 Replace String::find_last with rfind where possible (backward compatible with old API) 2022-01-08 22:40:44 +01:00
bruvzg
d2558bdc8c
Fix decoding UTF-8 filenames on unzipping.
(cherry picked from commit d2573c1636)
2022-01-06 00:21:37 +01:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
kobewi
24c52f8d67
Improve language lists in localization editor
(cherry picked from commit 30df260810)
2021-12-01 14:23:08 +01:00
Ibrahn Sahir
9a181edd87
Turn off physics servers in the Project Manager.
Copying the editor behaviour of deactivating these servers we're not
using, to reduce CPU load.

(cherry picked from commit 27a6ab457b)
2021-11-18 12:18:02 +01:00
Hugo Locurcio
0f4b0cb3dd
Use Enter instead of F2 as an editor renaming shortcut on macOS 2021-11-12 20:50:38 +01:00
Fredia Huya-Kouadio
c8b022c165 Provide a getter for the project data directory. 2021-09-15 13:00:25 -07:00
Rémi Verschelde
7968208b0a
Merge pull request #47201 from LightningAA/delete-from-project-manager-3.x
[3.x] Add the ability to remove project contents from the remove project dialog
2021-07-23 22:17:55 +02:00
Hugo Locurcio
9cc65e1b9b
Automatically focus the Search field when displaying asset library
- Focus the project search box when switching from the Templates tab
  back to the Projects tab in the project manager.
- Add a context-specific placeholder for the asset library search box.
- Rename "Search" project filter box placeholder to the more
  descriptive "Filter projects". When performing a search on an
  existing selection, "Filter" is more accurate than "Search".
2021-07-15 18:47:38 +02:00
Hugo Locurcio
8beb57476f
Add keyboard shortcuts to the project manager
- Ctrl + N: New Project
- Ctrl + I: Import Project
- Ctrl + S: Scan for Projects
- Ctrl + E: Edit Project
- Ctrl + R: Run Project
- F2: Rename Project
- Delete: Remove Project
  - Already implemented previously, but moved to use `ED_SHORTCUT()`.

Note that depsite using `ED_SHORTCUT()`, these shortcuts won't appear
in the Editor Settings' Shortcuts dialog and won't be remappable since
the project manager code isn't run in the editor.

(cherry picked from commit 9bda49e030)
2021-06-29 13:11:47 +02:00
Andrii Doroshenko (Xrayez)
6aed7e349f
Separate version hash from version number in editor and project manager
When copy-pasting the version from About dialog to bug reports at GitHub,
this makes the version hash linkable to commits at GitHub.

(cherry picked from commit 293550f56a)
2021-06-17 12:47:53 +02:00
Hugo Locurcio
dd2fc60abc
Handle portrait mode monitors in the automatic editor scale detection
Using the smallest dimension of the width and height makes it possible
to support both landscape and portrait monitors.

(cherry picked from commit 728fa3ff71)

EditorSettings: Factor code to compute auto display scale

Also fixes typo introduced in https://github.com/godotengine/godot/pull/48597/files#r652636544.

(cherry picked from commit f862f9a056)
2021-06-17 12:47:52 +02:00
Aaron Franke
ea476543ea
Rename tabs in the project manager
(cherry picked from commit 7813167196)
2021-06-07 12:13:27 +02:00
Rémi Verschelde
fb294606b5
Merge pull request #48771 from LightningAA/scrollcontainer-ensure-item-visible-3.x
[3.x] ScrollContainer: Expose `_ensure_focused_visible` to the scripting API and rename it to `ensure_control_visible`
2021-06-01 12:58:56 +02:00
Lightning_A
6f58e6ce2c ScrollContainer: Expose _ensure_focused_visible to the API
Was renamed to `ensure_control_visible`
2021-05-31 19:05:30 -10:00
Ev1lbl0w
664f1828e2
Fix zip_root not being defined when importing by drag&drop
(cherry picked from commit 056deefa55)
2021-05-20 14:34:32 +02:00
Lightning_A
0c55ab1bb4 Add the ability to remove project contents from the remove project dialog 2021-05-11 11:06:37 -06:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
0bf06c25a3
Merge pull request #48450 from Calinou/version-click-to-copy-3.x
Make it possible to copy the Godot version identifier by clicking it (3.x)
2021-05-04 17:55:43 +02:00
Hugo Locurcio
1ceb603de8
Make it possible to copy the Godot version identifier by clicking it
This closes #24317.
2021-05-04 16:38:17 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Hugo Locurcio
81ca8e4e7e
Add the About dialog to the project manager
The About button is located in the bottom-right corner of the
project manager.

This allows removing the copyright notice from the window title
(which looked a bit ugly in comparison to other applications).
2021-05-02 00:01:23 +02:00
Ev1lbl0w
c2b85ed865
Allow Godot to import .ZIP files with non-regular structure
(cherry picked from commit 9b1db715fd)
2021-04-26 13:07:58 +02:00
Hugo Locurcio
94e0d02079
Strip leading/trailing whitespace for project name in the project manager
This affects creating projects and renaming them.

(cherry picked from commit 86455d0c58)
2021-04-26 12:20:28 +02:00
Haoyu Qiu
be8cb6af8c Fix project icon size in Project Manager 2021-03-21 14:41:46 +08:00
Ansraer
729a9c8a5e
Adjust auto scale on high res displays
(cherry picked from commit 466cf0b466)
2021-02-16 14:47:29 +01:00
Hugo Locurcio
f6257e31ed
Display loading text while the project manager is loading
This hints the user that the project manager is currently busy
loading the project. This is important for the HTML5 editor as the
current feedback isn't very obvious.

This also removes the unused `_exit_dialog` function.
2021-02-14 17:02:08 +01:00