Commit graph

475 commits

Author SHA1 Message Date
Tomasz Chabora f2751f47b0 Add outline to ruler tool 2020-12-14 23:29:22 +01:00
Nick Swoboda 66827337fd Fix scene being modified when arrows are pressed with no node selected 2020-12-09 16:52:12 -08:00
Rémi Verschelde c653e9c470
Merge pull request #42825 from Chaosus/fix_grid_hotkey
Changes 'always show grid' hotkey to prevent conflict with 'pan mode'
2020-11-30 19:09:13 +01:00
Rémi Verschelde a09846e015
Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
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