summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
AgeCommit message (Collapse)Author
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-19Fix crash in Create New Node dialog with certain user-created scriptsHaoyu Qiu
2022-02-16Port existing _notification code to use switch statements (part 1/3)jmb462
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-08Merge pull request #40140 from hinlopen/tree-scroll-centerRémi Verschelde
2022-02-08Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. 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-08Merge pull request #43015 from Xrayez/refactor-auto-instapropRémi Verschelde
Refactor auto-instantiation of `Object` properties in editor
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-02-05Center when scrolling to tree item.Stijn Hinlopen
2022-02-02Vectors: Use clear() and has().Anilforextra
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-17Merge pull request #55509 from V-Sekai/create_node_and_doc_fixRémi Verschelde
Fix crashes when global named scripts extends an unnamed script
2022-01-16Fix theming update in several editor classesYuri Roubinsky
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-28Refactor auto-instantiation of `Object` properties in editorAndrii Doroshenko (Xrayez)
Auto-instantiation is used by the create dialog, but should also be used by the editor inspector. This refactors object properties auto-instantiation into a dedicated method to be reused throughout editor (and possibly scripting).
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-07Fix error emitting when called new shader dialog from resource dialogYuri Roubinsky
2021-12-01Properly handle named class types inheriting from scripts without names.SaracenOne
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-12Use "enum class" for input enumsAaron Franke
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-20Merge pull request #50505 from Calinou/editor-create-dialog-display-class-nameRémi Verschelde
Display the class name in the description
2021-07-18Optimize StringName usagereduz
* 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-16Display the class name in the descriptionHugo Locurcio
- Display a placeholder if no description is available. - Display a message if the search didn't return any results.
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-12Consistently prefix bound virtual methods with _kobewi
2021-04-27Improve the editor themeHugo Locurcio
The editor theme now makes use of rounded corners and less borders to follow modern visual trends. The default theme's colors were also tweaked to make the blue hue more subtle (similar to the Arc theme, which was removed as a consequence). The Alien theme was replaced by a Breeze Dark theme, which should blend in well with the KDE theme.
2021-03-01Merge pull request #41437 from KoBeWi/put_it_hereRémi Verschelde
Allow to create a node at specific position
2021-02-26Allow to create a node at specific positionTomasz Chabora
2021-02-17Change fallback icon for abstract nodes to have a grayed out colorAaron Franke
2021-01-06Fix cases of resources destroyed too earlyPedro J. Estébanez
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-21Rename unselect to deselectMarcel Admiraal
2020-12-14Rename AcceptDialog get_ok() to get_ok_button()Marcel Admiraal
Also renames: - AcceptDialog add_cancel() to add_cancel_button() - ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-07-23Small naming and tooltip tweaksMichael Alexsander
2020-07-21Fix spelling & grammar in comments, docs, and messagesAndy Maloney
2020-07-06Fix editor crash when creating a custom resource from create dialogAndrii Doroshenko (Xrayez)
2020-07-03Improve Create Dialog search ranking and refactor calculation.Stijn Hinlopen
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-06-19Remove ToolButton in favor of ButtonHugo Locurcio
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-12Object: Add usage hint to instantiate Object properties in editorRémi Verschelde
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-11Fix custom types in node list searchTomasz Chabora
2020-05-27Add fallback icons and make custom ones appear in the recent/favorites list ↵Michael Alexsander
in the "Create New" dialog
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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-04-02Replace NULL with nullptrlupoDharkael