Commit graph

401 commits

Author SHA1 Message Date
Gilles Roudière
14fa64d289
Fix scale cursor rotation and handle diagonal ones
(cherry picked from commit 6dd19af439)
2020-10-01 16:00:47 +02:00
Hugo Locurcio
1eb4017e28
Make the pressed autokey icon red to emphasize its "recording" status
(cherry picked from commit 95773bb3c1)
2020-10-01 16:00:46 +02:00
Gilles Roudière
0b2913086f
Draw selected item on top of everything else
(cherry picked from commit 16532f51ef)
2020-09-29 13:57:56 +02:00
Gilles Roudière
e496e8d318
Fix error when dragging anchors with parent's size == 0
(cherry picked from commit 8e6da0b808)
2020-09-29 13:57:56 +02:00
SekoiaTree
0d8b2d34e1
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>
(cherry picked from commit 603febdbfe)
2020-09-24 14:43:05 +02:00
Tomasz Chabora
5984febde2 Prevent multiple Controls moving inside container
(cherry picked from commit e44c9101da)
2020-07-24 10:31:57 +02:00
Jitesh
f6479786c0 change minimum horizontal size from 200 to 240
(cherry picked from commit a8905b2a4e)
2020-07-15 12:11:31 +02:00
Michael Alexsander
e7e022b3ee Prefer the highlight version of the "GuiTabIcon" icon for buttons, and make their width/height equal
(cherry picked from commit 26381265b8)
2020-07-15 12:11:31 +02:00
Rémi Verschelde
636b1e4518 CanvasItemEditor: Fix losing position for drag'n'dropped scenes
Fixes #26549.
Supersedes #36309.

(cherry picked from commit a403131a25)
2020-06-29 10:48:07 +02:00
Rémi Verschelde
76fa1724b3
Merge pull request #39395 from asmaloney/fix-macos-scrollwheel-zoom
[3.2][macOS] Control key + scroll wheel should zoom not pan
2020-06-25 11:22:24 +02:00
Hugo Locurcio
c5d70fc6a6 Scroll horizontally when holding Shift with Scroll to Pan enabled
This closes https://github.com/godotengine/godot-proposals/issues/1077.

(cherry picked from commit 84e1c5e4c3)
2020-06-21 21:40:10 +02:00
Andy Maloney
f4640af9c1 [3.2][macOS] Control key + scroll wheel should zoom not pan
Fixes godotengine/godot#32520
2020-06-15 10:23:11 -04:00
johan
48a4f7e3a7 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

(cherry picked from commit fea6ca20c9)
2020-06-05 12:44:45 +02:00
Aaron Franke
7021991cd9 Change OK text in snap dialog to OK
(cherry picked from commit 8f85858224)
2020-06-04 12:16:39 +02:00
Rémi Verschelde
fa0cf25e19 Add shortcut for Pan Mode (G)
And change TileMap Bucket Fill shortcut to (B).

Fixes #8582.

(cherry picked from commit 28b33718b0)
2020-06-04 12:09:39 +02:00
Dominik 'dreamsComeTrue' Jasiński
cf311f3e79 Fix moving 2D node with mouse after using arrow keys
Fixes: #38894
(cherry picked from commit 03b54f8a35)
2020-05-25 16:33:58 +02:00
Eric M
e2c9cbb79f Added selection outline to locked nodes.
(cherry picked from commit 7f5fb73146)
2020-04-16 12:57:22 +02:00
johan
31fb54742b 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.

(cherry picked from commit 1c02906a6f)
2020-03-25 11:38:53 +01:00
Tomasz Chabora
f0c89048d8 Allow to use arrow keys with TOOL_MOVE
(cherry picked from commit 18918b4efa)
2020-02-14 16:07:17 +01:00
Hugo Locurcio
93b99f2c89 Update the zoom percentage when using Frame Selection in the 2D editor
This closes #36019.

(cherry picked from commit 3e95b79b65)
2020-02-14 16:03:49 +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