Commit Graph

89 Commits

Author SHA1 Message Date
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
10a56981dc Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
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
344ba0ffaf Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
c8ce7e34e2 i18n: Misc fixes translation strings
Adds some translator comments to solve some questions raised on Weblate.
2022-06-08 12:57:54 +02:00
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
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
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
918b09cabc Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
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
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
244db37508 Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
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
55100f2f11 Small formatting fixes in Find in Files 2021-10-27 16:13:49 +02:00
5dc02eb8b0 Save all 64 bits of get_ticks_msec() in more cases 2021-10-26 13:58:58 +02:00
b5c750fa65 Restrict the project data directory configuration 2021-10-18 14:10:38 -07:00
3e44a6375e Make the project data directory customizable. 2021-10-11 14:40:14 -07:00
a7ba227631 Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master 2021-10-05 21:02:27 +02:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
69f890ff11 Provide a getter for the project data directory. 2021-09-15 12:52:03 -07:00
658b152bd8 Make "Find in Files" searches ignore directories with .gdignore files in them
This pull request fixes an issue where searches using the "Find in Files" function would include folders with `.gdignore` files in them. The editor is supposed to ignore directories with these files in them altogether.
2021-07-30 15:10:05 -04:00
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
d7d32ced5b Implement Tree's internal minimum width calculation 2021-06-28 15:54:31 +02:00
8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
9e328bb5b7 Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
edd88949be Merge pull request #48747 from Calinou/editor-find-in-files-tweak-highlight-color
Tweak highlight color in the editor Find in Files dialog
2021-05-21 12:28:45 +02:00
b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
82570dec90 Tweak highlight color in the editor Find in Files dialog
The new color is more visible against dark backgrounds.
2021-05-16 00:30:06 +02:00
64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
4a41367949 Merge pull request #42784 from mujpao/search-results-font-size-4.0
Make search results font follow code editor font
2021-02-14 17:28:11 +01:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
e2c0082b6a Merge pull request #44301 from pycbouh/show-count-find-in-files
Display the number of results for global search
2020-12-17 10:04:50 +01:00
8509c8c8fc Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-12-14 18:43:52 +00:00
7c0d682951 Display the number of results for global search 2020-12-11 19:13:33 +03:00
e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
99666de00f [Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
011fdece6d Make search results font follow code editor font
The font size of the Find in Files dialog used to get out of sync with
the code editor font size.

The font of the Find in Files dialog is now updated each time there is a
change to the theme. This way, the font size of the Find in Files
results changes in response to the code font size being changed using
Ctrl +/- or using the Editor Settings.

Fixes #35499
2020-10-13 14:58:06 -07:00
80b8eff6aa [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
a86521d0bd Search result highlights follow font size 2020-06-17 00:53:23 +02:00
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

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

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

Part of #33027.
2020-05-14 16:54:55 +02:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00