summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.cpp
AgeCommit message (Collapse)Author
2022-06-25Add ability to export Node pointers as NodePathsreduz
This PR implements: * A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string. * The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path. * When scene is saved, the node path is saved, then restored as a pointer. NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid. Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language. Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path). Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
2022-06-10Merge pull request #59770 from fire-forge/rounded-cornersRémi Verschelde
2022-05-26Merge pull request #61387 from KoBeWi/press_to_actionRémi Verschelde
Improve style of inspector buttons
2022-05-26Merge pull request #60987 from fire-forge/vertical-moveRémi Verschelde
Use the move mouse cursor shape for the inspector array reorder button
2022-05-25Improve style of inspector buttonskobewi
2022-05-25Add rounded corners to EditorProperty and EditorSpinSliderFireForge
- Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background. - Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg. - Makes margins consistent in resource sub-inspectors. - Removes space between buttons in NodePath, Resource, and multiline string editors. - Adds space between label background and content for vertical property editors.
2022-05-24Reorganize Region Rect Editorreduz
Problem: * Region rect was pretty much a hidden editor. Because it was annoying for it to pop up automatically, it did not. * Because it did not, most users have no idea it even exists. * But because it is a transient editor, it would steal focus of other editor and annoy users. Solution: * Editor has been moved to a window. * Regions that can be edited add a button below the region which can be pressed to open the editor. This required a slight change in EditorInspectorPlugin to allow custom editors to be below others.
2022-05-22Use the "Move" mouse icon in inspector arraysFireForge
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* 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-05Disallow setting editor-only metadata in the editorRechieKho
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-04-29Fix issues when skipping l10n for script variablesHaoyu Qiu
2022-04-26Merge pull request #60367 from timothyqiu/refresh-cdRémi Verschelde
2022-04-23Rename theme properties to include underscoresFireForge
- check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
2022-04-19Reset refresh countdown if pending update tree requestHaoyu Qiu
2022-04-19Fixes incorrect display of property labels with feature tagsRindbee
Closes #60352
2022-04-05[Input] Add extra `shortcut_input` input processing step to process Unicode ↵bruvzg
character input with Alt / Ctrl modifiers, after processing of shortcuts.
2022-03-28Fix inspector group name capitalizationFireForge
2022-03-28Add property name style toggle to InspectorHaoyu Qiu
2022-03-24Refactor Object metadatareduz
* API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change. * Metadata now exposed as individual properties. * Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace. * Added the ability to Add/Remove metadata properties to the inspector. This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender.
2022-03-18Improve inspector filteringHaoyu Qiu
2022-03-13Merge pull request #59102 from rcorre/copy-project-configRémi Verschelde
2022-03-13Copy full project setting path from dialog.Ryan Roden-Corrent
The EditorProperty UI elements for project settings are created from SectionedInspector, which has a prefix added to each property path. Each EditorProperty needs to be made aware of this path so copy_property_path copies the full path, and not just the suffix. Fixes #59020.
2022-03-12Initialize bools in the headers in editorAaron Franke
2022-03-10Merge pull request #58706 from timothyqiu/property-i18nRémi Verschelde
2022-03-09Remove VARIANT_ARG* macrosreduz
* Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-05Fix color pickers closing in editor settingskobewi
2022-03-04Make EditorSpinSlider label color a theme propertyFireForge
2022-03-03i18n: Make property paths and categories translatableHaoyu Qiu
2022-02-16Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcodeRémi Verschelde
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-16Port existing _notification code to use switch statements (part 1/3)jmb462
2022-02-15Merge pull request #58125 from fire-forge/editor_property_overlap_fixRémi Verschelde
Fix EditorProperty icon overlapping text with checkbox
2022-02-13Fix EditorProperty text and icon overlap bugsFireForge
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-10Reorganize inspector layout workflow for Control nodesYuri Sizov
2022-02-09Unify array, dictionary, and inspector array editorsFireForge
2022-02-08Display built-in script names in the inspectorkobewi
2022-02-08Merge pull request #57796 from akien-mga/revert-sname-theme-settersRémi Verschelde
2022-02-08Re-add missing `SNAME` macros in `get_theme_*` callsRémi Verschelde
They were removed in the previous commit reverting the addition of `SNAME` to `add_theme_*` and theme setter methods, which is not wanted.
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-08Refactor some object type checking code with `cast_to`Rémi Verschelde
Less stringly typed logic, and less String allocations and comparisons.
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-02-06Add missing SNAME macro optimization in some function callsjmb462
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-03Merge pull request #57562 from AnilBK/string-add-containsRémi Verschelde
String: Add contains().
2022-02-04String: Add contains().Anilforextra
2022-02-03Remove get_focus_owner() from Control, replaced by ↵Gilles Roudière
get_viewport()->gui_get_focus_owner()
2022-02-02EditorHelpBit: Fix content height fit and RTL theme propagationRémi Verschelde
This reverts #51619 and fixes the issue properly, as well as enabling `fit_content_height` which is necessary following #57304. Fixes #57174. Also adds a placeholder for property and signal tooltips with no description, factoring the code while at it. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>