summaryrefslogtreecommitdiff
path: root/scene/gui/graph_edit.cpp
AgeCommit message (Collapse)Author
2022-08-12fixed GraphEdit signal argument typedaylilyzeleen
2022-08-04Fix GraphEdit::arange_nodes causing a freezetefusion
When a Graph contains cycles, e.g. 1->2->3->1 _layering would end up in an infinite loop since IS_SUBSET would never be true. By keeping check of the size of z, which contains the already layered nodes, one can detect a freeze (since it should change after current_layer increases. If it doesn't "u" didn't change and q and u will never be equal resulting in a freeze/infinite while loop). If a freeze happens warn the user and put all the nodes part of the cycle (leftover in p) to the first layer which will end up in them being listed top to bottom.
2022-07-31 Add GraphEdit.is_node_hover_valid(...) methodJohannes Witt
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-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-18Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-06-02Fix enclosed nodes calculation of GraphEdit comment nodesHendrik Brucker
2022-05-30Improve Graphedit connection linesHendrik Brucker
2022-05-30Improve and fix the GraphNode port hotzonesHendrik Brucker
Co-authored-by: Ansraer <jacky2611@gmail.com>
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-17Add node list param to `GraphEdit::delete_nodes_request` signalYuri Rubinsky
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-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
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-11Fix toggling GraphEdit's minimap with `minimap_enabled`Eric McGuirk
Fixes #53831.
2022-04-11Fix GraphEdit's valid connections being reversedkobewi
2022-03-12popup_request signal emits mouse click positionFazil Babu
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-01-29simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke
2022-01-23Minor tweaks and fixes to panningkobewi
2022-01-21Add ViewPanner to 2D editorkobewi
2022-01-11Unify panning in sub-editors and make it configurablekobewi
2022-01-07Merge pull request #56575 from HaSa1002/drag-signal-beganRémi Verschelde
Rename GraphEdit `connection_drag_begun` to `connection_drag_started`
2022-01-07Rename GraphEdit connection_drag_begun to connection_drag_startedJohannes Witt
2022-01-07Merge pull request #56321 from pycbouh/core-use-gdvirtual-everywhereRémi Verschelde
2022-01-06Add `GraphEdit` drag notificationsJohannes Witt
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-04Merge pull request #56347 from NNesh/fix/graph_editor_out_of_range_alignmentRémi Verschelde
Fixed an invalidation of sets and out of range for an alignment
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2022-01-02Fixed a invalidation of sets and out of range in the _horizontal_alignment ↵NNesh
function Fixed start index (to the second half element) Fixed out of range when size is equal 1
2021-12-29Use GDVIRTUAL* macros when binding virtual methods in exposed classesYuri Sizov
2021-12-15Merge pull request #52015 from mechPenSketch/expose_hotzones2Rémi Verschelde
Expose connection hot zones in `GraphNode`
2021-12-12Expose connection hot zones in GraphNodemechPenSketch
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-12-06Fix bad popups offset in editor with single window offjmb462
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com> Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-11-15Making nodes enclosed within comment move with the comment nodeUmang Kalra
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-04Remove EDSCALE dependency from /scene/guiYuri Sizov
2021-09-29Use functions defined in the their classes.Anilforextra
2021-09-23Construct values only when necessary.Anilforextra
2021-09-23Merge pull request #51920 from ↵Rémi Verschelde
jmb462/missing-sname-macro-optimization-in-some-functions
2021-09-14Fix error when moving graph nodekobewi
2021-08-28Add support for internal nodeskobewi
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-22Fix GraphEdit connection colorsJummit
2021-08-22Make GraphEdit connections consistent on zoomJummit
2021-08-22Merge pull request #51965 from theoway/fix_node_arranger_origin_bugK. S. Ernest (iFire) Lee
Fixes position offset of node groups set by arrange_nodes() in GraphEdit
2021-08-22Fixes position offset of node groups set by arrange_nodes() in GraphEditUmang Kalra
2021-08-21Refactor GraphEdit connectionsJummit
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.