Commit graph

2601 commits

Author SHA1 Message Date
Rémi Verschelde
6b07c72d76
Merge pull request #37556 from KoBeWi/kill_get_index
Remove Node.get_position_in_parent()
2020-04-06 09:44:38 +02:00
Tomasz Chabora
c1023157eb Remove Node.get_position_in_parent() 2020-04-06 01:19:20 +02:00
Rémi Verschelde
de1d021574
Merge pull request #37397 from Eoin-ONeill-Yokai/Bug37081
Correction to RichTextLabel Tabulation (Bug 37081)
2020-04-05 10:07:47 +02:00
unknown
0fa7703565 Removed reduntant class LineEditFileChooser. 2020-04-05 02:50:32 +05:30
unknown
4413c562d6 Fix file dialog not showing icons 2020-04-04 17:18:43 +05:30
unknown
7e4db6174d Remove redundant vbx variable in FileDialog 2020-04-04 14:58:57 +05:30
Rémi Verschelde
59d44ee872
Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
2020-04-03 15:53:35 +02:00
PouleyKetchoupp
4c8173af0f Add style for highlighted Slider grab area 2020-04-02 15:05:46 +02:00
Rémi Verschelde
ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde
5f11e15571
Merge pull request #37504 from qarmin/out_of_bound_cursor
Fix array out of bounds access caused by uninitialised variables
2020-04-02 13:07:55 +02:00
Michael Alexsander
0c6851ae53 Rename ViewportContainer to SubViewportContainer 2020-04-01 16:11:44 -03:00
Rafał Mikrut
359bebd8c0 Fix out of bound array access caused by unassigned variable 2020-04-01 19:29:35 +02:00
Rémi Verschelde
2e84b7b916
Merge pull request #37443 from Leleat/master
Fix PopupMenu's letter jumping on any InputEventKey (instead of just a press)
2020-04-01 16:51:10 +02:00
Rémi Verschelde
e5033d3952 doc: Sync classref with DisplayServer/Window changes 2020-03-31 11:56:58 +02:00
Leleat
8a5660f3d1 fixed PopupMenus letterjumping on any InputEvent 2020-03-30 21:45:56 +02:00
Rémi Verschelde
cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Eoin O'Neill
2000e110a9 Correction to RichTextLabel Tabulation
Correct backtrack assignment to prevent excessive tabulation. Worth
noting that tabulation is treated differently in RichTextLabel because
of custom user-asignable tab variable which creates problems with
dynamic fonts specifically.
2020-03-29 14:33:17 -07: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
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
Juan Linietsky
197cb4e771 Fixes to X11, still pretty broken 2020-03-26 15:50:00 +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
047e0b7de5 Reworked tooltips to use the popup system. 2020-03-26 15:49:45 +01:00
Juan Linietsky
b3080bc2f4 Popups have also been converted to windows
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +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
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
4d5705eefa
Merge pull request #37274 from Janglee123/corrected-text-selection-in-color-picker
Corrected text selection in color picker
2020-03-26 09:29:18 +01:00
janglee
77b70aa79d Corrected text selection in color picker
Fixes #35603
2020-03-25 08:13:31 +00:00
Rémi Verschelde
4d7ab010db
Merge pull request #37281 from ThakeeNathees/fix-project-manager-don't-consume-Enter
Fix: project manager don't consume Enter key #17620
2020-03-25 08:13:04 +01:00
Thakee Nathees
b98153886f fix project manager don't consume Enter key #17620 2020-03-25 07:09:36 +05:30
Rémi Verschelde
e9ecb06cf3
Merge pull request #37280 from KoBeWi/n
Make search in RichTextLabel case-insensitive
2020-03-24 21:31:57 +01:00
Rémi Verschelde
b587f98fcc
Merge pull request #37176 from dkaste/line-edit-secret-fix-2
Use LineEdit secret character width everywhere
2020-03-24 21:27:44 +01:00
Tomasz Chabora
b3f83ac115 Make search in RichTextLabel case-insensitive 2020-03-24 20:03:09 +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
Darren Kaste
c7c47410aa Use LineEdit secret character width everywhere 2020-03-19 19:06:14 -04:00
Rémi Verschelde
cf50ee4fa4
Merge pull request #37094 from dkaste/line-edit-secret-select
Calculate LineEdit selection with secret character
2020-03-18 21:50:14 +01:00
simpuid
43b2f75d64 Remove update condition from LineEdit::update_placeholder_width
Placeholder with length greater than `max_length` are allowed, so there is no reason for those update condition.
It fixes the odd alignment of placeholder when it's length is greater than `max_length`
2020-03-18 02:22:45 +05:30
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
Darren Kaste
395a038c85 Calculate LineEdit selection with secret character 2020-03-16 12:22:13 -04:00
Michael Alexsander
8f925b1970 Fix incorrect TabContainer documentation for 'get_tab_control()' 2020-03-14 10:53:21 -03: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
Pedro J. Estébanez
aee586553a Improve UX of drive letters
Namely, move the drive dropdown to just the left of the path text box and don't include the former
in the latter.

