Commit graph

104 commits

Author SHA1 Message Date
Michael Alexsander
5643d2e3fe Small naming and tooltip tweaks 2020-07-23 20:17:43 -03:00
Andy Maloney
4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
Andrii Doroshenko (Xrayez)
b399097ecc Fix editor crash when creating a custom resource from create dialog 2020-07-06 13:53:02 +03:00
Stijn Hinlopen
85ced4746f Improve Create Dialog search ranking and refactor calculation.
Code changes:
 - Improved search ranking with various features (position in type string, string length proportion, in favorite list, in recent list).
 - Recent items are now stored in an ItemList (no visual change).
 - Removed results that had a parent that matched the search term to improve clarity.

Performance:
 - Reduce types to process upon opening the dialog (instead of every search change), reduces number of types by 4~5.
 - Clear arrays after closing dialog instead of keeping them.
 - Various other optimizations.
2020-07-03 15:06:23 +02:00
Hugo Locurcio
31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Rémi Verschelde
b3bc5aafc5 Object: Add usage hint to instantiate Object properties in editor
Fixes #36372 as Path2D/Path3D's `curve` property no longer uses a Curve
instance as default value, but instead it gets a (unique) default Curve
instance when created through the editor (CreateDialog).

ClassDB gets a sanity check to ensure that we don't do the same mistake
for other properties in the future, but instead use the dedicated
property usage hint.

Fixes #36372.
Fixes #36650.

Supersedes #36644 and #36656.

Co-authored-by: Thakee Nathees <thakeenathees@gmail.com>
Co-authored-by: simpuid <utkarsh.email@yahoo.com>
2020-06-12 14:30:18 +02:00
Tomasz Chabora
22f0de8a83 Fix custom types in node list search 2020-06-11 22:06:32 +02:00
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