Commit graph

570 commits

Author SHA1 Message Date
Eric M 7941235e06 Add is_valid() check for InputEventKey in CanvasItemEditor. 2020-11-23 21:52:15 +10:00
Eric M efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Haoyu Qiu 381ba7d554 Fixes rotation in select mode on macOS 2020-11-18 18:16:22 +08:00
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Rémi Verschelde a3396fabd5
Merge pull request #42995 from Ev1lbl0w/bugfix-zoom-visibility
Fix visibility issue with zoom label
2020-10-26 11:15:50 +01:00
Ev1lbl0w 0a581a39d4
Fix visibility issue with zoom label 2020-10-26 09:44:17 +00:00
Hugo Locurcio 996740de43
Improve undo log messages in the 2D editor for additional context
Undo/redo log messages will now specify the modified node's
name (or number of modified nodes if several were modified).
On top of that, the new position/rotation/scale/pivot offset
will also be mentioned in the message.
2020-10-19 18:59:52 +02:00
Yuri Roubinsky 1c546fdaea Changes 'always show grid' hotkey to prevent conflict with 'pan mode' 2020-10-15 17:30:43 +03:00
Rémi Verschelde 19f72beebb
Merge pull request #42451 from Duroxxigar/rename-toplevel
Renamed toplevel to be top_level
2020-10-02 10:57:23 +02:00
Gilles Roudière 6dd19af439 Fix scale cursor rotation and handle diagonal ones 2020-10-01 12:19:45 +02:00
Duroxxigar b687ace7f9 Renamed toplevel to be top_level 2020-10-01 03:17:33 -04:00
Hugo Locurcio 95773bb3c1
Make the pressed autokey icon red to emphasize its "recording" status 2020-09-29 23:22:21 +02:00
Rémi Verschelde c12fc4fa04
Merge pull request #42373 from groud/draw_selection_last
Draw selected item on top of everything else
2020-09-27 19:55:48 +02:00
Gilles Roudière 16532f51ef Draw selected item on top of everything else 2020-09-27 18:47:38 +02:00
Gilles Roudière 8e6da0b808 Fix error when dragging anchors with parent's size == 0 2020-09-27 17:44:06 +02:00
bruvzg 80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
SekoiaTree 603febdbfe Fixed node scaling arrows being wrong
Patch for #21755. Node scaling arrows pointed the wrong way when nodes were rotated. Ammend: made math cleaner.

Simplified expression

Changes suggested by Aaron Franke

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-08-25 09:50:15 +02:00
Rémi Verschelde 5671469724
Merge pull request #37336 from dreamsComeTrue/canvas-editor-change-cursor
Request immediate refresh of cursor in 2D editor while using shortcuts
2020-07-23 09:49:48 +02:00
Tomasz Chabora e44c9101da Prevent multiple Controls moving inside container 2020-07-20 13:22:13 +02:00
Rémi Verschelde 817062f8ec
Merge pull request #40297 from jiteshvm/texture-dialog-size
change minimum horizontal size from 200 to 240
2020-07-13 18:02:47 +02:00
Jitesh a8905b2a4e change minimum horizontal size from 200 to 240 2020-07-11 12:21:45 -07:00
Michael Alexsander 26381265b8 Prefer the highlight version of the "GuiTabIcon" icon for buttons, and make their width/height equal 2020-07-11 12:59:25 -03:00
Rémi Verschelde b740f645f7
Merge pull request #39754 from akien-mga/canvasitemeditor-fix-dropped-scenes-position
CanvasItemEditor: Fix losing position for drag'n'dropped scenes
2020-06-26 20:54:00 +02:00
Rémi Verschelde 75c91707a4
Merge pull request #39482 from asmaloney/fix-scrollwheel-zoom-macos
[macOS] Control key + scroll wheel should zoom not pan
2020-06-25 11:22:08 +02:00
Rémi Verschelde a403131a25 CanvasItemEditor: Fix losing position for drag'n'dropped scenes
Fixes #26549.
Supersedes #36309.
2020-06-22 14:18:45 +02:00
Rémi Verschelde e773664f26
Merge pull request #39687 from Calinou/2d-editor-shift-horizontal-scroll
Scroll horizontally when holding Shift with Scroll to Pan enabled
2020-06-20 11:55:59 +02: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
Hugo Locurcio 84e1c5e4c3
Scroll horizontally when holding Shift with Scroll to Pan enabled
This closes https://github.com/godotengine/godot-proposals/issues/1077.
2020-06-19 19:27:33 +02:00
Andy Maloney 031165b345 [macOS] Control key + scroll wheel should zoom not pan
Together with godotengine/godot#39395 for 3.2.x, this fixes godotengine/godot#32520
2020-06-18 10:20:20 -04:00
johan fea6ca20c9 2D Editor: modified zoom increment to the twelveth root of two
- properly visit power of 2 factors (50%, 100%, 200%...)
- index based zoom values to prevent floating point issues
- Fix 2d editor not able to reach min and max zoom values
2020-06-04 21:48:55 -04:00
Aaron Franke 8f85858224
Change OK text in snap dialog to OK 2020-06-03 10:55:03 -04:00
Rémi Verschelde 1620669f4e
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
2020-05-29 12:10:37 +02:00
Andrii Doroshenko (Xrayez) 69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
Rémi Verschelde 28b33718b0 Add shortcut for Pan Mode (G)
And change TileMap Bucket Fill shortcut to (B).

