summaryrefslogtreecommitdiffstats
path: root/scene/gui/control.h
Commit message (Collapse)AuthorAgeFilesLines
* Make mouse-enter/exit notifications match mouse event propagationkit2023-11-091-0/+2
| | | | | | | | | | | `NOTIFICATION_MOUSE_ENTER` and `NOTIFICATION_MOUSE_EXIT` now includes the areas of children control nodes if the mouse filters allow it. In order to check if a Control node itself was entered/exited, the newly introduced `NOTIFICATION_MOUSE_ENTER_SELF` and `NOTIFICATION_MOUSE_EXIT_SELF` can be used. Co-authored-by: Markus Sauermann <6299227+Sauermann@users.noreply.github.com>
* Merge pull request #76027 from AThousandShips/focus_directionRémi Verschelde2023-09-251-0/+1
|\ | | | | | | Expose finding valid focus neighbors of a `Control` by side
| * Expose finding valid focus neighbors of a `Control` by sideA Thousand Ships2023-08-241-0/+1
| | | | | | | | Exposes the functionality used for ui navigation
* | Register theme properties with ThemeDBYuri Sizov2023-09-111-0/+1
| |
* | Introduce the concept of global theme contextsYuri Sizov2023-09-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the default theme context, which replaces the need to manually check the project and the default theme all the time; simplifies related code. It also adds framework for custom theme contexts, to be used by the editor. Custom contexts can be attached to any node, and not necessarily a GUI/Window node. Contexts do no break theme inheritance and only define which global themes a node uses as a fallback. Contexts propagate NOTIFICATION_THEME_CHANGED when one of their global themes changes. This ensures that global themes act just like themes assigned to individual nodes and can be previewed live in the editor.
* | Add EditorStringNames singletonkobewi2023-09-031-0/+3
|/
* Expose Control::_get_drag_data() as non-const functionNana Sakisaka2023-05-241-1/+1
|
* Add a warning when trying to access theme items too earlyYuri Sizov2023-04-031-0/+2
|
* Add missing virtual bind for control::get_tooltipkilojool2023-03-211-0/+1
|
* Fix toplevel nomenclatureMarkus Sauermann2023-02-021-2/+2
| | | | | toplevel was 3.x top_level is 4.x
* Merge pull request #67507 from Sauermann/fix-toplevel-root-control-nodeRémi Verschelde2023-01-311-0/+3
|\ | | | | | | Fix event propagation to child after set_as_toplevel
| * Fix set_as_toplevel event propagation to childMarkus Sauermann2022-10-161-0/+3
| | | | | | | | | | | | | | | | In certain conditions events did not get propagated to Control childs of Node2D nodes when setting a parent of the Node2D to toplevel. This patch makes sure that such Control nodes become root control in the viewport.
* | Merge pull request #71598 from bruvzg/gdscript_bidi_overrideRémi Verschelde2023-01-191-3/+3
|\ \ | | | | | | | | | Implement BiDi override mode for GDScript source.
| * | Implement BiDi override mode for GDScript source.bruvzg2023-01-181-3/+3
| | |
* | | Cleanup unused engine code v2kobewi2023-01-191-1/+0
|/ /
* | Remove set_drag_forwarding_compat()kobewi2023-01-141-1/+6
| |
* | Merge pull request #71183 from YuriSizov/control-refresh-layouts-by-parentsRémi Verschelde2023-01-111-0/+1
|\ \ | | | | | | Ensure that the cached layout mode is in sync
| * | Ensure that the cached layout mode is in syncYuri Sizov2023-01-101-0/+1
| | |
* | | Change set_drag_forwarding() to use callables.Juan Linietsky2023-01-101-2/+5
|/ / | | | | | | | | | | | | | | * This solution is much cleaner than the one in 3.x thanks to the use of callables. * Works without issues in any language (no need to worry about camel or snake case). * Editor code uses a compatibility function (too much work to redo). Fixes #59899
* | Fix inconsistent state of Controls when editing and running scenesYuri Sizov2023-01-091-1/+1
| |
* | Use BitField<> hint for ArrayFormatJuan Linietsky2023-01-081-7/+7
| | | | | | | | This was missing in the conversion of bitflags to BitField<>.
* | Merge pull request #36301 from KoBeWi/daddy_nodeRémi Verschelde2023-01-071-0/+1
|\ \ | | | | | | | | | Add reparent methods to Node
| * | Add methods for node reparentingTomasz Chabora2022-08-161-0/+1
| | |
* | | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* | | Restore 'rotation_degrees' properties.Juan Linietsky2022-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | By popular demand, restoring the helper properties to rotate objects in degrees. Affected are local and global rotations for: * Node2D * Node3D * Control
* | | Copy local theme overrides from Control to WindowYuri Sizov2022-12-071-6/+6
| | |
* | | Add `Control::localize_numeral_system` property to toggle automatic numeral ↵bruvzg2022-11-171-0/+4
| | | | | | | | | | | | system conversion.
* | | Merge pull request #67566 from Sauermann/fix-code-simplificationsClay John2022-10-231-1/+0
|\ \ \ | | | | | | | | Code simplifications
| * | | Code simplificationsMarkus Sauermann2022-10-181-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Viewport::get_visible_rect().position is always zero. So Control::get_window_rect is identical to Control::get_global_rect. Remove Control::get_window_rect since it is not used in the source code. 2. sqrt(a * a) = abs(a) for doubles 3. Simplify affine_inverse combination 4. Simplify calculation in shaders
* | | Merge pull request #66279 from aaronfranke/control-min-sizeMax Hilbrunner2022-10-191-3/+3
|\ \ \ | |/ / |/| | Revert `custom_minimum_size` type back to `Vector2` instead of `Vector2i`
| * | Revert custom_minimum_size type back to Vector2 instead of Vector2iAaron Franke2022-09-221-3/+3
| | |
* | | Merge pull request #67348 from Mickeon/salvage-a-dear-commentRémi Verschelde2022-10-131-0/+1
|\ \ \ | | | | | | | | | | | | Comment not to remove `data` structs in some Nodes
| * | | Comment not to remove `data` structs in some NodesMicky2022-10-131-0/+1
| |/ /
* / / Move Shortcut Context to Control and ensure that `shortcut_input` adheres to ↵Eric M2022-10-131-0/+6
|/ / | | | | | | contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
* | Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-1/+1
| |
* | Make `Vector2i` values paired with `EDSCALE` be just `Vector2`Michael Alexsander2022-09-081-3/+3
| |
* | Un-defer the initial theme changed notificationYuri Sizov2022-09-021-3/+0
| | | | | | | | Co-authored-by: Rindbee <idleman@yeah.net>
* | Add ThemeOwner type for managing theme propagation and lookupYuri Sizov2022-09-021-15/+7
| |
* | Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-0/+4
| |
* | Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
* | Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde2022-08-281-2/+2
|\ \ | | | | | | Rename `hint_tooltip` to `tooltip_text` & setter getter
| * | Rename `hint_tooltip` to `tooltip_text` & setgetMicky2022-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | `hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
* | | Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-0/+1
|/ /
* | Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`Aaron Record2022-08-251-3/+2
| |
* | Disconnect Control from theme resources to avoid issues on destructionYuri Sizov2022-08-241-0/+1
| |
* | Replace Array return types with TypedArraykobewi2022-08-221-2/+2
| |
* | Merge pull request #64339 from YuriSizov/core-multilevel-validate-propertyRémi Verschelde2022-08-221-1/+1
|\ \
| * | Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-1/+1
| |/
* / Replace meta properties with regular properties in `Control`Yuri Sizov2022-08-191-0/+7
|/
* Add dumb theme item cache to ControlYuri Sizov2022-08-121-0/+8
|