Commit graph

159 commits

Author SHA1 Message Date
Hugo Locurcio 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
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Lightning_A d514949755 Make scrollwheel zoom based on mouse position 2021-04-05 23:00:56 -06:00
Rafał Mikrut 504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Rémi Verschelde b253aca53f
Merge pull request #47351 from volzhs/graphedit-boxselection
Fix drawing boxselection on GraphEdit
2021-03-28 20:56:07 +02:00
volzhs 990c88f24c Fix typo 'previus_selected' 2021-03-25 20:08:38 +09:00
volzhs 1bdc14acea Fix drawing boxselection on GraphEdit 2021-03-25 13:21:34 +09:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
jmb462 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
Lightning_A d752482e7a Enable zooming graph_edit with scrollwheel 2021-03-18 18:34:29 -06:00
Yuri Sizov 2ff1c48e0c Properly hide GraphEdit's minimap 2021-03-01 18:19:48 +03:00
Yuri Roubinsky e3131adc1c Fix GraphEdit connects when graph is zoomed/unzoomed 2021-02-27 20:26:35 +03:00
Eric M 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
Rémi Verschelde 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
Kongfa Waroros fe6c8d48e6 Update GraphEdit when GraphNode's slot is updated 2021-02-11 01:07:54 +07:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde 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
Yuri Sizov 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
Yuri Sizov 5e8e9fc601 Prevent signal disconnection attempts on invalid references 2021-01-14 15:19:32 +03:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde feb4e5ed2c
Merge pull request #44569 from madmiraal/rename-unselect-deselect
Rename unselect to deselect
2020-12-28 14:53:43 +01:00
Marcel Admiraal dc8c29ee95 Update GraphEdit connection to reflect new signal name 2020-12-26 09:48:40 +00:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Marcel Admiraal 7b293eddfb Rename unselect to deselect 2020-12-21 10:26:41 +00:00
Yuri Roubinsky 52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
Yuri Sizov f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00
Yuri Sizov 999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
Yuri Roubinsky 3ec972fc95 Restored antialiased lines by emulation using triangle strips 2020-11-27 20:45:59 +03:00
Yuri Roubinsky 4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
Gabriel Van Eyck fbc095dc78 Fix emit_signal timing for GraphEdit's begin/end node move 2020-10-19 18:25:07 -07:00
Duroxxigar b687ace7f9 Renamed toplevel to be top_level 2020-10-01 03:17:33 -04:00
Wilson E. Alvarez d370ae9e1f
Disconnect item_rect_changed when removing a child of GraphEdit 2020-09-11 17:37:20 -04:00
Maganty Rushyendra c1d5c7727c Emit signals for GraphEdit multi-node selection and unselection
Emit `node_selected` and `node_deselected` signals where appropriate
when selecting or unselecting multiple GraphEdit nodes at once.
2020-07-09 19:15:27 +08:00
Yuri Roubinsky d131bbaf15 Fix GraphEdit reconnecting to disconnected port 2020-07-05 09:47:58 +03:00
Yuri Roubinsky de1117f5ad Prevents incorrect connection attempt on port clicking in GraphEdit
Prevents incorrect connection attempt on port clicking in GraphEdit
2020-07-04 08:05:37 +03:00
Hugo Locurcio 31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
smartin015 00457c68bc Remove get_local_mouse_position() hack in GraphEdit 2020-05-16 13:22:52 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Aaron Franke 540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
asheraryam 67c98cb438 Add "node_unselected" signal for GraphEdit 2020-04-15 18:06:21 +03:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00