Fixes #8582.
2020-05-26 15:31:32 +02:00
Dominik 'dreamsComeTrue' Jasiński 03b54f8a35 Fix moving 2D node with mouse after using arrow keys
Fixes: #38894
2020-05-21 14:50:35 +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
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +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
Eric M 7f5fb73146 Added selection outline to locked nodes. 2020-04-15 22:03:12 +10:00
Marcus Elg 795cba2d73 Relative scale snapping 2D 2020-04-13 10:16:54 +02:00
Rémi Verschelde 59d44ee872
Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
2020-04-03 15:53:35 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Michael Alexsander 0c6851ae53 Rename ViewportContainer to SubViewportContainer 2020-04-01 16:11:44 -03:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Juan Linietsky eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
Dominik 'dreamsComeTrue' Jasiński 55e5fa427a Request immediate refresh of cursor in 2D editor while using shortcuts
Fixes: #37333
2020-03-26 21:35:12 +01:00
Juan Linietsky c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +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 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
johan 1c02906a6f Editor 2D: Change pixel alignment strategy, fix jittering in high zoom
Alignment of scene pixels on screen pixel ensure a crisp rendering of small features (such as text). Unfortunately, alignment of top left pixel on screen adds a lot of jittering when zooming at high zoom factor.

This change allow to snap the top left scene pixel on the closest screen pixel (not only the top-left most), and we do so only when the scale factor is an integer.
2020-03-18 12:37:14 -04:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 1500e40ccf
Merge pull request #36887 from MCrafterzz/relativeSnap
Made snap relative work on rotation as well
2020-03-10 10:17:42 +01:00
Marcus Elg 97a07bada7 Made snap relative work on rotation as well 2020-03-09 17:00:47 +01:00
Fabio Alessandrelli 540ca05a80 Threaded networking for editor debugger. 2020-03-08 12:16:09 +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 cb91f8d971
Merge pull request #36406 from nathanwfranke/revert-fix-signal-errors
Partial revert "Fix two signal errors"
2020-02-29 12:11:53 +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
bruvzg 1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
nathanwfranke ad15edbc65 Partial revert "Fix two signal errors"
This partially reverts commit a31bc1b0ba.

Possible compatibility issues with #35864 that I am not sure about.

Do I need to change "connect" to "connect_compat"?
2020-02-23 15:04:45 -06:00
Rémi Verschelde 2cf6ac6c50 Replace FALLTHROUGH macro by C++17 [[fallthrough]]
This attribute is now part of the standard we target so we no longer
need compiler-specific hacks.