This improves the UX on Windows.

In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its
dropdown is kept at the original location.
2020-03-03 10:38:34 +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
Gil Arasa Verge
c27811ee68 Double click on a folder didn't open it
There is a deferred call to _update_file_list inside _tree_item_activated but it was not bound.
2020-02-29 21:11:03 +01:00
Rémi Verschelde
09a6a2d8f8 Signals: Port more uses of connect_compat
Those were problematic as they call a method of their parent class,
but callable_mp does not allow that unless it's public.

To solve it, we declare a local class that calls the parent class'
method, which now needs to be protected to be accessible in the
derived class.
2020-02-28 14:24:09 +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
Rémi Verschelde
5a025d3ce8
Merge pull request #36626 from giarve/stop-input-event-prop-on-popup-close
Clicking backgrd. dimming of editor popup stops input event propagation
2020-02-28 10:09:04 +01:00
Gil Arasa Verge
35bc88ca34 Clicking backgrd. dimming of editor popup stops input event propagation
A click on the dimmed background of a popup in the editor should stop the input event from propagating to the background.

This solution reuses the system introduced in commit efc3ffb8, taking advantage of the hide() notifications from the modal where we will set the flag "pass_on_modal_close_click(false)" to stop event handling at the viewport input event handling.
The viewport first hides the modal and after marks the input as handled if the flag mentioned above is set.

