Commit graph

152 commits

Author SHA1 Message Date
Rémi Verschelde f4d8733777
Merge pull request #44890 from KiritoAM/my-bug-fix
Fix for reselecting a TileMap node without first de-selecting it #44824
2021-01-05 10:48:41 +01:00
andrew-softdev 15cffe060c Fix for reselecting a TileMap node without first de-selecting it 2021-01-03 15:44:36 +00: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 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +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
Rafał Mikrut e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +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 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
Rémi Verschelde be14d9d644
Merge pull request #42979 from Mallos/fix/tilemap-floodfill
fix(editor): TileMap floodfill with same tile ID and different variation
2020-11-02 17:05:43 +01:00
Pleto 0e392bd177 Enhancement for tileset sorting 2020-10-26 06:34:14 +02:00
Eric Tuvesson 8cf88f8ff4 fix(editor): Create new icon for TileMap Rectangle
ref: #42972
2020-10-22 13:28:34 +02:00
Eric Tuvesson cefca25796 fix(editor): TileMap floodfill with same tile ID and different variation
Closes https://github.com/godotengine/godot/issues/40435
2020-10-21 23:56:44 +02:00
Michael Auderer 70a4cd1afe Reset TileMapEditor painting on application refocus
Treats application unfocus as a mouse release for
TOOL_PAINTING, by finishing the undo state and
resetting the tool. Also sets a flag to prevent extra
lines from being drawn when the application is refocused.

fixes #42398, fixes #24970
2020-10-02 01:48:14 -04:00
Haz 3f5413693c Fix tilemap tiles on horizontal/vertical flips 2020-09-06 16:00:36 -04:00
Maganty Rushyendra cf04aabef1 Fix tile placement preview for rotated, skewed or scaled TileMaps
Ensures that the editor preview when placing a tile on a TileMap takes
into account the transformation of the TileMap. Previously, only the
origin of the Tile was transformed, but not its orientation or
scaling.
2020-08-05 10:12:08 +08:00
Marcus Elg 8e2608b2d6 Make tilemap lines/rectangles their own tools 2020-06-26 15:52:09 +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 def2059d67
Implement zooming using Ctrl + Mouse wheel in the TileMap editor
This was previously implemented in the GridMap editor. This makes
the same feature available in the TileMap editor.
2020-06-03 22:17:13 +02: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
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 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
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
dankan1890 ef08e64afb Fixed output prints " Signal 'node_removed' is already connected " when the editor settings window is closed.
Close #38012
2020-04-22 04:26:44 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Tomasz Chabora 37ffb40047 Properly handle node remove via undo 2020-03-29 19:59:04 +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 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
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
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
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 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
Hugo Locurcio 88213b54ba
Change the Pick Tile and Select default shortcuts in the TileMap editor
The new default keys were chosen to match common graphics editing
software. A modifier is no longer required to use the Select tool,
making it faster to use.

This closes #34170.
2020-02-09 17:46:01 +01:00
Haoyu Qiu ca537dea76 Fixes invalid read when using fill tool in empty tilemap 2020-01-27 20:39:49 +08: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
Hugo Locurcio 13f98f80b6
Use the CanvasItemEditor info overlay to display TileMap coordinates
This also removes the editor setting that toggles coordinate display,
as it no longer solves an existing bug.

This closes #28135.
2019-11-22 23:58:36 +01:00
Tomasz Chabora f7476359e0 Make sure tile is selected when selecting TileMap 2019-11-13 14:26:37 +01:00
PouleyKetchoupp 13c88878c4 Fixed cases where labels with autowrap can overflow the editor ui
Fixes #33155
2019-11-04 10:12:36 +01:00
dankan1890 2bdde74d45 Changed the appearance of the rotation icons in the Tilemap.
Make them more intuitive.
2019-09-26 10:59:48 +02:00
Rémi Verschelde cf540f853d
Merge pull request #31974 from YeldhamDev/tilegrid_map_fixes
Small fixes for the Tile/GridMap editors
2019-09-24 11:06:34 +02:00
Michael Alexsander Silva Dias fd0dace4b5 Small fixes for the Tile/GridMap editors 2019-09-04 16:54:05 -03:00
Michael Alexsander Silva Dias 5f3a55acb7 Add informational messages to various editors 2019-09-04 12:37:11 -03:00
Tomasz Chabora 9520d9706a Edit TileMap only with TOOL_SELECT 2019-08-21 20:56:15 +02:00
Tomasz Chabora 7e075029c8 Fix various typos and style errors in text 2019-08-19 20:43:42 +02:00