Commit graph

599 commits

Author SHA1 Message Date
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
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02: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
bruvzg 15a9f94346 Add macOS DisplayServer implementation.
Change global menu to use Callable, add support for check items and submenus.
2020-03-26 16:24:05 +01:00
Mateo Kuruk Miccino f387b9b4f4 Multiple changes to DisplayServerX11
- Travis: Change x11 to linuxbsd
- SCons: Change x11 plataform to linuxbsd
- Plugins: Remove ; to avoid fallthrough warning
- DisplayServerX11: Implement set_icon
- DisplayServerX11: Fix X11 bug when a window was erased from windows
  map, all the changes from that erased windows are sending to the main
  window
- DisplayServerX11: Reorder create_window commands
- DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i
  where it belongs

+ More X11 fixes which have been integrated directly back into reduz's
original commits while rebasing the branch.
2020-03-26 15:49:54 +01: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 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 f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde ca4e4506db Fix potential divisions by 0 reported by MSVC
The `TextEdit` one was indeed a potential bug.
The `PCKPacker` one seems to be a false positive, it's already in a
`for` loop that depends on `files.size()`.
2020-03-21 11:54:08 +01:00
Rémi Verschelde 951ecc4f79
Merge pull request #36518 from Janglee123/no-underlined-keywords
Removed underlining of not clickable symbols
2020-03-12 22:24:43 +01:00
janglee 50a570c9c1 Removed underlining for not clickable symbols 2020-03-11 08:57:21 +00:00
Rémi Verschelde e80da4a920
Merge pull request #36715 from dreamsComeTrue/fix-text-edit-comment-quotes
Allow single quotes [',"] in comments in TextEdit
2020-03-11 07:32:24 +01:00
Dominik 'dreamsComeTrue' Jasiński ab6456d1bc Allow single quotes in comments
Fixes: #36638
2020-03-11 06:27:28 +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
Rémi Verschelde 2d904d2f80
Merge pull request #36232 from Calinou/add-soft-line-length-guideline
Add a soft line length guideline to the script editor
2020-02-27 21:10:42 +01:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +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 194fd2d5a5
Merge pull request #36089 from dreamsComeTrue/fix-autocomplete-quotes
Fix: auto brace complete for quoted strings
2020-02-23 22:13:27 +01: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
Dominik 'dreamsComeTrue' Jasiński 6a404a88e4 Fix: auto brace complete for quoted strings
Fixes #36002
2020-02-21 23:01:13 +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
Hugo Locurcio 3e4b508c3b
Add a soft line length guideline to the script editor
The default value is 80. The hard line length guideline's
default column has been moved to 100 to account for the new
soft line length guideline.

It can be disabled by setting its value to the same column as the
hard line length guideline.

This closes https://github.com/godotengine/godot-proposals/issues/347.
2020-02-15 03:02:40 +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 9d8e095946 Merge pull request #34288 from bojidar-bg/33425-always-suggest-subsequence
Always display subsequence autocompletion matches
2020-02-10 11:25:35 +01:00
Marcel Admiraal f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Krystof Klestil c475f11018 expose scroll_vertical and scroll_horizontal in TextEdit + documentation 2020-01-07 15:16:07 +01: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
Paulb23 0049f43fc8 Fixed selection indent taking an additional line 2019-12-23 13:16:57 +00:00
Mikolaj Kaczmarek eced81e359 Fix- using cut in first line of a script file does not remove the line 2019-12-14 19:11:19 +01:00
Bojidar Marinov 0c4d35fd1a
Always display subsequence autocompletion matches
Fixes #33425
2019-12-12 01:25:44 +02:00
Rafał Mikrut ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Rémi Verschelde bfd5e09879 Range: Fix cases where max was set to or below min value
It will now raise an error whenever this happens so that we can fix
these situations. `max == min` is not allowed as it could lead to
divisions by zero in ratios, and `max < min` doesn't make much sense.

Fixes #33907.
2019-11-26 10:25:41 +01:00
PouleyKetchoupp 8830e53fe1 Fixed index out of size error in TextEdit when opening scripts 2019-11-24 10:48:04 +01:00
Paulb23 25cba699f0 Fixed not being able to scroll ending wrapped line 2019-11-09 16:45:44 +00:00
Paulb23 362d38ea67 Update connection info on script validation rather then saved copy 2019-11-02 14:41:59 +00:00
Rémi Verschelde 5160d4f5ba
Merge pull request #33233 from hilfazer/dollar-quoted-autocomplete
$ autocompletion keeps quotation
2019-11-01 16:52:13 +01:00
hilfazer c394ef7410 $ autocompletion keeps quotation 2019-11-01 14:52:13 +01:00
PouleyKetchoupp d29c8ab81b Improved TextEdit search usability & documentation 2019-10-31 12:35:23 +01:00
Rémi Verschelde 0cae264d79
Merge pull request #33119 from creikey/fix-quote-malfunction
Remove duplicate quote in displayed quote type
2019-10-28 08:08:38 +01:00
Cameron Reikes 67ab03e245 Remove duplicate quote in displayed quote type
- fixes #32688
 - fixes #32593
2019-10-27 15:21:25 -07:00
Rémi Verschelde 2751cea0d4
Merge pull request #33066 from Tabas32/fix_indentation
Fixed indenting issue with comment at end of line
2019-10-27 13:42:53 +01:00
Paulb23 2e2a049d3c Improve performance of connection info in the script editor 2019-10-27 11:07:19 +00:00
Paulb23 df0c8386a9 Fix text minimap crash when last line is folded 2019-10-26 13:37:25 +01:00
Marian 3322d19cb3 Just initialization, needed by compiler 2019-10-25 16:14:24 +02:00
Marian 616f02e905 Fixed indenting issue with comment at end of line 2019-10-25 15:01:43 +02:00
Zatherz 72d2248276 Don't terminate search if begin_key doesn't fit
Previously this code would continue onto the next iteration of the loop if the line was smaller in size than begin_key, meaning that a situation where begin_key.length() > end_key.length() would cause weird behavior with newlines. Now both the checks for begin_key and end_key are in their own condition and do not skip the entire iteration if they can't be found.
2019-10-24 21:59:02 +02:00