Fixes #36341
2020-02-28 00:02:06 +01:00
Mateo Dev .59
7ea690b94f Signals: tab_changed now is emitted when it's on scene tree 2020-02-27 21:27:52 +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
Rémi Verschelde
d94155e10b
Merge pull request #36050 from eswartz/line-edit-move-cursor-on-unselect
Use left/right arrow to move cursor when unselecting in LineEdit
2020-02-27 14:04:19 +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
3c0059650d Added StringName as a variant type.
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +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
Rémi Verschelde
c92c434299
Merge pull request #36229 from dreamsComeTrue/rich-text-label-key-events
RichTextLabel: proper handling of internal key events
2020-02-17 09:56:38 +01:00
Ed Swartz
ee39093ce3 Use left/right arrow to move cursor when unselecting in LineEdit
-- useful for rename dialog (the filename portion is selected by
default, and usually, want to change the end of the name, not the
beginning)
2020-02-15 09:24:20 -06:00
Juan Linietsky
867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
Michael Alexsander
5f5ccfc361 Fix hiding ColorPicker's presets not fully hiding its controls 2020-02-15 02:19:28 -03: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
Dominik 'dreamsComeTrue' Jasiński
ff030afc93 RichTextLabel: proper handling of internal key events
Fixes #36211
2020-02-14 23:15:38 +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
1b4281b895 basic 2D engine is more or less working with Vulkan, including editor.
Still a lot to do
2020-02-11 11:53:27 +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
Rémi Verschelde
ad2ceaade2 Merge pull request #35768 from Eoin-ONeill-Yokai/hiddenRichText
Fix to RichTextEffect `visibility` - Label Now Accounts for Skipped Characters.
2020-02-09 12:57:04 +01:00
Rémi Verschelde
e420b85ba5
Merge pull request #35840 from timothyqiu/groups-match
Fixes add group in Group Editor dialog
2020-02-09 12:53:37 +01:00
Rémi Verschelde
7f95e027b4
Merge pull request #35814 from timothyqiu/line-edit-shortcut
Adds CTRL-A CTRL-E support to LineEdit on macOS
2020-02-09 12:51:59 +01:00
Rémi Verschelde
480bfbd42e Merge pull request #36039 from YeldhamDev/tree_text_clip_fix
Fix text clipping in Tree items not working with negative values
2020-02-09 12:51:26 +01:00
Michael Alexsander
830dd5cd8d Fix text clipping in Tree items not working with negative values 2020-02-08 20:08:18 -03:00
Rémi Verschelde
3e68d318c4
Merge pull request #35714 from sumit0190/lineEditWidth
Update cached_width of the line_edit element (#35699)
2020-02-08 23:43:32 +01:00
sumit0190
2e08578985 Update cached_width of the line_edit element when setting it to be secret 2020-02-08 10:49:08 -05:00
Haoyu Qiu
206b9f2d23 Uses split cursor for SplitContainer 2020-02-08 09:23:38 +08:00
Rémi Verschelde
f3726ee994 Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.
2020-02-07 11:50:40 +01:00
Rémi Verschelde
e18c65634f GraphEdit: Fix regression with GraphNode mouse filter
PR #35068 made Container (which GraphNode inherits) default to
MOUSE_FILTER_PASS, so I removed the manual override, but it turns out
that GraphNode's constructor still overrides it to MOUSE_FILTER_STOP.

Another fix could be to remove the STOP in the constructor, but I don't
know if it's there for a specific reason (e.g. to have GraphNodes STOP
by default, but PASS in a specific case).

Fixes #35978.
2020-02-07 10:09:44 +01:00
Rémi Verschelde
f003b3efaa
Merge pull request #35068 from akien-mga/containers-mouse-filter-pass
Use MOUSE_FILTER_PASS for all containers
2020-02-06 12:23:39 +01:00
Rémi Verschelde
dc9774b17b
Merge pull request #32959 from georgwacker/control-node-anim-fix
Fix control node transform animation jitter with pivot offset
2020-02-05 17:06:49 +01:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Haoyu Qiu
421ea09195 Fixes add group in Group Editor dialog
Before this fix, new group can't be created if any existing group starts
with the new name.
2020-02-02 11:11:20 +08:00
Haoyu Qiu
4774043f8e Adds CTRL-A CTRL-E support to LineEdit on macOS 2020-02-01 13:35:16 +08:00
Rémi Verschelde
5da20d6cf2
Merge pull request #35612 from timothyqiu/option-button-arrow
Fixes OptionButton minimum size
2020-01-31 11:25:13 +01:00
Eoin O'Neill
b3fd4884d7 Fix RichTextEffect visibility to Account for Skipped Characters.
A picture is easier to describe this issue than words. Basically, rich
text effects allowed for character visibility changes. While doing so
would work properly, the rich text label would render the next `word` in
an offset accounting for the hidden characters (leaving a huge space.)

This patch fixes this issue by keeping track of the amount of
`backtrack` necessary per line.
2020-01-30 21:05:52 -08:00
nathanwfranke
c0a84f747e Fix tab container too large when tabs are hidden 2020-01-30 22:45:37 -06:00
Rémi Verschelde
11d28b2d10 Revert "make Label consider spaces for visible_characters"
This reverts commit 695980a0f2.

Fixes #35668.
2020-01-28 19:37:04 +01:00
Haoyu Qiu
ddc397d9ff Fixes OptionButton min size 2020-01-27 14:52:04 +08:00