summaryrefslogtreecommitdiff
path: root/scene/gui/graph_edit.cpp
AgeCommit message (Collapse)Author
2022-10-19Simplify GDVIRTUAL_CALL callskobewi
2022-10-13Merge pull request #66337 from EricEzaM/sprite-framesRémi Verschelde
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-24Ensure all checks of `is_action` in the editor which are for 'shortcut' use, ↵Eric M
check the action exactly.
2022-09-19Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron
2022-09-14Add configuration warning to GraphEdit regarding future refactoringHendrik Brucker
2022-09-09Improve parameter naming and documentation in GraphEdit and GraphNodeYuri Sizov
Co-authored-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg>
2022-09-06Rename raise() to move_to_front()kobewi
2022-09-05Add GraphNode 'selected' and 'deselected' signals, simplify GraphEditMaxim Kulkin
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-28Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-27Merge pull request #62846 from ↵Rémi Verschelde
AaronRecord/remove_redundant_theme_updates_in_enter_tree Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-27Rename `hint_tooltip` to `tooltip_text` & setgetMicky
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
2022-08-25Add read-only mode to AnimationTreeEditor pluginsSaracenOne
2022-08-24Merge pull request #59226 from Rindbee/better-setters-in-gui-controlsYuri Sizov
Improve the setters in gui, return directly if the value does not change.
2022-08-23Replace Array return types with TypedArray 2kobewi
2022-08-23Add some codes, returnes directly if the value is not changed.风青山
Avoid executing the following value-changed logics if the value does not really change.
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