Also enables -Wimplicit-fallthrough for Clang now that we can properly
support it. It's already on by default for GCC's -Wextra.

Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-23 00:52:50 +01:00
Fabio Alessandrelli cbc450c0e5 Huge Debugger/EditorDebugger refactor. 2020-02-21 11:12:03 +01:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
nathanwfranke a31bc1b0ba Fix two signal errors
Update
2020-02-19 15:22:34 -06:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky cf8c679a23 ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits. 2020-02-12 14:24:54 -03:00
Juan Linietsky e1b3444415 Bugfixes and ability to better specify filter and repeat modes everywhere.
Removes antialiased flag for draw_* methods.
2020-02-11 11:53:28 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde 12244c46ae
Merge pull request #36086 from KoBeWi/TOOL_MOVE_move
Allow to use arrow keys with TOOL_MOVE
2020-02-11 09:21:10 +01:00
Tomasz Chabora cfa9060f8b Fix selectable locked items 2020-02-11 00:01:10 +01:00
Tomasz Chabora 18918b4efa Allow to use arrow keys with TOOL_MOVE 2020-02-10 21:39:05 +01:00
Gilles Roudière b66d45d986 Fixes a crash in the 2D editor 2020-02-10 18:27:13 +01:00
Rémi Verschelde 8cd5102c65
Merge pull request #35704 from KoBeWi/free_the_nodes
Include locked nodes on selection list
2020-02-10 14:29:21 +01:00
Tomasz Chabora de77bda605 Include locked nodes on selection list 2020-02-10 13:59:24 +01:00
Rémi Verschelde 8cb2de5243
Merge pull request #33451 from MCrafterzz/movementHandle
Added movement handles to 2D
2020-02-09 22:19:32 +01:00
Hugo Locurcio 3e95b79b65
Update the zoom percentage when using Frame Selection in the 2D editor
This closes #36019.
2020-02-08 18:29:28 +01:00
MCrafterzz 812fea7ccd Changed transformation handles y arrow to match positive y 2020-02-07 09:07:46 +01:00
Tan Wang Leng ee2f406c73 Fix wrong guideline values shown during dragging
Suppose that the user wants to use some guidelines in 2D mode. The
user has enabled "Use Pixel Snap", and configured the "Grid Step" to
1px.

On some zoom levels, when dragging the guidelines step by step, some
offsets shows the wrong value. The offsets that are wrong vary - it is
affected by the zoom level, so some zoom levels do not display this
problem.

For example, a user may see this while dragging the guideline:

0px   1px   1px   3px   4px   5px   5px   7px   8px

whereby 2px and 6px are missing.

This is due to a floating-point error. The values are printed as
(truncated) integers, but they are actually decimals, so they were
actually 1.9999 and 5.9999 for the missing cases.

Let's fix that by rounding up the values before printing them to get rid
of the errors.

This fixes #35010.
2020-01-24 23:52:43 +08:00
William Tumeo cb3fcba99f Use an icon in the top Animation Key menu 2020-01-22 17:06:40 -03:00
Rémi Verschelde c3fd1012de
Merge pull request #35351 from ericrybick/32342-Resize-snapping-lines-bug
Fix editor drawing snapping lines for wrong edge/corner when resizing elements with smart snapping enabled
2020-01-20 12:57:44 +01:00
Eric Rybicki b91b26d073 Fix editor drawing snapping lines for wrong edge/corner when resizing elements with smart snapping enabled
fixes #32342
2020-01-20 08:03:20 +01:00
Hugo Locurcio c9aca9ef81
Clamp the editor scale to 1 when resetting zoom in the 2D editor
This closes #35294.
2020-01-18 22:26:21 +01:00
Rémi Verschelde 05e042b06f
Merge pull request #34879 from Phischermen/canvas-item-editor-local-space-mode
Fix issue regarding rotating Canvas Items in editor
2020-01-16 23:10:41 +01:00
Phischermen becd1fd1d8 Fix issue regarding rotation
Canvas items will now rotate correctly no matter what their global scale happens to be.
2020-01-14 07:26:34 -08:00
Michael Alexsander 712cd8a97e Fix more instances of overlapping scrollbars 2020-01-13 22:49:17 -03:00
Hugo Locurcio 929dfe1bcc
Clamp the editor scale to 1 for 2D zoom operations
Some people set the editor scale below 1 to fit more content on
screen, even if their display doesn't have a particularly low DPI.

