Commit graph

431 commits

Author SHA1 Message Date
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Aaron Franke
f6714858bf
Rename TextureButton set_*_texture methods to set_texture_* 2022-11-19 17:33:40 -06:00
kobewi
0d122ce459 Allow to escape closing brackets in CFG tags 2022-11-09 14:00:51 +01:00
Rémi Verschelde
f475c91081
Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20 2022-11-04 11:36:13 +01:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Zae
41f9bf946b Fix sorting issue in Project Manager. 2022-10-17 16:12:35 +08:00
Nikola Bunjevac
fb673953ca Resize project dialog only when necessary 2022-10-11 17:16:20 +02:00
Rémi Verschelde
3a2e749a10 Merge pull request #59382 from akien-mga/editor-acceptdialog-swap-cancel-ok
Add editor setting for AcceptDialog OK/Cancel buttons positioning
2022-10-11 12:34:04 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde
9bb05de89f 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.
2022-10-05 17:51:04 +02:00
clayjohn
4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
Rémi Verschelde
e7ce3f539e Project Manager: Clarify text in project conversion dialogs
Let the cancel button grab focus to prevent any accident.

Make the full project conversion respect OS specific ok/cancel
positions.

Improve popup sizing and wrapping a bit.
2022-09-15 01:38:26 +02:00
Rémi Verschelde
78042ce235
Merge pull request #64927 from KoBeWi/three2four 2022-09-13 10:39:15 +02:00
Nathan Franke
020b8e6c68
project manager language OptionButton fit to longest item 2022-09-12 19:59:16 -05:00
kobewi
305d407dad Add option to convert project from Project Manager 2022-09-12 18:31:03 +02:00
Michael Alexsander
c4c9e41073 Make Vector2i values paired with EDSCALE be just Vector2 2022-09-08 14:46:32 -03:00
bruvzg
6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Rémi Verschelde
61644f1dbe Merge pull request #65447 from Faless/net/4.x_ssl_to_tls
[Net] Rename StreamPeerSSL to StreamPeerTLS.
2022-09-07 09:19:46 +02:00
Fabio Alessandrelli
528e791a5f [Net] Rename StreamPeerSSL to StreamPeerTLS.
SSL has been deprectated almost 10 years ago.
2022-09-07 07:38:50 +02:00
Yuri Sizov
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
Fredia Huya-Kouadio
841b4dfeeb 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:33:01 -07:00
bruvzg
b85a4c5d79
[macOS] Handle accelerator and click events of the global menu items separately. 2022-09-01 08:13:56 +03:00
Rémi Verschelde
ae349d8227
Merge pull request #64377 from Mickeon/rename-canvas-redraw
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Micky
e31bb5ffeb Rename CanvasItem.update() to queue_redraw()
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Fabio Alessandrelli
d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
Micky
ef5b9a06a9 Rename hint_tooltip to tooltip_text & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Yuri Sizov
ba0421f3d9
Merge pull request #64637 from Calinou/default-project-icon-use-svg
Create a SVG default project icon in new projects
2022-08-23 17:52:32 +03:00
Rémi Verschelde
7c85c4a27e
Merge pull request #64374 from RandomShaper/inheritable_cl_args 2022-08-22 21:48:28 +02:00
Hugo Locurcio
7849331ec5
Create a SVG default project icon in new projects
This allows the icon's scale to be changed using the `svg/scale`
import option, including to scales greater than the default 128×128.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-08-20 01:01:11 +02:00
Pedro J. Estébanez
e886d662ec Overhaul CLI argument forwarding to processes started by the editor 2022-08-19 11:15:56 +02:00
Yuri Sizov
d6090174b3
Merge pull request #58059 from Calinou/tweak-default-project-icon-2
Tweak the default project icon
2022-08-18 22:31:39 +03:00
Ryan Roden-Corrent
366871a3ff
Migrate project list to separate config file.
Storing the project/favorites list in the EditorSettings makes it
difficult to version-control your editor configuration, as the file will
continually change as you open new projects. It also means a
configuration can't be shared across machines, as they might not have
the same projects or file layout.

Now the project list is stored in $godot_data_dir/projects.cfg.
Each path is a section, which has a boolean favorite value.
If the new config does not exist, the editor attempts to migrate legacy
EditorSettings-based configuration to the new file.

