summaryrefslogtreecommitdiffstats
path: root/scene/gui/graph_edit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify GDVIRTUAL_CALL callskobewi2022-10-191-5/+3
|
* Merge pull request #66337 from EricEzaM/sprite-framesRémi Verschelde2022-10-131-4/+4
|\ | | | | | | Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
| * Ensure all checks of `is_action` in the editor which are for 'shortcut' use, ↵Eric M2022-09-241-4/+4
| | | | | | | | check the action exactly.
* | Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-3/+3
|/ | | | change warnings=all to use /W4.
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* Add configuration warning to GraphEdit regarding future refactoringHendrik Brucker2022-09-141-0/+8
|
* Improve parameter naming and documentation in GraphEdit and GraphNodeYuri Sizov2022-09-091-31/+31
| | | | Co-authored-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg>
* Rename raise() to move_to_front()kobewi2022-09-061-1/+1
|
* Add GraphNode 'selected' and 'deselected' signals, simplify GraphEditMaxim Kulkin2022-09-051-47/+41
|
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-63/+63
| | | | | | | | | | 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`.
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()`).
* Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde2022-08-281-6/+6
|\ | | | | Rename `hint_tooltip` to `tooltip_text` & setter getter
| * Rename `hint_tooltip` to `tooltip_text` & setgetMicky2022-08-271-6/+6
| | | | | | | | | | | | | | | | `hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
* | Merge pull request #62846 from ↵Rémi Verschelde2022-08-271-1/+0
|\ \ | | | | | | | | | | | | AaronRecord/remove_redundant_theme_updates_in_enter_tree Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
| * | Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-1/+0
| |/
* / Add read-only mode to AnimationTreeEditor pluginsSaracenOne2022-08-251-23/+55
|/
* Merge pull request #59226 from Rindbee/better-setters-in-gui-controlsYuri Sizov2022-08-241-0/+15
|\ | | | | Improve the setters in gui, return directly if the value does not change.
| * Add some codes, returnes directly if the value is not changed.风青山2022-08-231-0/+15
| | | | | | | | Avoid executing the following value-changed logics if the value does not really change.
* | Replace Array return types with TypedArray 2kobewi2022-08-231-2/+2
|/
* fixed GraphEdit signal argument typedaylilyzeleen2022-08-121-1/+1
|
* Fix GraphEdit::arange_nodes causing a freezetefusion2022-08-041-1/+14
| | | | | | | | | | | | 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.
* Add GraphEdit.is_node_hover_valid(...) methodJohannes Witt2022-07-311-0/+15
| | | | | | | | 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.
* Remove Signal connect bindsJuan Linietsky2022-07-291-3/+3
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge2022-07-181-1/+1
|
* Add suffixes to all nodes and resourcesFireForge2022-06-111-4/+4
|
* Fix enclosed nodes calculation of GraphEdit comment nodesHendrik Brucker2022-06-021-1/+4
|
* Improve Graphedit connection linesHendrik Brucker2022-05-301-4/+27
|
* Improve and fix the GraphNode port hotzonesHendrik Brucker2022-05-301-31/+49
| | | | Co-authored-by: Ansraer <jacky2611@gmail.com>
* Add a new HashSet templatereduz2022-05-201-15/+18
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-34/+34
|
* Add node list param to `GraphEdit::delete_nodes_request` signalYuri Rubinsky2022-05-171-2/+14
|
* Replace most uses of Map by HashMapreduz2022-05-161-23/+23
| | | | | | | | | | | | * 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!
* Add a new HashMap implementationreduz2022-05-121-11/+11
| | | | | | | | | | | | | | | | | 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<>
* Rename theme properties to include underscoresFireForge2022-04-231-4/+4
| | | | | | | | | | | | | | - 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
* Fix toggling GraphEdit's minimap with `minimap_enabled`Eric McGuirk2022-04-111-0/+1
| | | | Fixes #53831.
* Fix GraphEdit's valid connections being reversedkobewi2022-04-111-14/+5
|
* popup_request signal emits mouse click positionFazil Babu2022-03-121-1/+1
|
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-58/+62
|
* simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke2022-01-291-2/+4
|
* Minor tweaks and fixes to panningkobewi2022-01-231-1/+1
|
* Add ViewPanner to 2D editorkobewi2022-01-211-4/+14
|
* Unify panning in sub-editors and make it configurablekobewi2022-01-111-21/+39
|
* Merge pull request #56575 from HaSa1002/drag-signal-beganRémi Verschelde2022-01-071-5/+5
|\ | | | | Rename GraphEdit `connection_drag_begun` to `connection_drag_started`
| * Rename GraphEdit connection_drag_begun to connection_drag_startedJohannes Witt2022-01-071-5/+5
| |
* | Merge pull request #56321 from pycbouh/core-use-gdvirtual-everywhereRémi Verschelde2022-01-071-6/+8
|\ \ | |/ |/|
| * Use GDVIRTUAL* macros when binding virtual methods in exposed classesYuri Sizov2021-12-291-6/+8
| |
* | Add `GraphEdit` drag notificationsJohannes Witt2022-01-061-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #56347 from NNesh/fix/graph_editor_out_of_range_alignmentRémi Verschelde2022-01-041-3/+3
|\ \ | | | | | | Fixed an invalidation of sets and out of range for an alignment
| * | Fixed a invalidation of sets and out of range in the _horizontal_alignment ↵NNesh2022-01-021-3/+3
| |/ | | | | | | | | | | | | | | function Fixed start index (to the second half element) Fixed out of range when size is equal 1
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!