This closes #35059.
2020-01-13 12:16:27 +01:00
Rémi Verschelde 41c8ec991f
Merge pull request #34802 from xelivous/power-of-two-is-good
Change the 2D editor's snap to 8x8 by default
2020-01-08 08:51:58 +01:00
Hugo Locurcio 948cb84e37
Take the editor scale into account for 2D zoom operations
The zoom level displayed is now relative to the editor scale.
This means that with an editor scale of 200%, the 100% zoom level
will actually be 200% as it's multiplied by the editor scale.
This prevents things from looking too small when opening a project
on an hiDPI display.

This matches the behavior found in most image editors out there.
2020-01-04 18:43:52 +01:00
xelivous 64ae7feaa4 Change the 2D editor's snap to 8x8 by default 2020-01-03 19:23:49 -06:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
volzhs 2fa9585bdf Fix error log when selecting child of Containers 2019-12-19 00:04:10 +09:00
Haoyu Qiu 7a9c337dfe Makes more strings in editor translatable
* File type names in file dialogs
* Layout option names
* Visual shader editor UI
2019-12-16 16:41:07 +08:00
Hannah Crawford 4da0d7727f Fix for #34186: "Center Selection" in 2D editor introduces graphic bias. 2019-12-11 16:09:55 +00:00
Rémi Verschelde 2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Haoyu Qiu 0b4cc12b4f clear_meta when clearing guides with the ruler 2019-12-06 09:19:54 +08:00
simpuid 83194f4a50 changed set_meta to remove_meta in CLEAR_GUIDES menu option 2019-12-05 02:46:22 +05:30
Haoyu Qiu e8838f4385 Fixes crash when clearing guides in empty scene 2019-12-05 16:19:00 +08:00
Tomasz Chabora 66cefde2b0 Fix box selection being cancelled immediately 2019-11-27 21:07:51 +01:00
Rémi Verschelde 083d088de3
Merge pull request #33583 from qarmin/fix_overflows_unitialized
Fix some overflows and unitialized variables
2019-11-20 21:31:12 +01:00
Rafał Mikrut 99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
Tomasz Chabora 7e5340261a Cancel drag when selection changes 2019-11-19 16:02:04 +01:00
Rémi Verschelde d8cf3aa5ab
Merge pull request #33700 from nekomatata/sprite-add-label-overlap
Fixed "Add Sprite..." label overlapping with zoom controls
2019-11-19 09:49:52 +01:00
Tomasz Chabora 43d762fce3 Consider locked moving objects when updating viewport 2019-11-18 21:08:14 +01:00
PouleyKetchoupp 6d14251b0d Fixed "Add Sprite..." label overlapping with zoom controls 2019-11-18 11:52:01 +01:00
Michael Alexsander c77ce40c3b Minor adjustment in the "Game Camera Override" button's tooltip. 2019-11-11 11:46:23 -03:00
MCrafterzz a4a105d4ee Added options to disable movement/scaling handles in 2D 2019-11-11 13:33:14 +01:00
Rémi Verschelde 2143f46df2
Merge pull request #33516 from qarmin/small_fixes
Memory leaks and crash fixes
2019-11-10 10:17:19 +01:00
Rafał Mikrut 7dda9309f9 Memory leak and crash fixes 2019-11-10 09:49:13 +01:00
Tomasz Chabora 2bde99f790 Fix some small text mistakes 2019-11-08 23:31:29 +01:00
MCrafterzz b32b439c00 Added movement handles to 2D 2019-11-08 15:48:26 +01:00
Rémi Verschelde 621dc7022f
Merge pull request #27742 from rxlecky/camera-replication
Game camera override
2019-11-08 10:02:18 +01:00
Rémi Verschelde 245c99175c
Merge pull request #33361 from codecustard/master
Fixes improper undo state for pivot setting
2019-11-05 15:54:53 +01:00
codecustard f643786b96 Fixes improper undo state for pivot setting
After setting the pivot of a node, if you undo.... it will not revert the pivot to the previous state.
2019-11-05 05:59:03 -08:00
Tomasz Chabora e3cfb006a0 Allow zooming while panning 2019-11-04 12:33:24 +01:00
Rémi Verschelde 4569f5ec82
Merge pull request #33182 from MCrafterzz/scaleSnap
Added snapping for scaling in 2D editor
2019-11-02 11:12:54 +01:00
MCrafterzz 3a8a7fc31c Added snapping for scaling in 2D editor 2019-11-02 09:43:15 +01:00
Hugo Locurcio 27ad8609e2
Improve the primary line setting display in the Configure Snap dialog
This merges the "steps" suffix into the SpinBox using its `suffix`
property.
2019-10-30 22:19:30 +01:00
Rémi Verschelde 9e1be8f8aa
Merge pull request #32934 from ajweeks/fix-scale-origin
Fix 2D scale gizmo placement
2019-10-30 12:04:10 +01:00
Hugo Locurcio c7e5dd9ef0
Add primary grid lines to the 2D editor
A "primary" line is drawn every 8 steps by default,
which makes it easier to measure distances for snapping.