Fixes godotengine/godot-proposals#1637.
2022-08-07 07:46:52 -04:00
Kyle
0269465021 Remove unused bindings in ProjectManager
They were left over after changes to master made them obsolete.
2022-07-30 11:53:56 +02:00
kobewi
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
FireForge
97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
Rémi Verschelde
b942c1ffe3
Merge pull request #62827 from fire-forge/ok-cancel
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-13 14:10:38 +02:00
FireForge
af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
FireForge
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
Rémi Verschelde
d26442e709
Merge pull request #60739 from KoBeWi/add_static_methods_everywhere!! 2022-07-08 16:50:47 +02:00
Rémi Verschelde
dc86bce306 AssetLib: Only notify when unavailable in verbose mode 2022-07-08 15:25:54 +02:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
python273
d65eb592b0 Make asset library's column count dynamic 2022-07-02 23:42:09 +03:00
Fabio Alessandrelli
0e504e4191 [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.
2022-06-30 01:26:08 +02:00
FireForge
b7b6b38453 Add icons to the Project Manager side buttons 2022-06-16 19:32:41 -05:00
FireForge
7f7244f04a Use consistent casing in editor filter/search bars 2022-05-28 18:43:16 -05:00
Rémi Verschelde
42b48496de 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.
2022-05-25 14:19:46 +02:00
Rémi Verschelde
6f5be1f1f0 Project Manager: Fix crash on resize with assetlib disabled
Follow-up to #61215.
2022-05-25 13:09:53 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Rémi Verschelde
25ec4b447b
Merge pull request #61211 from Calinou/project-manager-fix-small-window-size 2022-05-20 17:04:01 +02:00
Hugo Locurcio
9e64f3de6c
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 About button on Android as it will spawn a dialog that's
  too large to be closed on most screens.
- 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:32:29 +02:00
Aaron Franke
a53b7f0a9d
Tweaks to improve the Project Manager display at small sizes 2022-05-19 23:57:48 -05:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
bruvzg
d36c5514d3
Fix ZipIO crash when reused (and possible leaks). 2022-05-11 16:08:17 +03:00
Aaron Franke
b1ea83451a
Fix display of unsupported project features in the project manager 2022-05-10 08:25:22 -05:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde
a19d7d8f8d
Merge pull request #58383 from bruvzg/no_inv_window_placement 2022-04-27 09:33:40 +02:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
bruvzg
defcd0c57e
Avoid setting sub-window or started project window positions, if it's impossible to get screen rect. 2022-04-20 11:10:33 +03:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Josh Kabo
0bff53135a Unzip read success no longer breaks read loop
unzReadCurrentFile(3) returns number of bytes read, so the current code only processes the file if no bytes were read (UNZ_OK is a #define equal to 0).
I've altered the break to occur only on unsuccessful read, (when unzReadCurrentFile(3) returns less than zero), and added an error message for when an unsuccessful read occurs.
2022-04-16 16:39:37 -07:00
Rémi Verschelde
776c6bf6fb
Merge pull request #54740 from LightningAA/project-manager-sort-by-most-recent-as-default 2022-04-12 21:05:15 +02:00
Rémi Verschelde
5613ac37d6
Merge pull request #59440 from bruvzg/fd_ref_counted 2022-04-11 14:12:18 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
kobewi
63de41b996 Improvements to files_dropped signal 2022-04-11 00:37:06 +02:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
bruvzg
d1207a0504
[Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
floppyhammer
536d7581ba Fix project manager window size not applying display scale correctly 2022-03-27 11:06:44 +08:00
C.Even
56d372ef0c Fix project manager window centering in multi-monitor situation
* When main screen's position in not (0,0) and editor scale is larger
  than 1, the project manager window was not centered in main screen
2022-03-26 20:03:04 +08:00
Haoyu Qiu
4d73899352 Improves editor property name extraction 2022-03-18 17:56:45 +08:00
Michael Alexsander
deb1342036 Make TabBar/Container default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
Michael Alexsander
fc0e657e8f Remove extra borders from the AssetLib plugin 2022-03-15 20:40:46 -03:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
Priyansh Rathi
d5b8a25195
fix same project opening mutliple times from project manager 2022-03-06 18:24:06 +05:30
Michael Alexsander
a811ebf699 Make TabContainer use TabBar internally 2022-03-03 21:49:58 -03:00
Jakob Bouchard
6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
Hugo Locurcio
8c06318722
Tweak the default project icon
This only affects newly created projects.

- Use a 128×128 resolution to make the icon look crisp on hiDPI displays.
- Darken the icon's outside area and remove the border, as the
  contrast rate between the icon and its background is now sufficient.

This different design also allows distinguishing projects that
were made with Godot 3.x from projects made with Godot 4.0.
2022-02-15 20:23:12 +01:00
TechnicalSoup
f3b7419790 Center initial position project manager window
Ensure that the project manager window is centered on the screen if any resizing is performed due to DPI scaling.
Resizing and repositioning code has been moved to after the initialisation of the window contents to improve UI response/presentation.
2022-02-13 19:48:53 +11:00
bruvzg
9739a2038a
Fix Project Manager crash on exit.
Fix editor settings loading / saving by Project Manager.
2022-02-12 21:55:11 +02:00
Hendrik Brucker
77fb65debf Use EditorFileDialog instead of FileDialog in the project manager 2022-02-12 12:06:51 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde
90162851a7
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.
2022-02-09 09:20:17 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
bruvzg
d2573c1636
Fix decoding UTF-8 filenames on unzipping. 2022-01-05 14:31:20 +02:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
1032c2c434
Merge pull request #55487 from YeldhamDev/scroll_bikeshedding 2022-01-03 14:10:41 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
kobewi
841a9ef820 ScrollContainer's scrollbar visibility is now enum 2021-12-07 18:27:12 +01:00
Rémi Verschelde
8bb0f2aff1
Merge pull request #52916 from aaronfranke/no-default-env
Remove `default_env.tres` from generating in new projects
2021-12-02 21:12:12 +01:00
Michael Alexsander
ec4f4c6cda Rename all methods that return ScrollBar nodes to get_*_scroll_bar() 2021-11-30 13:46:36 -03:00
kobewi
30df260810 Improve language lists in localization editor 2021-11-30 15:29:41 +01:00
Aaron Franke
7a096b216e
Remove default_env.tres from generating in new projects 2021-11-26 14:37:27 -06:00
Aaron Franke
9851d3c5b2
Move logic for saving project features to ProjectSettings save_custom 2021-11-25 03:08:05 -06:00