Commit Graph

58 Commits

Author SHA1 Message Date
e1384dd159 Fix ScrollContainer focus border issue
Fixes #100176

Instead of using no clipping technique to draw the focus border because
it causes problems if a `ScrollContainer` is nested in another
`ScrollContainer`, now the focus border is drawn using an internal
`PanelContainer`.
2025-04-14 17:51:43 -03:00
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
3c85281610 Scroll inspector while drag hovering near the edge 2025-03-26 12:37:12 -04:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
a375e77b85 Revert "Fix inspector follow focus when child is focused"
This reverts commit 286d3ae415.
2025-02-26 18:18:28 +08:00
286d3ae415 Fix inspector follow focus when child is focused 2025-02-12 17:16:44 +01:00
86ea0127a3 Add a focus border on ScrollContainer
Also added new unit tests for `Control`.

Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2024-11-23 23:54:38 -03:00
b36bebc6da Add SCROLL_MODE_RESERVE to ScrollContainer 2024-09-12 14:02:01 +02:00
21f0529aa9 Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00
d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
29358daa4d Expose horizontal/vertical custom_step as editor property for the ScrollContainer 2023-04-29 23:56:59 +02:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
aed3822a93 Change return type of get_configuration_warnings to PackedStringArray 2022-09-19 16:43:15 +01:00
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
3b1aa240dc Add a lifecycle method for manual theme item caching to Control 2022-09-01 16:35:36 +03:00
a7eecc61ad Fix toggling after scrolling resulted in blank space
Previously, the data used by `update_scrollbars()` and `_update_dimensions()` in their calculations depended on each other, which caused some problems.

Now, the calculation of `child_max_size` is put into `get_minimum_size()`, as the containers call `update_minimum_size()` before calling `queue_sort()`.

Make the semantics of variable/function names more clear.

Co-authored-by:  Aaron Record <aaronjrecord@gmail.com>
2022-07-31 09:32:20 +08:00
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
1032c2c434 Merge pull request #55487 from YeldhamDev/scroll_bikeshedding 2022-01-03 14:10:41 +01:00
841a9ef820 ScrollContainer's scrollbar visibility is now enum 2021-12-07 18:27:12 +01:00
c33f407d27 Allow scrolling theme preview when the control picker is active 2021-12-02 17:57:53 +03:00
ec4f4c6cda Rename all methods that return ScrollBar nodes to get_*_scroll_bar() 2021-11-30 13:46:36 -03:00
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
452e10ba7b Remove clips_input() method and use clip_content 2021-06-25 15:46:37 +02:00
6d5b5ba89f ScrollContainer: Expose _ensure_focused_visible to the API
Was renamed to `ensure_control_visible`
2021-05-31 17:14:57 -10:00
bb6bdcee1a Add the ability to hide scrollcontainer's scrollbars 2021-04-28 09:28:31 -06:00
2a8c59c171 Use Array for node configuration warnings
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-04-11 23:25:38 -05:00
7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
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
b8610dbd31 Allow ScrollBar params of a ScrollContainer to be modified in _ready()
Initializes the sizes of the ScrollContainer and its associated
ScrollBars in _ready() to allow scroll values to be set in GDScript
initially.
2020-12-29 13:02:02 +08:00
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
26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
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
76e03f9b4d Fix scrollbar regression on large scales 2020-01-16 00:59:46 -03:00
34bf81fa7c Cleanup unnecessary code from before the scrollbar overlapping fixes 2020-01-14 18:19:12 -03:00
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
54f70b6b50 Fix argument type in set_follow_focus() 2019-12-30 23:42:39 +01:00
cc72885107 Make new ScrollContainer focus behavior optional 2019-12-30 16:40:02 +01:00
77a8657633 Scroll ScrollContainer to focused children 2019-12-11 14:29:36 +01:00
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
dcf5be92a3 Make BaseButton not emit press when container is scrolled
This fixes the problem described in #13996 in a proper way.

This also adds "deadzone" property to ScrollContainer. It can be used
on mobile, where taps are not as precise as mouse clicks. Player could
slightly move their finger when tapping, in which case we still want
the button to be pressed rather than the container to be scrolled.
2018-04-09 20:34:52 +07:00
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00