Commit Graph

147 Commits

Author SHA1 Message Date
Michael Alexsander 84d7492b2d Add fallback icons and make custom ones appear in the recent/favorites list in the "Create New" dialog 2020-05-27 16:05:19 -03:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

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

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

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

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

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

Part of #33027.
2020-05-14 16:54:55 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Rémi Verschelde 4857648a16 i18n: Add support for translating the class reference
- Parse `.po` files from `doc/translations/*.po` like already done
  with `editor/translations/*.po`.
- Add logic to register a doc translation mapping in `TranslationServer`
  and `EditorSettings`.
- Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`).
  Strings are automatically dedented and stripped of whitespace to ensure
  that they would match the translation catalog.
- Use `DTR()` to translate relevant strings in `EditorHelp`,
  `EditorInspector`, `CreateDialog`, `ConnectionsDialog`.
- Small simplification to `TranslationLoaderPO`, the path argument was
  not really meaningful.
2020-03-20 08:48:11 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde 09a6a2d8f8 Signals: Port more uses of connect_compat
Those were problematic as they call a method of their parent class,
but callable_mp does not allow that unless it's public.

To solve it, we declare a local class that calls the parent class'
method, which now needs to be protected to be accessible in the
derived class.
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
bruvzg 1af06d3d46
Rename `scancode` to `keycode`.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
PucklaMotzer09 b0e4205069 Add ignoring of disabled recent and favorite classes in create 2020-01-09 08:17:06 +01:00
veryprofessionaldodo d88f620c52 Recent Nodes now respect Editor Profiles 2020-01-08 14:23:36 +00:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
PouleyKetchoupp fb9ff92c29 Node create dialog filtering optimization
Avoid loading the same scripts again and parse them when updating the node type tree.
2019-11-06 17:21:14 +01:00
Bojidar Marinov 6c4407bae4
Add overriden properties to the documentation
Fixes #31855
2019-09-04 15:21:40 +03:00
Bhupendra Aole a8a293832e Fix selecting recent node in CreateDialog
If the node name matches exactly as the search, the node should be selected.
This also fixes when the user clicks on recent nodes.

Fixes #24044
2019-08-29 09:07:57 -04:00
qarmin 9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Rémi Verschelde b0ce9401ff
Merge pull request #30126 from qarmin/remove_unnecessary_code
Remove unnecessary code and add some error explanations
2019-07-01 14:32:04 +02:00
qarmin 3c154eb93b Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
Marcus Brummer 80a0d1701b Better pre-selection of search result nodes in "Create New Node" dialog.
Also search for substrings in class types, not just subsequences. If for
the current search term a substring has been found in a class type name,
prefer the substring match over the subsequence.

Fixes #26010
2019-06-26 15:05:00 +02:00
Rémi Verschelde 1a9a2c879a
Merge pull request #29645 from YeldhamDev/create_dialog_reselect
Allow reselecting items in the "Favorites" and "Recent" lists in the create dialog
2019-06-12 22:58:09 +02:00
Michael Alexsander Silva Dias c22dcca866 Fix error spam in create dialog when searching for nodes with some disabled 2019-06-12 10:43:42 -03:00
Michael Alexsander Silva Dias 307fe76089 Allow reselecting items in the "Favorites" and "Recent" lists in the create dialog 2019-06-09 22:44:31 -03:00
Rémi Verschelde 6273e4d76d
Merge pull request #26487 from matzebond/master
Auto-expand current node type when changing node type
2019-05-28 12:52:21 +02:00
Rémi Verschelde 47f00925dc
Merge pull request #28454 from homer666/popup-centered-maxsize
Add `popup_centered_clamped()` method to Popup
2019-05-28 11:36:41 +02:00
Matthias Schmitt 6b7c8ef327 Auto-expand current node type when replace node 2019-05-24 00:13:41 +02:00
homer666 80e9e93e27 Add Popup::popup_centered_clamped method
- Also replace redundant duplicate code in editor dialogs with calls to popup_centered_clamped()
2019-04-30 05:35:43 +10:00
Michael Alexsander Silva Dias bd278fdd65 Force drawing guides in single-row Tree items in the editor 2019-04-12 20:56:36 -03:00
Juan Linietsky a20235aeb0 Add ability to edit editor feature profiles
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-04-08 19:18:51 -03:00
George Marques 25f9aee005
Allow class_name scripts to have nested inheritance 2019-03-09 00:47:27 -03:00
Juan Linietsky 5f079e2ef9 -Make tileset and meshlibrary edit in a separate inspector, fixes #26671
-Made relationship lines appear based on theme settings, not previous hack
-Fix drawing of relationship lines (was broken)
-Fix double initialization of theme settings
2019-03-06 12:12:42 -03:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
DualMatrix e3648c0a79 Fixed Recent/Favorite in Create Node dialog not selecting right node
Fixes #6535
2019-01-26 13:52:53 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias 63dc20a827 Move "Dialog Bounds" from the Editor Settings to project's metadata 2018-12-04 13:55:24 -02:00
Michael Alexsander Silva Dias 7144e2fde4 Add more places to hide guides if relationship lines are enabled 2018-11-19 03:05:01 -02:00
DualMatrix 9b3c1f617f Deselect recents when selecting favorites and vice versa in Create Node.
Deselect recents when selecting favorites and vice versa in Create Node.
2018-10-04 22:31:48 +02:00
DualMatrix edd93b7608 Fixed favorite nodes list not being saved
Fixed favorite nodes list not being saved
2018-09-19 00:30:01 +02:00
willnationsdev 5436abefe4 Refactor editor icon retrieval 2018-09-14 09:27:56 -05:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
DualMatrix 6ec28de584 Fixed favorites and recent nodes selecting wrong node
Fixed favorites and recent nodes selecting wrong node and fixed a typo.

Fixes #6535
2018-09-10 20:58:29 +02:00
Will Nations dee0ee749d Fix Script Classes not instancing with custom name. 2018-08-30 16:01:39 -05:00
Rémi Verschelde 134d071ca7
Merge pull request #21046 from DualMatrix/recent_custom_type
Fixed custom nodes not working with favorites and recently used
2018-08-16 18:28:03 +02:00
DualMatrix 9896b7bbf9 Fixed custom nodes not working properly with favorites and recently used in create node window. 2018-08-16 17:14:52 +02:00
Will Nations 3ed9231117 Fix error spam from loading script class icons 2018-08-15 10:17:28 -05:00
Rémi Verschelde d006aa0abb
Merge pull request #21021 from DualMatrix/new_node_warning
Fixed error spam in create node dialog with custom types.
2018-08-15 16:10:12 +02:00
DualMatrix 8591a1bd80 Fixed error spam in create node dialog with custom types.
This should fix #20789
2018-08-15 15:35:14 +02:00
Will Nations 6d9cc032e7 Add custom icons to script classes. 2018-08-14 14:18:05 -05:00
Rémi Verschelde c3a57ddf03
Merge pull request #20484 from willnationsdev/create-favorites
Add toggle for favorites in create_root_dialog
2018-08-14 16:12:02 +02:00
Łukasz Rutkowski 81fb81de9d Do not use theme to set LineEdit right_icon 2018-08-11 12:04:26 +02:00
Łukasz Rutkowski e8a435c8cd Add clear text button to LineEdit
- Add pressed state to clear button
- Enable clear button on all inputs with search icon
- Remove duplicate clear buttons
- Fix rendering of icon for center and right alignments
- Add clear button to more search fields
- Add clear icon to default theme
- Add method to control enabled state of clear button
- Add property to enable clear button from inspector
2018-08-11 12:04:26 +02:00
willnationsdev 1ea37c34ad Add toggle for favorites in create_root_dialog. 2018-08-08 12:15:42 -05:00
Will Nations 3de15363ab Add script hierarchies,add-script btn auto-derives 2018-07-25 15:18:45 -05:00
Juan Linietsky a3f1ee5c57 Global class names (and GDScript support for it) 2018-07-15 19:29:00 -03:00
willnationsdev 2a6c591957 Expose ScriptCreateDialog to EditorPlugin 2018-07-04 09:41:12 -05:00
homer666 7ff3b52dea Adjust default editor popup sizes 2018-05-05 12:09:56 +10:00
Juan Linietsky 2f4f8de459
Merge pull request #16995 from mrcdk/custom_resources_inspector
The inspector will show the custom resources added via plugin
2018-04-08 11:49:34 -03:00
Ivan Vodopiviz 68a4241131 Fix new Node dialog Create button behavior
Added a one-liner to update the Create button disabled state when
selecting an item from the search results list.

Fixes #17265, long live the Realm!
2018-03-04 23:27:18 +01:00
MrCdK 97e77688bb Now the inspector will show the custom resources added via plugin 2018-02-25 01:41:26 +01:00
Rémi Verschelde 1e4b3ddfbf
Merge pull request #15492 from vigreco/select-tree-root
Select root node if search_box is empty in create_dialog
2018-02-14 17:04:08 +01:00
Emmanuel Leblond 9fba9e5465
Hide only PluginScript in dialog box 2018-01-21 00:43:57 +01:00
Emmanuel Leblond 431ecc2061
Hide Script nodes in dialog box to prevent crash with pluginscript 2018-01-19 09:55:52 +01:00
Vincenzo Greco 586e735125 Select root node if search_box is empty in create_dialog 2018-01-08 16:46:36 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Michael Alexsander Silva Dias a6a2ea7a5e Made the Create Dialog be clearer when it's changing a type of something. 2018-01-03 13:33:25 -02:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Michael Alexsander Silva Dias ecf3fbadf4 Changes to the Editor File Dialog. 2017-12-25 02:29:00 -02:00
Michael Alexsander Silva Dias e86454fb38 Fixes and modifications for some dialogs. 2017-12-21 15:26:46 -02:00
Poommetee Ketson 24df9f3707 Enhance undoredo action name, TTR, cleanup 2017-12-12 23:04:37 +07:00
Rémi Verschelde ad199c3964 EditorSettings: Rename settings_path to settings_dir
Also to prepare for upcoming refactoring for XDG support.
2017-11-17 20:55:09 +01:00
Michael Alexsander Silva Dias 496e4e0d2f Enabling relationship lines in the Scene Tree enables them in the Create New Node dialog as well. 2017-11-16 20:24:33 -02:00
Rémi Verschelde a0ac0804ca
Merge pull request #12640 from poke1024/createnode-ui
In Create New Node, always select and show best (shortest) match
2017-11-05 11:51:59 +01:00
Bernhard Liebl 8f204d78fd In Create New Node, always select and show best (shortest) match 2017-11-04 20:21:41 +01:00
Bernhard Liebl a8012f1b25 Fixes random sorting order in Create New Node dialog 2017-11-04 19:01:01 +01:00
Juan Linietsky 3d87b70f7a Added the set/get_setting function in Editor/Project settings. Renamed has() to has_setting. Fixes #11844 2017-10-05 15:34:34 -03:00
toger5 3f423342f4 create dialog search preferrence fixes: #11697 2017-09-29 21:00:10 +02:00
Daniel J. Ramirez b622c92fad Removed most of the custom colors from the interface. 2017-09-25 21:43:20 -05:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Rémi Verschelde 752a116847 Merge pull request #11256 from djrm/pr_visual_improvements
Visual improvements and new look for VS
2017-09-19 23:44:09 +02:00
Daniel J. Ramirez 4cc4f5cc5d Fix non flat favorite icons 2017-09-14 11:21:56 -05:00
MillionOstrich 672a6c9680 Fix icons for custom types in the recent & favorites lists in the create dialog. 2017-09-05 14:39:44 +01:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde 8125bbba59 Merge pull request #8968 from noshyaar/pr-bug2
CreateDialog: fix activating recent item creates node selected in search result
2017-05-28 09:29:51 +02:00
Poommetee Ketson db64fcdd5f CreateDialog: fix activating recent item creates node selected in search result 2017-05-28 13:40:08 +07:00
Poommetee Ketson 9fb90d7aea CreateDialog: select root if search exactly match 2017-05-28 12:53:11 +07:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
volzhs 17e8e343fb Revert "Add new editor and default theme (WIP)"
This reverts commit f045efe007.
2017-05-03 06:19:15 +09:00
Daniel J. Ramirez f045efe007 Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Ray Koopa c0c4ba4e94 Make Create New Node dialog resizable and burninate old dialog 2017-03-18 11:21:50 +01:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00