Commit Graph

341 Commits

Author SHA1 Message Date
a124f1effe Fix various typos
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-02 01:03:58 -05:00
0af3d6b990 Fixed a invalidation of sets and out of range in the _horizontal_alignment function
Fixed start index (to the second half element)

Fixed out of range when size is equal 1
2022-01-02 00:21:36 +05:00
7d37f76241 Use GDVIRTUAL* macros when binding virtual methods in exposed classes 2021-12-29 20:27:44 +03: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
41a20171eb align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
81efebb3a1 Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
840225bdb1 Making nodes enclosed within comment move with the comment node 2021-11-15 10:59:07 +05:30
3c0fdcc8ac Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
bdbb7b3999 Remove EDSCALE dependency from /scene/gui 2021-10-04 15:25:08 +03:00
fc9767abb1 Use functions defined in the their classes. 2021-09-29 09:36:34 +05:45
cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
88b347dc27 Merge pull request #51920 from jmb462/missing-sname-macro-optimization-in-some-functions 2021-09-23 13:14:20 +02:00
645dc40cba Fix error when moving graph node 2021-09-14 16:09:33 +02:00
a913ae8d56 Add support for internal nodes 2021-08-28 02:07:23 +02: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
856d0b52e5 Fix GraphEdit connection colors 2021-08-22 21:09:16 +02:00
7c1181116f Make GraphEdit connections consistent on zoom 2021-08-22 11:08:37 +02:00
51800eebc6 Merge pull request #51965 from theoway/fix_node_arranger_origin_bug
Fixes position offset of node groups set by arrange_nodes() in GraphEdit
2021-08-22 01:52:30 -07:00
aee3de7b79 Fixes position offset of node groups set by arrange_nodes() in GraphEdit 2021-08-22 03:57:58 +05:30
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
54de7114c5 Add missing SNAME macro optimization for StringName in some functions 2021-08-20 14:50:24 +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
ac3322b0af Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
452e10ba7b Remove clips_input() method and use clip_content 2021-06-25 15:46:37 +02:00
13ba788b63 Scrollwheel (w/o ctrl) to zoom, mouse warping when panning
Now uses Ctrl + Scrollwheel for vertical scrolling
Ctrl + Shift Scrollwheel for horizontal scrolling
Also converts some macros to constants
2021-06-17 08:21:32 -06:00
0a82a669e3 Make zoom limits and step adjustable in GraphEdit 2021-06-16 16:39:18 +03:00
e479abeb98 Merge pull request #49437 from Calinou/graphedit-allow-higher-lower-zoom-values
Allow higher and lower maximum zoom values in GraphEdit
2021-06-15 15:18:17 +02:00
f38fe846f4 Move default values from definition to declaration in GraphEdit 2021-06-10 17:22:56 +01:00
74c584472c Allow higher and lower maximum zoom values in GraphEdit
Low zoom values result in unreadable text, but it can still be
useful for previewing purposes.

Eventually, characters could be replaced by rectangles at very low
zoom levels to improve the visual appearance.
2021-06-08 20:33:07 +02:00
97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
d514949755 Make scrollwheel zoom based on mouse position 2021-04-05 23:00:56 -06:00
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
b253aca53f Merge pull request #47351 from volzhs/graphedit-boxselection
Fix drawing boxselection on GraphEdit
2021-03-28 20:56:07 +02:00
990c88f24c Fix typo 'previus_selected' 2021-03-25 20:08:38 +09:00
1bdc14acea Fix drawing boxselection on GraphEdit 2021-03-25 13:21:34 +09:00
10d7fccb54 Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
045f55ec00 Prevent resizing minimap bigger than GraphEdit (Fix #47189)
Minimap size couldn't be resized back after been resized bigger than GraphEdit cause the grabber was out of GraphEdit.
This commit prevents resizing minimap bigger than GraphEdit and fix this issue.
2021-03-20 15:09:50 +01:00
d752482e7a Enable zooming graph_edit with scrollwheel 2021-03-18 18:34:29 -06:00
2ff1c48e0c Properly hide GraphEdit's minimap 2021-03-01 18:19:48 +03:00
e3131adc1c Fix GraphEdit connects when graph is zoomed/unzoomed 2021-02-27 20:26:35 +03:00
49714b0963 Removed hardcoded shortcuts from /scene and converted to input actions
This removes hardcoded actions from things like LineEdit and TextEdit.

Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
604188c411 Merge pull request #45870 from gongpha/graphedit-connection-update
Update GraphEdit when GraphNode's slot is updated
2021-02-11 13:11:50 +01:00
fe6c8d48e6 Update GraphEdit when GraphNode's slot is updated 2021-02-11 01:07:54 +07:00
7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
69152af45d doc: Don't bind argument names with p_ prefix
This prefix is used in the C++ codebase, not in the scripting API.
2021-02-04 14:45:06 +01:00
9d9d0f0bc9 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:07 +03:00