This value can be configured in the Configure Snap dialog.
2019-10-29 15:47:38 +01:00
Rémi Verschelde f259beb4f1
Merge pull request #33048 from KoBeWi/smarts_vs_grids
Make Ruler Tool depend on grid snap only
2019-10-25 12:06:03 +02:00
Tomasz Chabora 50528b966d Make Ruler Tool depend on grid snap only 2019-10-24 22:31:19 +02:00
volzhs 4beeb0fc0f Fix ruler origin is moving with zoom 2019-10-25 05:19:13 +09:00
Erik 8b0546d93b Implement game camera override
Implemented uniform API in Viewport class to override 2D and/or
3D camera.

Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.

Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.

Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
AJ Weeks fb7a4ce63e Fix canvas scale gizmo placement 2019-10-22 18:17:54 +01:00
AJ Weeks 59d2c71227 Add arcs to indicate angle being measured by ruler 2019-10-19 19:45:56 +01:00
qarmin 616ab4fac2 Small fixes to redundand code, copy paste bugs 2019-10-14 11:40:55 +02:00
Gilles Roudière fff953ac8b Move grid snapping to an independent button 2019-10-10 21:10:08 +02:00
Pedro Ciambra afdfe651a1 Remove Show Ruler shortcut (fixes #32639)
Removed default shortcut because of the conflict mentioned in the issue.
Command + Shift + T would conflict with Soft Reload Script,
and this shortcut doesn't seem to be needed very often.
2019-10-08 18:26:21 -03:00
Gilles Roudière 0e834b3924 Increase grid size limit 2019-10-07 22:59:51 +02:00
Osama El Hariri 90ea3787ec Add angle to ruler tool 2019-10-06 18:04:49 +03:00
Hanif Bin Ariffin 79e83b7c92 Fixed warnings text using custom font and color setting.
Fixes #31917
Added missing font and color override.
2019-10-04 07:20:18 -04:00
lupoDharkael 0a0f596dfb Add checks after ResourceLoader::load() 2019-09-29 14:17:42 +02:00
Rémi Verschelde e426169e4c
Merge pull request #32341 from KoBeWi/be_gone
Clean snapping lines after resize
2019-09-25 18:45:13 +02:00
Michael Alexsander Silva Dias 5ed5465023 Replace "GuiMiniTabMenu" with "GuiTabMenu" and tweak it 2019-09-25 12:53:42 -03:00
Tomasz Chabora 37bf283195 Clean snapping lines after resize 2019-09-25 16:56:44 +02:00
Rémi Verschelde 076dc9803a
Merge pull request #32119 from Calinou/unify-axis-colors
Use the same axis colors consistently in the 2D and 3D editors
2019-09-25 13:03:47 +02:00
Tomasz Chabora 5476250356 Initialize snap_target and make sure it disappears 2019-09-20 22:26:26 +02:00
Hugo Locurcio 95f6f81dc2
Display the current zoom percentage in the 2D editor
This makes it possible for the user to know precisely the current
zoom level. The zoom percentage can be clicked to reset it to 100%
(similar to Firefox).
2019-09-17 20:36:10 +02:00