Commit Graph

81 Commits

Author SHA1 Message Date
ea2192b99e [doc] Use "param" instead of "code" to refer to parameters (6) 2022-08-12 12:07:53 -04:00
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
2fb69afde6 Add GraphEdit.is_node_hover_valid(...) method
This is a virtual method that can be used to add additional error
condition checks while the connection is still being dragged. If true is
returned, the connection is valid. If false is returned, the connection
is invalid and thus not possible (ie. it will not snap). The virtual
method is exposed with an underscore to scripts.
2022-07-31 15:35:26 +02:00
70c234f3e3 Improve Graphedit connection lines 2022-05-30 17:33:01 +02:00
771cb1261a Improve and fix the GraphNode port hotzones
Co-authored-by: Ansraer <jacky2611@gmail.com>
2022-05-30 15:48:58 +02:00
c84d050980 Add node list param to GraphEdit::delete_nodes_request signal 2022-05-17 13:28:21 +03:00
3073b85de9 Rename theme properties to include underscores
- 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-23 11:16:18 -05:00
507f72db8e Rename Control's Rect properties to exclude rect_ part 2022-03-08 16:30:35 +00:00
b68dd2e189 Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
b5495783b2 Merge pull request #53185 from KoBeWi/viewing_pan 2022-01-12 11:36:41 +01:00
ba7ed05792 Unify panning in sub-editors and make it configurable 2022-01-11 13:57:19 +01:00
f20ae16e0b Merge pull request #56323 from Gallilus/Update-default-port_grab_distance_vertical 2022-01-11 11:17:33 +01:00
4c5ceb1a97 Rename GraphEdit connection_drag_begun to connection_drag_started 2022-01-07 18:25:03 +01:00
0505b08a56 Add GraphEdit drag notifications
This commit adds two signals:
 * connection_drag_begun, which is emitted when a connection is started
   to be created by the user and
 * `connection_drag_ended`, which is emitted when no longer a connection
   is created.

Additionally `force_connection_drag_end()` adds the possibility to end
the connection dragging. If called from user code, no other connection
request signals are invoked. This is useful to add `GraphNode`s via
shortcuts while the user is dragging a connection to directly connect
the newly added node.
2022-01-06 17:51:40 +01:00
38ad72af44 Update default port_grab_distance_vertical 2021-12-29 19:14:28 +01:00
deb30a4108 Merge pull request #52015 from mechPenSketch/expose_hotzones2
Expose connection hot zones in `GraphNode`
2021-12-15 20:23:07 +01:00
0449b30bbc Expose connection hot zones in GraphNode 2021-12-12 15:20:40 +08:00
b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
6f929395d9 Add [theme_item] tag to editor help 2021-11-18 15:32:23 +01:00
07725b611b Add warnings to methods that give access to internal nodes 2021-10-10 22:57:58 +03:00
d54f2ad7ca Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_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-23 08:10:13 -03:00
e9ef6f9815 Refactor GraphEdit connections
Remove duplicate bezier code and use Curve instead.
Add an overridable method for retrieving the points of a connection line, which
makes it posible to create custom connections lines.
2021-08-21 22:15:26 +02:00
61904d56ea Better port handling connection for GraphEdit 2021-08-12 09:09:24 +03:00
12fc3f1eef Automatic arrangement of nodes in VisualScript/VisualShaders editors
This PR and commit adds the functionality to arrange nodes in VisualScript/VisualShader editor. The layout generated by this 
feature is compact, with minimum crossings between connections
& uniform horizontal & vertical gaps between the nodes. 

This work has been sponsored by GSoC '21.

Full list of additions/changes:
• Added arrange_nodes() method in GraphEdit module.
    • This method computes new positions for all the selected
      nodes by forming blocks and compressing them.
      The nodes are moved to these new positions. 
    • Adding this method to GraphEdit makes it available for 
      use in VisualScript/VisualShaders editors and its other
      subclasses. 
• Button with an icon has been added to call arrange_nodes() in GraphEdit. 
    • This button is inherited by VisualScript/VisualShaders editors
       to invoke the method.
• Undo/redo is functional with this method.
    • By using signals in arrange_nodes(), position changes are registered 
       in undo/redo stack of the subclass that is using the method. 
• Metadata of the method has been updated in ClassDB
• Method description has been added to class reference of GraphEdit
2021-08-11 00:44:28 +05:30
bf2839ea3e Add theme item descriptions to the online documentation 2021-08-04 22:27:10 +03:00
7adf4cc9b5 doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
0a82a669e3 Make zoom limits and step adjustable in GraphEdit 2021-06-16 16:39:18 +03:00
8455e901f3 class reference proofreading 2021-03-19 13:21:20 +01:00
215d18814e doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
7b293eddfb Rename unselect to deselect 2020-12-21 10:26:41 +00:00
52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00
999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
41af228b76 Merge pull request #36960 from pycbouh/docs-improve-shortcuts
Improve shortcut formatting in docs
2020-04-29 09:40:52 +02:00
b7b46093d8 doc: Sync classref with current source
Add missing enum bindings.
2020-04-20 11:48:00 +02:00
1ea7295bd2 Improve shortcut formatting in docs 2020-04-10 18:42:11 +03:00
e103f21a40 Add LOTS of missing docs 2020-03-13 16:35:03 +01:00
fea37cfb52 doc: Sync classref with StringName/Callable changes 2020-02-22 14:59:09 +01:00
0e3d625737 doc: Sync classref with current source
Lots of internal API changes and some docstrings were lost in the conversion.
I manually salvaged many of them but for all the rendering-related ones, an
additional pass is needed.

Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-12 12:37:13 +01:00
57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
1b26205b25 Merge pull request #34901 from YeldhamDev/multiple_doc_completions
Complete docs for GraphEdit/Node and PopupMenu
2020-01-08 07:36:36 +01:00
8b5992f665 Make possible to edit the GraphEdit's selection rect colors 2020-01-07 23:20:48 -03:00
b81843ee6c Complete docs for GraphEdit/Node and PopupMenu 2020-01-07 22:05:32 -03:00
c64c46db1d doc: Sync classref with current source 2019-12-17 11:43:07 +01:00
59937e1c54 Updated get_zoom_hbox() documentation. 2019-12-14 14:02:15 +00:00